revSetStackFileProfile: How fast? Is it blocking?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trevix
Posts: 1034
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

revSetStackFileProfile: How fast? Is it blocking?

Post by trevix » Sat Feb 11, 2023 1:09 pm

Hello.
I use revSetStackFileProfile in order to change all the labels (many...) of my mobile standalone, according to the language chosen by the user.

I noticed that if the revSetStackFileProfile script is running too close in the script to other setting activity (like bluetooth, sockets, opening library, etc) the standalone crashes on Android 11 (not on iOS).

My question is: the line

Code: Select all

revSetStackFileProfile "English", "Referi" --= English, for example, takes more or less a second
sets everything in the standalone before releasing to the next script line or the script lines after that are run while stack, substacks, cards and controls are still being modified?

I tried to pinpoint the crash, but it does not happens while debugging line by line.
Thanks for any help.
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10078
Joined: Wed May 06, 2009 2:28 pm

Re: revSetStackFileProfile: How fast? Is it blocking?

Post by dunbarx » Sat Feb 11, 2023 3:57 pm

Hi.

Shooting in the dark here. Does that command set the result? If so, could you wait until the result is, likely, empty, until proceeding with the rest of the handler?

Craig

trevix
Posts: 1034
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: revSetStackFileProfile: How fast? Is it blocking?

Post by trevix » Tue Jan 07, 2025 9:13 am

I am still having crashes on Android 11, because of revSetStackFileProfile.
Trying to re-open the stack, after using the revSetStackFileProfile command and saving it, sometimes but not always, returns "Stack is corrupted, check for - backup file" in the result.

Being a random problem, I don't have a recipe for it, but it is a problem only on Android "slow" devices. No problems on OSX or iOS.
I also tried, instead, to use a repeat loop with revSetStackProfile on selected stacks, but this did not solve.

Clearly something else in my code interferes with the revSetStackFileProfile.

Being used to change the localization of my App, clearly this command need to be placed in the first phases of the opening process.
I tried to place it in the PreOpenstack or in the OpenStack: didn't solve.
I tried to slow down processing (with "wait 20 milliseconds with messages" in the loop of revSetStackProfile): didn't solve.

Any suggestions?
Thanks
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”