How do I debug a no-message crash to desktop?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
How do I debug a no-message crash to desktop?
Livecode 9.0.0 Indy running on Windows 10.
1) In both the IDE and Windows Standalone I'm experiencing a no-message crash to desktop.
2) Through use of extensive logging I've narrowed the point at which my app terminates down to the single line -
Set the dgText[false] of group "DataGrid1" to Empty
3) However, I never experience a crash the 1st time that this line is run. If I repeat EXACTLY the same actions, the crash will occur on the 2nd, or 3rd, or 10th, etc, time that I execute this line of code.
4) My logfile is recording the dgNumberOfLines of group "DataGrid1" immediately before DataGrid1 is set to empty. The dgNumberOfLines is returning the expected result. "12" to be precise
5) The only other clue that I've got, and it's out-rightly obscure, is that my PC's cooling fans fire up when executing the offending handlers. The cooling fans stay silent for all other parts of my app. LC seems to be doing something that requires a lot of ummppphhhh at this point.
I've got a huge amount of logging in place, and my app is executing all of the handlers that I'd expect in the order that I expect. It just gets to "Set the dgText[false] of group "DataGrid1" to Empty", then sometimes dies.
Any tips on how to debug a no-message crash to desktop would be much appreciated.
Thanks
Kim
1) In both the IDE and Windows Standalone I'm experiencing a no-message crash to desktop.
2) Through use of extensive logging I've narrowed the point at which my app terminates down to the single line -
Set the dgText[false] of group "DataGrid1" to Empty
3) However, I never experience a crash the 1st time that this line is run. If I repeat EXACTLY the same actions, the crash will occur on the 2nd, or 3rd, or 10th, etc, time that I execute this line of code.
4) My logfile is recording the dgNumberOfLines of group "DataGrid1" immediately before DataGrid1 is set to empty. The dgNumberOfLines is returning the expected result. "12" to be precise
5) The only other clue that I've got, and it's out-rightly obscure, is that my PC's cooling fans fire up when executing the offending handlers. The cooling fans stay silent for all other parts of my app. LC seems to be doing something that requires a lot of ummppphhhh at this point.
I've got a huge amount of logging in place, and my app is executing all of the handlers that I'd expect in the order that I expect. It just gets to "Set the dgText[false] of group "DataGrid1" to Empty", then sometimes dies.
Any tips on how to debug a no-message crash to desktop would be much appreciated.
Thanks
Kim
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: How do I debug a no-message crash to desktop?
This may help:
http://fourthworld.net/lc/4wLogger.livecode.zip
It's a logging tool that will dump a rather verbose log to you desktop. After the crash, open the log and you can at least see the last thing that happened before the crash.
Please let us know what you find. LC should never crash, so once we pin this down we can submit a bug report.
Thanks -
http://fourthworld.net/lc/4wLogger.livecode.zip
It's a logging tool that will dump a rather verbose log to you desktop. After the crash, open the log and you can at least see the last thing that happened before the crash.
Please let us know what you find. LC should never crash, so once we pin this down we can submit a bug report.
Thanks -
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: How do I debug a no-message crash to desktop?
Hypercard never crashed. LC is pretty good, but I have had crashes here and there forever.LC should never crash
I have a stack right now that has been running fine for years, and it all of a sudden crashes LC if I try to open the SE for any control. Otherwise it works normally. I copied the two cards in that stack into a brand new stack, essentially recreating it on the fly. The new stack is solid. I threw away the old one.
Craig
Re: How do I debug a no-message crash to desktop?
Hi Richard and Craig
Thanks for replying. I agree that crashes to desktop are very rare in LC. This is the only repeatable CTD that I've had in the past 12 months or so.
I've trimmed my stack down to the still-crashing minimum. This is attached. This stack has crashed to desktop (from the IDE) about 5 times for me in the past 30 minutes. I don't know why, but sometimes it takes ages to get the same stack to CTD, but once it starts it then happens all of the time. Very odd.
I haven't tried this stack as a standalone, but its parent crashes to desktop as both IDE and standalone.
I've also attached the 4W logfile for a crash-to-desktop that I had with this stack. The last messaged logged is -
_table.DeleteDataControls
I can easily re-code to avoid using the problematic Set the dgText command. With the benefit of hindsight, after a cancel operation the contents of the data grid should not change, so I don't need to repopulate the datagrid. DOH! But, if my incompetence has uncovered a bug in LC then it would be good to have both fixed.
Regards
Kim
Thanks for replying. I agree that crashes to desktop are very rare in LC. This is the only repeatable CTD that I've had in the past 12 months or so.
I've trimmed my stack down to the still-crashing minimum. This is attached. This stack has crashed to desktop (from the IDE) about 5 times for me in the past 30 minutes. I don't know why, but sometimes it takes ages to get the same stack to CTD, but once it starts it then happens all of the time. Very odd.
I haven't tried this stack as a standalone, but its parent crashes to desktop as both IDE and standalone.
I've also attached the 4W logfile for a crash-to-desktop that I had with this stack. The last messaged logged is -
_table.DeleteDataControls
I can easily re-code to avoid using the problematic Set the dgText command. With the benefit of hindsight, after a cancel operation the contents of the data grid should not change, so I don't need to repopulate the datagrid. DOH! But, if my incompetence has uncovered a bug in LC then it would be good to have both fixed.
Regards
Kim
- Attachments
-
- 4W_LiveCodeDiagnosticTestLog_CRASHTODESKTOP.7z
- (32.41 KiB) Downloaded 146 times
-
- CrashToDesktop.7z
- (11.92 KiB) Downloaded 163 times
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: How do I debug a no-message crash to desktop?
Thanks for that info, Kim.
Is this issue reproducible with the latest build, v9.0.4rc3?
https://downloads.livecode.com/livecode/
They've been doing some work with memory management for that build, so if we're lucky the cause of this issue has already been addressed.
Is this issue reproducible with the latest build, v9.0.4rc3?
https://downloads.livecode.com/livecode/
They've been doing some work with memory management for that build, so if we're lucky the cause of this issue has already been addressed.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: How do I debug a no-message crash to desktop?
Yes, it crashes.
LC Indy 8.1.10
and
LC Indy 9.0.4 rc 2
Windows 8.1
Your code... is rather strange.
What's the point to have on the card "update" a preopencard hander.
And :
and then on card "autoreturn" to have :
LC Indy 8.1.10
and
LC Indy 9.0.4 rc 2
Windows 8.1
Your code... is rather strange.
What's the point to have on the card "update" a preopencard hander.
And :
Code: Select all
go cd "autoreturn"
Code: Select all
On PreOpenCard
Logevent "Always", ggLogfile, "Card AutoReturn > PreOpenCard"
Go to card "Update"
end PreOpenCard
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: How do I debug a no-message crash to desktop?
Hello all,
We can reproduce the crash using the sample stack.
Filed this report so as we can track progress on this issue:
https://quality.livecode.com/show_bug.cgi?id=22044
Regards,
Panos
--
We can reproduce the crash using the sample stack.
Filed this report so as we can track progress on this issue:
https://quality.livecode.com/show_bug.cgi?id=22044
Regards,
Panos
--
Re: How do I debug a no-message crash to desktop?
Thanks all
My real stack is now working. It was only ever during a "cancel" operation that I was experiencing a CTD, and I re-wrote the cancel handler to avoid the un-necessary "Set the dgText". I haven't seen a CTD since.
Yes - the demo stack is "rather strange". This comes down to (1) this demo stack contains only 5% of the code in my "real" stack, and (2) pilot error. The short version is that, on a change to the source data for the data grid, my script re-opens the card instead of just re-populating the data grid. "Strange" - yes. Should result in a crash to desktop - probably not.
I wrote log files to ensure that I wasn't getting into an unexpected loop and I wasn't trying to perform a data grid operation while I was on "the wrong card". My interpretation of the logs is that my script is OK on both of these counts. Something else is going wrong. It seems to me that this might identify a specific area where the DG stack could be made more robust, but I don't have the skills to take this any further.
Thanks for the 4W logger. Nice!
Regards
Kim
My real stack is now working. It was only ever during a "cancel" operation that I was experiencing a CTD, and I re-wrote the cancel handler to avoid the un-necessary "Set the dgText". I haven't seen a CTD since.
Yes - the demo stack is "rather strange". This comes down to (1) this demo stack contains only 5% of the code in my "real" stack, and (2) pilot error. The short version is that, on a change to the source data for the data grid, my script re-opens the card instead of just re-populating the data grid. "Strange" - yes. Should result in a crash to desktop - probably not.
I wrote log files to ensure that I wasn't getting into an unexpected loop and I wasn't trying to perform a data grid operation while I was on "the wrong card". My interpretation of the logs is that my script is OK on both of these counts. Something else is going wrong. It seems to me that this might identify a specific area where the DG stack could be made more robust, but I don't have the skills to take this any further.
Thanks for the 4W logger. Nice!
Regards
Kim
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: How do I debug a no-message crash to desktop?
Thanks for filing that report, Panos. I look forward to learning the cause.LiveCode_Panos wrote: ↑Wed May 08, 2019 2:07 pmHello all,
We can reproduce the crash using the sample stack.
Filed this report so as we can track progress on this issue:
https://quality.livecode.com/show_bug.cgi?id=22044
Regards,
Panos
--
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn