Error on RevDataGridLibraryBehaviorsDataGridButtonBehavior

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

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

Error on RevDataGridLibraryBehaviorsDataGridButtonBehavior

Post by trevix » Fri Oct 25, 2024 4:05 pm

Following an update to google play, I got this error on an Android 7 and 13 devices (app standalone by LC 10.0.1Rc1):
Error on line: 3487 char: 1
Error: 69,77,449,535,241,353,573,587,241,353,573,253,253,241,353,573,241,353,449,535,253,241,353,
WHERE: stack "RevDataGridLibraryBehaviorsDataGridButtonBehavior"
How am I supposed to debug such an error, since I cannot even find the stack it is referring to?
The error number are also pretty generic, as from the Error Lookup.
Should I remove the last data grid from my stack (all the previous were replaced due to these kind of problems) and rebuild my own custom scrolling list for each specific task?

The idea of data grids, widgets and so on is great, as long as they are bug free (uh") or constantly bug maintained, since, like in my case, there is not a chance that an app developer can fix such a problem (which, by the way, appears randomly and inside a standalone full of other stuff).

I accept suggestions...
Thanks
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: Error on RevDataGridLibraryBehaviorsDataGridButtonBehavior

Post by stam » Sun Oct 27, 2024 9:16 am

Is this not just the column or row script you’ve defined in the data grid?

Can you replicate the error in the IDE so you can track it down?

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

Re: Error on RevDataGridLibraryBehaviorsDataGridButtonBehavior

Post by trevix » Sun Oct 27, 2024 9:35 am

Can you replicate the error in the IDE so you can track it down?
I can't. It happens installing the standalone on an Android 11 (not on 13) hardware device. Not always and not on the IDE.
The datagrid is used to display the result of a BT pairing process.

As you can imagine, it takes to me less time to create a clone (which I can debug) of how my datagrid was set than to try to demonstrate how to replicate consistently the error (sigh).
I was hoping that just the mention of line 3487 was enough to pin point the possibile error.
Is this not just the column or row script you’ve defined in the data grid?
If I understand what you mean, no. My datagrid Behavior script has only 201 lines of code.
As for the "behaviordatagridbuttonbehavior.livecodescript" on line 3487 there is a "set the layerMode of theControl to "dynamic" of private command "_list.CalculateFormattedHeight". Boh!
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: Error on RevDataGridLibraryBehaviorsDataGridButtonBehavior

Post by stam » Sun Oct 27, 2024 3:54 pm

trevix wrote:
Sun Oct 27, 2024 9:35 am
If I understand what you mean, no. My datagrid Behavior script has only 201 lines of code.
As for the "behaviordatagridbuttonbehavior.livecodescript" on line 3487 there is a "set the layerMode of theControl to "dynamic" of private command "_list.CalculateFormattedHeight". Boh!
It's a high probability that there is no bug with the datagrid itself - after all, thousands of users have been using it for many years without issues.

It is probably something with the code, or more correctly, the data being displayed. Setting the layerMode is probably a red herring (there are a number of situations where exception reporting in LiveCode does not point to the right thing)

Do you have access to the remote debugger?
If not, do you have the option of building a test version for android where the data being displayed is also displayed in a different way or saved to a file? It seems likely the datagrid is being fed data to display that is making it choke... possibly because of coding in the behaviour script.
Perhaps put try/catch blocks in all your handlers in any of debugging?

The error codes you mention above include:
69 Chunk: error in object expression
77 Chunk: can't find object
449 Object: can't set object property
535 set: can't set property
241 Handler: error in statement
573 Handler: can't find handler
587 switch: error in statement
253 if-then: error in statement

Not sure if that helps at all...

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

Re: Error on RevDataGridLibraryBehaviorsDataGridButtonBehavior

Post by trevix » Sun Nov 03, 2024 7:50 pm

I may have an hint on what is happening.
I am using the Splash method and password protect the Main stack that is going to be opened by the splash stack.
My only Data Grid template is a substack of the Main stack and I get the datagrid error only if I apply the password protection (which is done to the Main stack and ALL its substacks).
Unfortunately, when I trace debug with the remote debugger, if the stack is password protected I cannot really see what is going on, beside putting messages here and there.

What I know:
The array passed to the "set the dgData" line is well formed.
The same array, if the stacks are not password protected, is displayed fine in the datagrid, without any error.

The next step will be to skip the password protection for the Data Grid Templates substack, but I don't really understand why this should matter...
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

Post Reply