Re: opened socket in IDE prevents script changes
Look in the script editor breakpoints tab. If there are any there delete them. Just spitballing. Bob S On Jan 16, 2021, at 7:10 AM, Bernard Devlin via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: Hi Bernd Thanks for the suggestion. But I think the evidence points away from this. One thing I've done is - change the script (could be just addition of a comment) - copy entire script - apply & close - re-open script editor --> *change is missing* - close IDE - re-open LC - open stack script in editor - delete entire script - paste script from clipboard - apply & close - re-open script editor --> *change is now there* As soon as I open a socket, back to the situation that where script changed, apply etc. does not take. And closing all sockets does not work (although there is always one socket left open, which I believe is a socket the IDE creates in the background). I'm working on the assumption that it's something to do with the way I'm reading/writing to the socket. It's definitely strange. But if I can get to the bottom of this it will help others. The weird thing is that everything is working with the socket communications, no script or runtime errors thrown by LC, yet this working app breaks the IDE in the sense that LC is no longer a dynamic scripting environment (for me anyway). It's important to get to the bottom of this as it makes LC look bad, especially the numerous crashes, which all seem to be related to setting breakpoints in the script editor to try and get to the bottom of what was not working. At least on OSX I'm getting crash logs in the console. Strangely the crash errors are not all the same. Regards Bernard ___ 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: opened socket in IDE prevents script changes
Hi Bernd Thanks for the suggestion. But I think the evidence points away from this. One thing I've done is - change the script (could be just addition of a comment) - copy entire script - apply & close - re-open script editor --> *change is missing* - close IDE - re-open LC - open stack script in editor - delete entire script - paste script from clipboard - apply & close - re-open script editor --> *change is now there* As soon as I open a socket, back to the situation that where script changed, apply etc. does not take. And closing all sockets does not work (although there is always one socket left open, which I believe is a socket the IDE creates in the background). I'm working on the assumption that it's something to do with the way I'm reading/writing to the socket. It's definitely strange. But if I can get to the bottom of this it will help others. The weird thing is that everything is working with the socket communications, no script or runtime errors thrown by LC, yet this working app breaks the IDE in the sense that LC is no longer a dynamic scripting environment (for me anyway). It's important to get to the bottom of this as it makes LC look bad, especially the numerous crashes, which all seem to be related to setting breakpoints in the script editor to try and get to the bottom of what was not working. At least on OSX I'm getting crash logs in the console. Strangely the crash errors are not all the same. Regards Bernard On Fri, Jan 15, 2021 at 5:28 PM Niggemann, Bernd via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Bernard, > > I have seen similar behavior of the apply button indicating "clean" when > the script was "dirty"/had compile errors. That was without sockets. > > https://quality.livecode.com/show_bug.cgi?id=22555 > > maybe your problem is related > > Kind regards > Bernd > ___ > 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: opened socket in IDE prevents script changes
Hi Alex - no plugins using sockets - Business 9.6.1 - no other debuggers/editors in use or used (I have crashed/restarted LC a few dozen times today) - no remote debugging This is just a plain old stack, only a mouseup in a button, everything else in the stack script. I'm going to have to look back at my previous socket project to see what I was doing there that was different. It seems to me that this is what is going on: LC loads the script & the socket interaaction makes it impossible for any script change to be applied. Feels like the engine is simply not "letting go" in order to reload the script. Very peculiar, as I would expect that closing each of the open sockets would release whatever was bound and stopping the script changes from being applied. Thanks for testing & showing that it's something idiosyncratic to me. Regards, Bernard On Fri, Jan 15, 2021 at 4:59 PM Alex Tweedly via use-livecode < use-livecode@lists.runrev.com> wrote: > > On 15/01/2021 15:30, Bernard Devlin via use-livecode wrote: > > I'm seeing exactly the same range of behaviours I described earlier for > > 9.5.1 on Win 10 but with 9.6.1 on OS X. > > > > It's very strange that Alex is also editing scripts with sockets > > opened/closed but not losing changes made in the script editor. I also > had > > 3 crashes on OS X within 30 minutes of working on this stack. > > > > Alex, are you using the IDE's script editor or some external editor? If > > you are using that script editor, once you've opened a socket could you > add > > a comment to your stack script, apply, close the script editor, then edit > > the script again to see if the comment has persisted? I have to quit LC > to > > make any changes to a stack once I've opened a socket. > > Yes, I'm using standard IDE script editor. > > The added comment persists, both through "apply - close - reopen" and > "apply - save stack - close editor - reopen", and to stack and card > scripts. > > > It seems to me that once a socket has been opened that the IDE is no > longer > > persisting changes. I'm pretty sure I didn't see this behaviour on my > > previous project using sockets. > > Have to ask > > - do you have any plugins that might use sockets ? > > - I'm using Indy version - let me know if you're on Community / > Business and I can try that too >I think :-) > > - do you, or have you, used other editors / debuggers that might > affect this ? > > - do you, or have you, used remote debugging ? > > That's all the straws I can think of for now. > > Alex. > > > Regards > > Bernard > > > > On Fri, Jan 15, 2021 at 12:21 PM Bernard Devlin > wrote: > > > >> Thanks Alex for your quick response. > >> > >> I'll try with 9.6.1 on Mac. The only other difference between us is > that > >> my sockets are interacting with a process outside of LC. But I can't see > >> why that would make a difference (particularly once I've closed all > >> sockets, I wouldn't expect sockets to interfere with scripts being > >> changed). > >> > >> Regards, > >> Bernard > >> > >> On Fri, Jan 15, 2021 at 12:07 PM Alex Tweedly via use-livecode < > >> use-livecode@lists.runrev.com> wrote: > >> > >>> I've not seen any such problems - though with 9.6.1 / Mac. > >>> > >>> I've spent most of the last week in the IDE, with two or more stacks > >>> open (one server, one client - occasionally multiple client stacks) so > I > >>> have multiple open sockets (both 'accept'ing and 'open'ed) almost all > >>> the time, and had no problems with IDE or script editor. > >>> > >>> (I know - that's no consolation, but I thought I'd mention it in case > >>> 9.6.1 was an option for you and might just help:-) > >>> > >>> > > ___ > > 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: opened socket in IDE prevents script changes
While debugging in the IDE(Win 10 LC 9.6.1 VM) I have a socket client(plug-in) that had an open socket to the socket server on another Win 10 PC(metal running in a Win service written in LC also). I make changes in the IDE, save the stack and then generate an Android apk and the send the apk via sockets to the server PC that actually has the device connected and the server receives and installs the apk. I have never seen any problems with losing IDE changes or any IDE stability issues while in multiple debug cycles. I have seen the stack not being dirty now and again as Bernd documented in https://quality.livecode.com/show_bug.cgi?id=22555 . I've seen this even when not doing the socket thingy. I either add/delete a space or do a ctrl s to resolve it. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net ___ 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: opened socket in IDE prevents script changes
Thanks Alex. I will keep your advice in mind. Matthias - Matthias Rebbe Life Is Too Short For Boring Code > Am 15.01.2021 um 18:22 schrieb Alex Tweedly via use-livecode > : > > > On 15/01/2021 14:46, matthias rebbe via use-livecode wrote: >> Alex, >> for a new project which should include socket communication i have to >> prototype a short "demo" and i was already wondering if i need to have >> running 2 instances of the LC IDE for development. >> >> But now you wrote that you had one server and even multiple client stacks >> opened in LC. >> So do i understand it correctly that both, server and client stack, can >> communicate with each other using sockets in one instance of the LC IDE? > > Yes. A couple of cautions ... > > - make sure your handlers are carefully named > I had a bad habit of using the same name (_gotpacket) each time I wrote a > socket-handling stack, > so I had 'open socket ... with message "_gotpacket" ' > and then I used the same name when I wrote the server !! > > - beware "resetall". In the server stack, I do something like > >> -- would usually do >> --resetAll >> -- but this causes problems with testing when you have both a client >> -- and a server within the IDE of Rev >> -- so here we will only reset those opensockets which have no 'host' >> part >> -- intending this to be the ones which we have a current 'accept' >> repeat for each line tSock in the openSockets >> if ":" is not in tSock then close socket tSock >> end repeat >> > and in the client stacks I do the inverse (if ":" is in tSock ...). Note this > is still a problem when you have multiple client stacks in the same IDE. > > Finally, > > - when in doubt during testing - first reset the server, then the client. > > > Good luck, > > Alex. > > > ___ > 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: opened socket in IDE prevents script changes
Hi Bernard, I have seen similar behavior of the apply button indicating "clean" when the script was "dirty"/had compile errors. That was without sockets. https://quality.livecode.com/show_bug.cgi?id=22555 maybe your problem is related Kind regards Bernd ___ 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: opened socket in IDE prevents script changes
On 15/01/2021 14:46, matthias rebbe via use-livecode wrote: Alex, for a new project which should include socket communication i have to prototype a short "demo" and i was already wondering if i need to have running 2 instances of the LC IDE for development. But now you wrote that you had one server and even multiple client stacks opened in LC. So do i understand it correctly that both, server and client stack, can communicate with each other using sockets in one instance of the LC IDE? Yes. A couple of cautions ... - make sure your handlers are carefully named I had a bad habit of using the same name (_gotpacket) each time I wrote a socket-handling stack, so I had 'open socket ... with message "_gotpacket" ' and then I used the same name when I wrote the server !! - beware "resetall". In the server stack, I do something like -- would usually do -- resetAll -- but this causes problems with testing when you have both a client -- and a server within the IDE of Rev -- so here we will only reset those opensockets which have no 'host' part -- intending this to be the ones which we have a current 'accept' repeat for each line tSock in the openSockets if ":" is not in tSock then close socket tSock end repeat and in the client stacks I do the inverse (if ":" is in tSock ...). Note this is still a problem when you have multiple client stacks in the same IDE. Finally, - when in doubt during testing - first reset the server, then the client. Good luck, Alex. ___ 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: opened socket in IDE prevents script changes
On 15/01/2021 15:30, Bernard Devlin via use-livecode wrote: I'm seeing exactly the same range of behaviours I described earlier for 9.5.1 on Win 10 but with 9.6.1 on OS X. It's very strange that Alex is also editing scripts with sockets opened/closed but not losing changes made in the script editor. I also had 3 crashes on OS X within 30 minutes of working on this stack. Alex, are you using the IDE's script editor or some external editor? If you are using that script editor, once you've opened a socket could you add a comment to your stack script, apply, close the script editor, then edit the script again to see if the comment has persisted? I have to quit LC to make any changes to a stack once I've opened a socket. Yes, I'm using standard IDE script editor. The added comment persists, both through "apply - close - reopen" and "apply - save stack - close editor - reopen", and to stack and card scripts. It seems to me that once a socket has been opened that the IDE is no longer persisting changes. I'm pretty sure I didn't see this behaviour on my previous project using sockets. Have to ask - do you have any plugins that might use sockets ? - I'm using Indy version - let me know if you're on Community / Business and I can try that too I think :-) - do you, or have you, used other editors / debuggers that might affect this ? - do you, or have you, used remote debugging ? That's all the straws I can think of for now. Alex. Regards Bernard On Fri, Jan 15, 2021 at 12:21 PM Bernard Devlin wrote: Thanks Alex for your quick response. I'll try with 9.6.1 on Mac. The only other difference between us is that my sockets are interacting with a process outside of LC. But I can't see why that would make a difference (particularly once I've closed all sockets, I wouldn't expect sockets to interfere with scripts being changed). Regards, Bernard On Fri, Jan 15, 2021 at 12:07 PM Alex Tweedly via use-livecode < use-livecode@lists.runrev.com> wrote: I've not seen any such problems - though with 9.6.1 / Mac. I've spent most of the last week in the IDE, with two or more stacks open (one server, one client - occasionally multiple client stacks) so I have multiple open sockets (both 'accept'ing and 'open'ed) almost all the time, and had no problems with IDE or script editor. (I know - that's no consolation, but I thought I'd mention it in case 9.6.1 was an option for you and might just help:-) ___ 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: opened socket in IDE prevents script changes
I'm seeing exactly the same range of behaviours I described earlier for 9.5.1 on Win 10 but with 9.6.1 on OS X. It's very strange that Alex is also editing scripts with sockets opened/closed but not losing changes made in the script editor. I also had 3 crashes on OS X within 30 minutes of working on this stack. Alex, are you using the IDE's script editor or some external editor? If you are using that script editor, once you've opened a socket could you add a comment to your stack script, apply, close the script editor, then edit the script again to see if the comment has persisted? I have to quit LC to make any changes to a stack once I've opened a socket. It seems to me that once a socket has been opened that the IDE is no longer persisting changes. I'm pretty sure I didn't see this behaviour on my previous project using sockets. Regards Bernard On Fri, Jan 15, 2021 at 12:21 PM Bernard Devlin wrote: > Thanks Alex for your quick response. > > I'll try with 9.6.1 on Mac. The only other difference between us is that > my sockets are interacting with a process outside of LC. But I can't see > why that would make a difference (particularly once I've closed all > sockets, I wouldn't expect sockets to interfere with scripts being > changed). > > Regards, > Bernard > > On Fri, Jan 15, 2021 at 12:07 PM Alex Tweedly via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> I've not seen any such problems - though with 9.6.1 / Mac. >> >> I've spent most of the last week in the IDE, with two or more stacks >> open (one server, one client - occasionally multiple client stacks) so I >> have multiple open sockets (both 'accept'ing and 'open'ed) almost all >> the time, and had no problems with IDE or script editor. >> >> (I know - that's no consolation, but I thought I'd mention it in case >> 9.6.1 was an option for you and might just help:-) >> >> ___ 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: opened socket in IDE prevents script changes
Bernard, thanks for clarifying. - Matthias Rebbe Life Is Too Short For Boring Code > Am 15.01.2021 um 15:52 schrieb Bernard Devlin via use-livecode > : > > "do i understand it correctly that both, server and client stack, can > communicate with each other using sockets in one instance of the LC IDE" > > Your understanding is correct. On the other project (where I didn't have > this current problem) I had half a dozen clients and 1 "server" running in > the IDE. > > On Fri, Jan 15, 2021 at 2:47 PM matthias rebbe via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> Alex, >> for a new project which should include socket communication i have to >> prototype a short "demo" and i was already wondering if i need to have >> running 2 instances of the LC IDE for development. >> >> But now you wrote that you had one server and even multiple client stacks >> opened in LC. >> So do i understand it correctly that both, server and client stack, can >> communicate with each other using sockets in one instance of the LC IDE? >> >> > ___ > 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: opened socket in IDE prevents script changes
"do i understand it correctly that both, server and client stack, can communicate with each other using sockets in one instance of the LC IDE" Your understanding is correct. On the other project (where I didn't have this current problem) I had half a dozen clients and 1 "server" running in the IDE. On Fri, Jan 15, 2021 at 2:47 PM matthias rebbe via use-livecode < use-livecode@lists.runrev.com> wrote: > Alex, > for a new project which should include socket communication i have to > prototype a short "demo" and i was already wondering if i need to have > running 2 instances of the LC IDE for development. > > But now you wrote that you had one server and even multiple client stacks > opened in LC. > So do i understand it correctly that both, server and client stack, can > communicate with each other using sockets in one instance of the LC IDE? > > ___ 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: opened socket in IDE prevents script changes
Alex, for a new project which should include socket communication i have to prototype a short "demo" and i was already wondering if i need to have running 2 instances of the LC IDE for development. But now you wrote that you had one server and even multiple client stacks opened in LC. So do i understand it correctly that both, server and client stack, can communicate with each other using sockets in one instance of the LC IDE? Regards, Matthias > Am 15.01.2021 um 13:05 schrieb Alex Tweedly via use-livecode > : > > I've not seen any such problems - though with 9.6.1 / Mac. > > I've spent most of the last week in the IDE, with two or more stacks open > (one server, one client - occasionally multiple client stacks) so I have > multiple open sockets (both 'accept'ing and 'open'ed) almost all the time, > and had no problems with IDE or script editor. > > (I know - that's no consolation, but I thought I'd mention it in case 9.6.1 > was an option for you and might just help:-) > > Alex. - Matthias Rebbe Life Is Too Short For Boring Code ___ 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: opened socket in IDE prevents script changes
Thanks Alex for your quick response. I'll try with 9.6.1 on Mac. The only other difference between us is that my sockets are interacting with a process outside of LC. But I can't see why that would make a difference (particularly once I've closed all sockets, I wouldn't expect sockets to interfere with scripts being changed). Regards, Bernard On Fri, Jan 15, 2021 at 12:07 PM Alex Tweedly via use-livecode < use-livecode@lists.runrev.com> wrote: > I've not seen any such problems - though with 9.6.1 / Mac. > > I've spent most of the last week in the IDE, with two or more stacks > open (one server, one client - occasionally multiple client stacks) so I > have multiple open sockets (both 'accept'ing and 'open'ed) almost all > the time, and had no problems with IDE or script editor. > > (I know - that's no consolation, but I thought I'd mention it in case > 9.6.1 was an option for you and might just help:-) > > ___ 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: opened socket in IDE prevents script changes
I've not seen any such problems - though with 9.6.1 / Mac. I've spent most of the last week in the IDE, with two or more stacks open (one server, one client - occasionally multiple client stacks) so I have multiple open sockets (both 'accept'ing and 'open'ed) almost all the time, and had no problems with IDE or script editor. (I know - that's no consolation, but I thought I'd mention it in case 9.6.1 was an option for you and might just help:-) Alex. On 15/01/2021 11:37, Bernard Devlin via use-livecode wrote: This is a strange phenomenon.I wonder if anyone else has seen this. Livecode 9.5.1 Windows 10. If a socket is opened then changes to scripts in the IDE are not applied/saved. There's no error message. It *appears* from the IDE that the changes are applied (i.e. the changes are visible in the script editor, the "apply" button indicates the script is no longer dirty). *Even if the socket is then closed and changes made this problem occurs.* There are also many crashes of the IDE in working on scripts involving sockets. It's because of these crashes that I realised changes are not applied. Once a socket has been opened/closed then in the IDE the stack cannot be closed/reopened without closing/reopening the entire IDE. Saving the stack from the message box also results in the (not really applied) changes being saved. Regards Bernard ___ 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
opened socket in IDE prevents script changes
This is a strange phenomenon.I wonder if anyone else has seen this. Livecode 9.5.1 Windows 10. If a socket is opened then changes to scripts in the IDE are not applied/saved. There's no error message. It *appears* from the IDE that the changes are applied (i.e. the changes are visible in the script editor, the "apply" button indicates the script is no longer dirty). *Even if the socket is then closed and changes made this problem occurs.* There are also many crashes of the IDE in working on scripts involving sockets. It's because of these crashes that I realised changes are not applied. Once a socket has been opened/closed then in the IDE the stack cannot be closed/reopened without closing/reopening the entire IDE. Saving the stack from the message box also results in the (not really applied) changes being saved. Regards Bernard ___ 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