Re: Memory Allocation

2017-02-08 Thread Bob Sneidar via use-livecode
OK I've figured this out. I'm not sure if this qualifies as a bug per se, but 
you cannot modify the datagrid data while a selectionChanged handler is 
running. The only reason I can think this is an issue is if the datagrid 
library calls selectionChanged itself. The workaround is to send in time to a 
handler that changes the dgData or dgDataOfRecord/Index. Not sure what would 
happen with dgText.

ex.
on selectionChanged
  put "12345" into aDGData [1] ["some column"]
  set the dgData of me to aDGData
  set the dgHilitedIndex of me to 1
end selectionChanged

BD

on selectionChanged
  send populateMe to me in 10 milliseconds
selectionChanged

on populateMe
  put "12345" into aDGData [1] ["some column"]
  set the dgData of me to aDGData
  set the dgHilitedIndex of me to 1
end populateMe

GD

The odd thing is I tested this in a simple stack with a datagrid with one 
column without fail. It may be I need more data to get it to glitch, but I can 
definitely make it happen every time in a more complex app, and I can also 
definitely make it not fail using send in time.

If anyone at Livecode wants to remote in to my workstation sometime so I can 
demonstrate the issue I'm open to that. The app is way to big to even attempt 
to send via the QC center. Contact me off list.

Bob S



On Feb 8, 2017, at 14:36 , Bob Sneidar 
mailto:bobsnei...@iotecdigital.com>> wrote:

NVM I am discovering that setting the DGData of a datagrid in the middle of a 
selectionChanged handler is what is crashing to desktop. I can produce this 
every single time in my app, but alas when I rey to create a test stack I 
cannot reproduce it.

But I enabled gRevDevelopment and I discovered where it's going wrong. There is 
a private command called _resetdata that when called in this manner crashes to 
desktop. I will investigate further to see what command specifically is doing 
it.

BTW it is not the data itself. I put empty into the array, then set a single 
line and a single column to the value "12345". Still crashes.

Bob S

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Memory Allocation

2017-02-08 Thread Bob Sneidar via use-livecode
Hmmm... also of note, putting true into gRevDevelopment enables explicit 
variables. That is where that bugaboo was coming from, where people were saying 
that explicitVariables was being enabled randomly. workaround would be: 

put true into gRevDevelopment;set explicitVariables to false

 in the message box


Bob S


> On Feb 8, 2017, at 14:36 , Bob Sneidar via use-livecode 
>  wrote:
> 
> NVM I am discovering that setting the DGData of a datagrid in the middle of a 
> selectionChanged handler is what is crashing to desktop. I can produce this 
> every single time in my app, but alas when I rey to create a test stack I 
> cannot reproduce it.
> 
> But I enabled gRevDevelopment and I discovered where it's going wrong. There 
> is a private command called _resetdata that when called in this manner 
> crashes to desktop. I will investigate further to see what command 
> specifically is doing it.
> 
> BTW it is not the data itself. I put empty into the array, then set a single 
> line and a single column to the value "12345". Still crashes.
> 
> Bob S
> 
> 
> On Feb 8, 2017, at 11:38 , Bob Sneidar via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
> 
> I hesitate to post but...
> 
> A dev posted here about a change made to the engine to make it more efficient 
> which ended up causing problems down the line, memory being released before 
> it's time, and the need to create a special C class to handle it. When was 
> this implemented? I ask because I am running 8.1.2 and I have a method I am 
> using which involves some recursion and database reads and writes in between.
> 
> Sometimes it works famously, other times I crash to desktop. I have gone 
> through the code to make sure I have no endless loops, and yet I am still 
> getting this CtoD sporadically. If it were looping it would happen every time.
> 
> Bob S
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Memory Allocation

2017-02-08 Thread Bob Sneidar via use-livecode
NVM I am discovering that setting the DGData of a datagrid in the middle of a 
selectionChanged handler is what is crashing to desktop. I can produce this 
every single time in my app, but alas when I rey to create a test stack I 
cannot reproduce it.

But I enabled gRevDevelopment and I discovered where it's going wrong. There is 
a private command called _resetdata that when called in this manner crashes to 
desktop. I will investigate further to see what command specifically is doing 
it.

BTW it is not the data itself. I put empty into the array, then set a single 
line and a single column to the value "12345". Still crashes.

Bob S


On Feb 8, 2017, at 11:38 , Bob Sneidar via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

I hesitate to post but...

A dev posted here about a change made to the engine to make it more efficient 
which ended up causing problems down the line, memory being released before 
it's time, and the need to create a special C class to handle it. When was this 
implemented? I ask because I am running 8.1.2 and I have a method I am using 
which involves some recursion and database reads and writes in between.

Sometimes it works famously, other times I crash to desktop. I have gone 
through the code to make sure I have no endless loops, and yet I am still 
getting this CtoD sporadically. If it were looping it would happen every time.

Bob S

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Memory Allocation

2017-02-08 Thread Bob Sneidar via use-livecode
I hesitate to post but...

A dev posted here about a change made to the engine to make it more efficient 
which ended up causing problems down the line, memory being released before 
it's time, and the need to create a special C class to handle it. When was this 
implemented? I ask because I am running 8.1.2 and I have a method I am using 
which involves some recursion and database reads and writes in between. 

Sometimes it works famously, other times I crash to desktop. I have gone 
through the code to make sure I have no endless loops, and yet I am still 
getting this CtoD sporadically. If it were looping it would happen every time. 

Bob S



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode