Re: Anomalous Script behavior
Hi, I am still wrestling with a bug in LC 7 (quoted below if you want to read—but not necessary). It’s very difficult to reproduce in a sample stack. LiveCode has offered to fix it with credits from the Business program. I do realize that there are long-term and short-term bugs in the IDE that people wish were fixed by the engineers as a matter of course of time . I wish this one was fixed, but it probably won’t be until I pay them to do it. But here, for my own mental health, is more information about the issue... My application has trouble with LC 7 (any version) of it keeping track which stack it is in. I tell it to show a button; an error message says there is no button, even when there is. I discovered by doing simply: if there is a button tButton then show button tButton else put the short name of this stack end if that I was somehow in another stack at that moment—could be my substack, the Message Box, or RevPropertyPalette 1, even the Tools Palette, and there was of course, no button tButton to show—even though my scripts were continuing to execute as expected. I put in a command to go to my stack to somehow force it to be there, but to no avail, that test kept saying "this stack" was another stack. The IDE is at times thinking that I’m in another stack when my scripts are functioning totally within my main stack. The problem seems to arise after going to one of these other stacks by clicking on them, or somehow unwittingly being in some IDE stack—from that point on that other stack keeps coming back until I quit and reopen. I have no idea of how the IDE operates as far as keeping track of which stack is the stack-in-question. Making a simple sample stack to reproduce the problem didn’t show the issue. The problem didn’t show in earlier versions of LC. As I said, I’ve tried to force my way back to my stack, but the IDE seems to be in two worlds at the same time, my stack and this other stack, thus creating havoc. Peter Bogdanoff UCLA > This is the issue I was having with a stack with a player that sends > callbacks that a script handler doesn’t seem to respond to… LiveCode 7.1.0 dp1 > > An update. I was able to isolate the problem. SAVING the stack sets things > aright, for awhile... > > This is how my script should work: > 1. I load an audio file from a remote server into a player > 2. I set the callbacks of the player > 3. In my application (an image of music notation with button borders marking > specific parts of the music notation) I’m setting the showBorder of a series > of card buttons to true when a callback is received from the player. So, I > set the showBorder of the first button to true, and start the player > 3. The player sends the first callback and the script sets the showBorder of > the first button to false and sets the showBorder of the second button to > true. The player sends the second callback and the 2nd button border is set > to false and the 3rd border is set to true, and so on with each subsequent > callback. > > This works very nicely (for a while). Then I change the audio file in the > player. Then things fail: > 1. The player sends callbacks reliably, the handler is invoked to do the > setting of the showBorders, but the lines in the script that set the > showBorders are seemingly not performed. The first border is set (number 3 > above), but the subsequent borders are not. > 2. I isolated it down to an issue of these lines: > set the showBorder of card button tPrevButton to false > set the showBorder of card button tNextButton to true > > These buttons exist on the card, but the engine seems to not know about them. > It neither turns the border off on the first or the border on on the second. > There are no error warnings. In fact these lines SEEM to be skipped. So, I > change the script to the following: > > if there is a card button tNextButton then > set the showBorder of card button tNextButton to true > else > put “ERROR” > end if > > I click APPLY in the editor. I start the player and get the ERROR. > > 3. Now I SAVE the stack and start the player and I get NO error. The SAVING > of the stack seems to fix the problem. It application works great again as I > play the same audio file. > > 4. I load another audio file in, the error returns. I save the stack and it > starts working. In fact I can save the stack while the player is playing and > the borders are not working, and as soon as the save is finished, the borders > start to work properly. Doing a SAVE always works, APPLYING script changes > does not. > > It’s a large stack, 179 MB, with over 3000 cards. The application has a total > of 10 main stacks using 300 MB of memory that are loaded in. It worked in LC > 6.1.3 and LC 6.7.7, but fails in LC 7. > > Memory issue??? > > I filed a bug report, 15689. > > Peter Bogdanoff > UCLA
RE: Anomalous Script behavior
Peter, I have just run into a similar problem with the debugger and message box that might be related. I put a breakpoint in a library stack. In the script I refer to "this stack". The script works OK with/without a breakpoint even when stepping though it or just continuing execution. The rub comes when I refer the "this stack" in the message box while the breakpoint is active. "put this stack" yields the library stack not the main stack that called the library stack. I also noticed that the variables within the scope of the procedure breakpointed are not available in the message box. This is not a problem if you want to just see the contents but you can't "put somevar" in the message box. All the message box says is "somevar" not the contents of somevar. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Peter Bogdanoff Sent: Wednesday, September 23, 2015 4:50 PM To: How to use LiveCode Subject: Re: Anomalous Script behavior Hi, I am still wrestling with a bug in LC 7 (quoted below if you want to read—but not necessary). It’s very difficult to reproduce in a sample stack. LiveCode has offered to fix it with credits from the Business program. I do realize that there are long-term and short-term bugs in the IDE that people wish were fixed by the engineers as a matter of course of time . I wish this one was fixed, but it probably won’t be until I pay them to do it. But here, for my own mental health, is more information about the issue... My application has trouble with LC 7 (any version) of it keeping track which stack it is in. I tell it to show a button; an error message says there is no button, even when there is. I discovered by doing simply: if there is a button tButton then show button tButton else put the short name of this stack end if that I was somehow in another stack at that moment—could be my substack, the Message Box, or RevPropertyPalette 1, even the Tools Palette, and there was of course, no button tButton to show—even though my scripts were continuing to execute as expected. I put in a command to go to my stack to somehow force it to be there, but to no avail, that test kept saying "this stack" was another stack. The IDE is at times thinking that I’m in another stack when my scripts are functioning totally within my main stack. The problem seems to arise after going to one of these other stacks by clicking on them, or somehow unwittingly being in some IDE stack—from that point on that other stack keeps coming back until I quit and reopen. I have no idea of how the IDE operates as far as keeping track of which stack is the stack-in-question. Making a simple sample stack to reproduce the problem didn’t show the issue. The problem didn’t show in earlier versions of LC. As I said, I’ve tried to force my way back to my stack, but the IDE seems to be in two worlds at the same time, my stack and this other stack, thus creating havoc. Peter Bogdanoff UCLA > This is the issue I was having with a stack with a player that sends > callbacks that a script handler doesn’t seem to respond to… LiveCode > 7.1.0 dp1 > > An update. I was able to isolate the problem. SAVING the stack sets things > aright, for awhile... > > This is how my script should work: > 1. I load an audio file from a remote server into a player 2. I set > the callbacks of the player 3. In my application (an image of music > notation with button borders marking specific parts of the music > notation) I’m setting the showBorder of a series of card buttons to true when > a callback is received from the player. So, I set the showBorder of the first > button to true, and start the player 3. The player sends the first callback > and the script sets the showBorder of the first button to false and sets the > showBorder of the second button to true. The player sends the second callback > and the 2nd button border is set to false and the 3rd border is set to true, > and so on with each subsequent callback. > > This works very nicely (for a while). Then I change the audio file in the > player. Then things fail: > 1. The player sends callbacks reliably, the handler is invoked to do the > setting of the showBorders, but the lines in the script that set the > showBorders are seemingly not performed. The first border is set (number 3 > above), but the subsequent borders are not. > 2. I isolated it down to an issue of these lines: > set the showBorder of card button tPrevButton to false > set the showBorder of card button tNextButton to true > > These buttons exist on the card, but the engine seems to not know about them. > It neither turns the border off on the
Re: Anomalous Script behavior
This is the issue I was having with a stack with a player that sends callbacks that a script handler doesn’t seem to respond to… LiveCode 7.1.0 dp1 An update. I was able to isolate the problem. SAVING the stack sets things aright, for awhile... This is how my script should work: 1. I load an audio file from a remote server into a player 2. I set the callbacks of the player 3. In my application (an image of music notation with button borders marking specific parts of the music notation) I’m setting the showBorder of a series of card buttons to true when a callback is received from the player. So, I set the showBorder of the first button to true, and start the player 3. The player sends the first callback and the script sets the showBorder of the first button to false and sets the showBorder of the second button to true. The player sends the second callback and the 2nd button border is set to false and the 3rd border is set to true, and so on with each subsequent callback. This works very nicely (for a while). Then I change the audio file in the player. Then things fail: 1. The player sends callbacks reliably, the handler is invoked to do the setting of the showBorders, but the lines in the script that set the showBorders are seemingly not performed. The first border is set (number 3 above), but the subsequent borders are not. 2. I isolated it down to an issue of these lines: set the showBorder of card button tPrevButton to false set the showBorder of card button tNextButton to true These buttons exist on the card, but the engine seems to not know about them. It neither turns the border off on the first or the border on on the second. There are no error warnings. In fact these lines SEEM to be skipped. So, I change the script to the following: if there is a card button tNextButton then set the showBorder of card button tNextButton to true else put “ERROR” end if I click APPLY in the editor. I start the player and get the ERROR. 3. Now I SAVE the stack and start the player and I get NO error. The SAVING of the stack seems to fix the problem. It application works great again as I play the same audio file. 4. I load another audio file in, the error returns. I save the stack and it starts working. In fact I can save the stack while the player is playing and the borders are not working, and as soon as the save is finished, the borders start to work properly. Doing a SAVE always works, APPLYING script changes does not. It’s a large stack, 179 MB, with over 3000 cards. The application has a total of 10 main stacks using 300 MB of memory that are loaded in. It worked in LC 6.1.3 and LC 6.7.7, but fails in LC 7. Memory issue??? I filed a bug report, 15689. Peter Bogdanoff UCLA On Jul 25, 2015, at 11:27 PM, Peter Bogdanoff bogdan...@me.com wrote: Mark, I tried it in LC 6.7.7 RC1 and did NOT see the problem. (The same stack works properly in 6.3.1.) Doubting my sanity, I went back and tried the very same stack in 7.1. RC1 and saw the problem immediately. The script just stops executing. The player continues to send callbacks with apparently valid parameters (a digit) that do invoke the handler, but that handler won’t continue. No errors, no nada. We really, really, really want to move to LC 7 for English/Chinese language and Unicode (Chinese looks great in 7, bad in 6). People in China are begging for us to make available our Music History program in China. We are happy to see the improved player in the newest version of LC as all our audio is on a remote server and the Chinese mostly use Windows. As the Thermian Mathesar with fist over heart cries to Jason Nesmith in Galaxy Quest, “You are our last hope! Peter Bogdanoff UCLA On Jul 24, 2015, at 9:42 AM, Mark Waddingham m...@livecode.com wrote: Hi Peter, Do you see a similar thing in 6.7? The reason I ask is that if the problem is only occurring in an a handler being invoked by the engine as part of callbacks set by the callback property on a player it could be something to do with that specific case. The player implementation on Mac changed completely from 6.7 onwards... Mark. Sent from my iPhone On 24 Jul 2015, at 06:15, Peter Bogdanoff bogdan...@me.com wrote: Using LC 7.1 dp1 Part of a script sometimes doesn’t function—sometimes it works just fine. Sometimes it refuses to continue to execute the rest of a handler. This refusal will happen over and over until some point in my testing it starts working again beautifully. It’s a group script with 35,655 characters. Is there a limit to the number of characters? I put in breakpoints that are sometimes reached, sometimes not. It’s a handler that is being called by callbacks in a player as the media plays, so it’s difficult to debug while the media is playing. So I put some code in to put data into a field when those
Re: Anomalous Script behavior
Mark, I tried it in LC 6.7.7 RC1 and did NOT see the problem. (The same stack works properly in 6.3.1.) Doubting my sanity, I went back and tried the very same stack in 7.1. RC1 and saw the problem immediately. The script just stops executing. The player continues to send callbacks with apparently valid parameters (a digit) that do invoke the handler, but that handler won’t continue. No errors, no nada. We really, really, really want to move to LC 7 for English/Chinese language and Unicode (Chinese looks great in 7, bad in 6). People in China are begging for us to make available our Music History program in China. We are happy to see the improved player in the newest version of LC as all our audio is on a remote server and the Chinese mostly use Windows. As the Thermian Mathesar with fist over heart cries to Jason Nesmith in Galaxy Quest, “You are our last hope! Peter Bogdanoff UCLA On Jul 24, 2015, at 9:42 AM, Mark Waddingham m...@livecode.com wrote: Hi Peter, Do you see a similar thing in 6.7? The reason I ask is that if the problem is only occurring in an a handler being invoked by the engine as part of callbacks set by the callback property on a player it could be something to do with that specific case. The player implementation on Mac changed completely from 6.7 onwards... Mark. Sent from my iPhone On 24 Jul 2015, at 06:15, Peter Bogdanoff bogdan...@me.com wrote: Using LC 7.1 dp1 Part of a script sometimes doesn’t function—sometimes it works just fine. Sometimes it refuses to continue to execute the rest of a handler. This refusal will happen over and over until some point in my testing it starts working again beautifully. It’s a group script with 35,655 characters. Is there a limit to the number of characters? I put in breakpoints that are sometimes reached, sometimes not. It’s a handler that is being called by callbacks in a player as the media plays, so it’s difficult to debug while the media is playing. So I put some code in to put data into a field when those lines of the script are reached. Then I can see the progression through the script in real time. When it’s not working properly, while the handler IS receiving the callback calls, that field stays empty. Any ideas? Peter Bogdanoff UCLA ___ 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 ___ 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: Anomalous Script behavior
Peter. There is no limit to the size of a script; LC is not HC. But that was easy. To your real question, I am positive, and this does indeed go back to HC, that certain handlers will work one day and not the next. That some will work if I step through them, but not run normally. And that this comes and goes, but generally somehow works itself out, so that after a bit of angst, the gremlin goes away, and rarely leaves me with the issue. Not to say that on occasion I simply rewrite a handler, if it is not too long, and then it works. Hidden spurious chars? Hidden spurious chars that evaporate? I suspect others believe the same, and similar tales will, in aggregate, be like one of those TV shows about haunted houses. There are mysteries... Craig Newman -Original Message- From: Peter Bogdanoff bogdan...@me.com To: How to use LiveCode use-livecode@lists.runrev.com Sent: Fri, Jul 24, 2015 1:16 am Subject: Anomalous Script behavior Using LC 7.1 dp1 Part of a script sometimes doesn’t function—sometimes it works just fine. Sometimes it refuses to continue to execute the rest of a handler. This refusal will happen over and over until some point in my testing it starts working again beautifully. It’s a group script with 35,655 characters. Is there a limit to the number of characters? I put in breakpoints that are sometimes reached, sometimes not. It’s a handler that is being called by callbacks in a player as the media plays, so it’s difficult to debug while the media is playing. So I put some code in to put data into a field when those lines of the script are reached. Then I can see the progression through the script in real time. When it’s not working properly, while the handler IS receiving the callback calls, that field stays empty. Any ideas? Peter Bogdanoff UCLA ___ 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: Anomalous Script behavior
Craig and Peter, Thanks for your replies. Yes, I’ve seen this happen other times, but then it does just go away. Here I’m seeing it reoccur over and over... I tried the same script in LC 6.1.3 and it seems better there, but will do more testing. It could be that there is an unexpected value being passed, and maybe LC 7 is more susceptible to it. Peter On Jul 24, 2015, at 8:33 AM, Peter Haworth p...@lcsql.com wrote: I've run into situations like this and it usually seems to be caused by an unexpected value in a variable passed to an lc function or command which causes it to silently quit and stop the rest of the calling script from executing. Hard to define what unexpected means and I'm trying to think of an example but it's been a while since it happened to me. I would add some code to your tracking mechanism to track the value of any critical variables, especially those that are passed as parameters to other handlers. On Thu, Jul 23, 2015 at 10:16 PM Peter Bogdanoff bogdan...@me.com wrote: Using LC 7.1 dp1 Part of a script sometimes doesn’t function—sometimes it works just fine. Sometimes it refuses to continue to execute the rest of a handler. This refusal will happen over and over until some point in my testing it starts working again beautifully. It’s a group script with 35,655 characters. Is there a limit to the number of characters? I put in breakpoints that are sometimes reached, sometimes not. It’s a handler that is being called by callbacks in a player as the media plays, so it’s difficult to debug while the media is playing. So I put some code in to put data into a field when those lines of the script are reached. Then I can see the progression through the script in real time. When it’s not working properly, while the handler IS receiving the callback calls, that field stays empty. Any ideas? Peter Bogdanoff UCLA ___ 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 ___ 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: Anomalous Script behavior
I've run into situations like this and it usually seems to be caused by an unexpected value in a variable passed to an lc function or command which causes it to silently quit and stop the rest of the calling script from executing. Hard to define what unexpected means and I'm trying to think of an example but it's been a while since it happened to me. I would add some code to your tracking mechanism to track the value of any critical variables, especially those that are passed as parameters to other handlers. On Thu, Jul 23, 2015 at 10:16 PM Peter Bogdanoff bogdan...@me.com wrote: Using LC 7.1 dp1 Part of a script sometimes doesn’t function—sometimes it works just fine. Sometimes it refuses to continue to execute the rest of a handler. This refusal will happen over and over until some point in my testing it starts working again beautifully. It’s a group script with 35,655 characters. Is there a limit to the number of characters? I put in breakpoints that are sometimes reached, sometimes not. It’s a handler that is being called by callbacks in a player as the media plays, so it’s difficult to debug while the media is playing. So I put some code in to put data into a field when those lines of the script are reached. Then I can see the progression through the script in real time. When it’s not working properly, while the handler IS receiving the callback calls, that field stays empty. Any ideas? Peter Bogdanoff UCLA ___ 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: Anomalous Script behavior
Hi Mark, Unfortunately, I don't recall the exact circumstances where this happened because it's been a while. I seem to remember it was a call to one of the datagrid library handlers with a bad parameter that caused the handler containing the handler to stop executing with no error message shown. I should have submitted a QCC report and will be sure to do so if and when it happens again. I can say with confidence that it was with an LC version prior to 6.7 and that it was not related to a player callback. On Fri, Jul 24, 2015 at 9:42 AM Mark Waddingham m...@livecode.com wrote: Hi Peter, Do you see a similar thing in 6.7? The reason I ask is that if the problem is only occurring in an a handler being invoked by the engine as part of callbacks set by the callback property on a player it could be something to do with that specific case. The player implementation on Mac changed completely from 6.7 onwards... Mark. Sent from my iPhone On 24 Jul 2015, at 06:15, Peter Bogdanoff bogdan...@me.com wrote: Using LC 7.1 dp1 Part of a script sometimes doesn’t function—sometimes it works just fine. Sometimes it refuses to continue to execute the rest of a handler. This refusal will happen over and over until some point in my testing it starts working again beautifully. It’s a group script with 35,655 characters. Is there a limit to the number of characters? I put in breakpoints that are sometimes reached, sometimes not. It’s a handler that is being called by callbacks in a player as the media plays, so it’s difficult to debug while the media is playing. So I put some code in to put data into a field when those lines of the script are reached. Then I can see the progression through the script in real time. When it’s not working properly, while the handler IS receiving the callback calls, that field stays empty. Any ideas? Peter Bogdanoff UCLA ___ 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 ___ 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: Anomalous Script behavior
Hi Peter, Do you see a similar thing in 6.7? The reason I ask is that if the problem is only occurring in an a handler being invoked by the engine as part of callbacks set by the callback property on a player it could be something to do with that specific case. The player implementation on Mac changed completely from 6.7 onwards... Mark. Sent from my iPhone On 24 Jul 2015, at 06:15, Peter Bogdanoff bogdan...@me.com wrote: Using LC 7.1 dp1 Part of a script sometimes doesn’t function—sometimes it works just fine. Sometimes it refuses to continue to execute the rest of a handler. This refusal will happen over and over until some point in my testing it starts working again beautifully. It’s a group script with 35,655 characters. Is there a limit to the number of characters? I put in breakpoints that are sometimes reached, sometimes not. It’s a handler that is being called by callbacks in a player as the media plays, so it’s difficult to debug while the media is playing. So I put some code in to put data into a field when those lines of the script are reached. Then I can see the progression through the script in real time. When it’s not working properly, while the handler IS receiving the callback calls, that field stays empty. Any ideas? Peter Bogdanoff UCLA ___ 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