I am trying to track down the source of a strange crash that is happening for a client. It is happening in a multiwindow application built with Xojo 2018 R2 (It can not be build with newer versions do to some dependency issues) running on OSX 10.14.3.
The problem does not seem seem to occur in a regular fashion, but it always coincides with a window being closed, however it is not always the same window or even same type of window. I added logging to the close events of windows to track execution, but the take down all completes and the close event ends without incidence. Then the app crashes. I have had the client send me the system crash reports and I see:
Based on those reports, its not a leak, looks more like a bad reference somewhere. I have checked to see if there is some background process or asynchronous type of call that is happening that would not be caught by Xojo’s UnhandledException event, but there is none.
Any ideas on how to further try to track this down?
Thank you
I did not write the code in question, I am looking through it.
Searching for “= nil” has not produced anything interesting. It does seem like a null reference is trying to be cleaned. As for more crash data:
[quote=428299:@Norman Palardy]I believe this is / was a bug in older versions where there was a possible “use after free” condition that has been remedied in newer versions
There is no workaround but to use a newer version since the code in question is in the framework itself[/quote]
Well that is good to know. It did seem like a framework issue to me…
Thank you for the information. I will work with them to try and remove their dependency on that version of Xojo…
It is nothing that can’t be undone, they rely heavily on graphics objects which they refer directly to from the built in property of a window and in later versions of Xojo those objects are no longer accessible.
In the future, is there a way capture an OSX system crash report programmatically so that users do not have to manually send them from the built in Mac crash dialogue?
For example, when someone reopens and app, have it figure out that is was not shut down properly and look for a crash report?
If it is a declares type of solution, what libraries might be the right ones to look at?
ah ok the infamous graphics object …
yeah that one bit a lot of folks
some times its easy to do something else & sometimes not
as for the Apple crash report thats captured out of process - not from the app itself
I dont know if there OS API’s that you can hook into to know one has been created
There may be
One thing to be aware of is that the Apple dialogs about “this app crashed last time you ran it” etc may happen before you ever get a chance to do anything
Yeah the timing and control of that whole process seems a bit complex… I didn’t know if someone had already looked into it or if folks request crash reports manually.
Not sure but i know for the IDE it has a linked in crash reporter that facilitate making the IDE file reports that could be useful
And its not the Apple one
After doing some looking around, on Mac at least, this seems possible.
Is there any way to access the symbol table from a Xojo build? It would be awesome to be able to symbolicate a system crash report. Sounds like a cool project too.
I know that if includefunctionnames is set to true, a xojo raised exception will be symbolicated, but the system report wont be. Is there any way to access that information from the IDE even? One could save it before a distribution and then symbolicate after the fact, similar to what XCode does.
The only symbols that would be present are from your Xojo code
Framework ones are deliberately stripped
And I know its been requested they be present but I doubt that will occur as I know why they were orignally stripped and those reasons still hold true today