I’ve just received a bit more log info from a user where we are witnessing the CoreGraphics crash:
Jan 26 10:42:16 Henks-Mac-Pro BRU PE[664]: BRU PE(664,0xa9b361c0) malloc: *** mach_vm_map(size=1048576) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Jan 26 10:42:17 Henks-Mac-Pro BRU PE[664]: assertion failed: 17D47: libxpc.dylib + 41236 [CD44097B-4B65-3F75-AB7F-52228229FFB5]: 0x3
Jan 26 10:42:18 --- last message repeated 10 times ---
Jan 26 10:42:18 Henks-Mac-Pro BRU PE[664]: BRU PE(664,0xb071e000) malloc: *** mach_vm_map(size=1048576) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Jan 26 10:42:18 Henks-Mac-Pro com.apple.xpc.launchd[1] (com.tolisgroup.bru-pe.16416[664]): Service exited due to signal: Segmentation fault: 11 sent by exc handler[0]
Since we don’t call libxpc from within our code, this must either be a Xojo or MBS plugin call.
@Christian Schmitz - could this be part of the Icon handling in MBS?
I understand that, but the crash is occurring while manipulating icons and I use the MBS iconfamily stuff for that.
I also don’t use any difert memory allocation within my code. Any mallocs occurring are either occuring within Xojo’s Framework or the MBS plugin parts.
64bit?
There are still hard-to-track graphics crashes on MacOS
Any chance that the images being handled do not have a width divisible by 4, for example?
Already went there, but this is a 32bit compile. I do have some 22x22 images and I ask for 22x22 icons from the MBS IconMBS calls (for the Listbox rows).
Maybe I’ll try dropping those to 16x16 or go up to 24x24.
[quote=371023:@Jeff Tullin]Are you using IconImageMBS( size) ?
I cannot recall why now, but I have a documented code change where I chose to stop using that myself in 2014[/quote]
Yes - that’s exactly what I’m using. I used the MacOSLib icon stuff for a while, but MBS gives me both Windows and Mac OS in one call.
And the resulting image on 10.13 looks like this (when it doesn’t crash):
IIt’s totally clean on 10.11 and earlier (I don’t have a 10.12 system at the moment).
I’m going to have to test all of this Monday morning. Thanks for digging into the crashes and soloing out the problem, Tim. I’m currently using FolderItem.IconMBS(width as Integer, WindowsFlags) as Picture to get a picture of the file icon. Super fun…
So far, 8 tests that had been crashing with the CoreGraphihcs traceback seem to be sorted - BUT … I’m not sure if that’s due to changing to Trixie’s method, or of making sure all of my icon requests were multiple of 4 in size.
So, between adding the Terminate declare to App.CancelClose, Shifting to images that are multiples of 4 in w*h, and moving to Trixie’s method for drawing the icons, I’m in a pretty good place today with regard to 10.13.