Hi Fred,

On 08/03/18 19:44, Fred Kiefer wrote:
Am 03.08.2018 um 19:01 schrieb Fred Kiefer<fredkie...@gmx.de>:

To work around this issue with the application icon, I could add a bit of code 
to gui that does lazy evaluation of this icon. But most likely you will still 
get an error, just a bit later.
Just committed that change. Please give it a try.

as you supposed no improvement. Below the new stack trace.
To sum up, on NetBSD 8.9 x86 with gcc. Before your change I had a crash, but disabling optimizations, no crash!

Here with optimization and your latest changes:
#0  0xb85f4638 in objc_msg_lookup () from /usr/lib/libobjc.so.4
#1  0xb8bbd605 in -[NSApplication setApplicationIconImage:] (
    self=0xb8bba732 <-[NSApplication(Private) _loadAppIconImage]+577>, _cmd=0xb5a15330,
    anImage=0xb8e8f638 <_OBJC_SELECTOR_TABLE+3256>) at NSApplication.m:2389
#2  0xb8e8f630 in _OBJC_SELECTOR_TABLE () from /System/Library/Libraries/libgnustep-gui.so.0.26.2 #3  0xb8bba732 in -[NSApplication(Private) _loadAppIconImage] (self=0xb5a15330, _cmd=0xb8e8f388 <_OBJC_SELECTOR_TABLE+2568>)
    at NSApplication.m:3836
#4  0xb8bb8c96 in -[NSApplication applicationIconImage] (self=0xb5a15330, _cmd=0xb58f7858 <_OBJC_SELECTOR_TABLE+1240>)
    at NSApplication.m:2423
#5  0xb58c0054 in -[XGServer(WindowOps) _createAppIconPixmaps] (self=0xb5bf1410, _cmd=0xb58f7928 <_OBJC_SELECTOR_TABLE+1448>)
    at XGServerWindow.m:2700
#6  0xb58bcc20 in -[XGServer(WindowOps) orderwindow:::] (self=0xb5bf1410, _cmd=0xb58f7778 <_OBJC_SELECTOR_TABLE+1016>, op=0,
    otherWin=-1, winNum=1) at XGServerWindow.m:2785
#7  0xb58ba6d6 in -[XGServer(WindowOps) _setupRootWindow] (self=0xb5bf1410, _cmd=0xb58f62c8 <_OBJC_SELECTOR_TABLE+200>)
    at XGServerWindow.m:1609
#8  0xb58af41d in -[XGServer _initXContext] (self=0xb5bf1410, _cmd=0xb58f62f0 <_OBJC_SELECTOR_TABLE+240>) at XGServer.m:464 #9  0xb58ae945 in -[XGServer initWithAttributes:] (self=0xb5bf1410, _cmd=0xb8f58788 <_OBJC_SELECTOR_TABLE+72>, info=0x0)
    at XGServer.m:477
#10 0xb8d6bdd0 in +[GSDisplayServer serverWithAttributes:] (self=0xb8f58900 <_OBJC_Class_GSDisplayServer>,     _cmd=0xb8e8f008 <_OBJC_SELECTOR_TABLE+1672>, attributes=0x0) at GSDisplayServer.m:187 #11 0xb8bc3968 in -[NSApplication _init] (self=0xb5a15330, _cmd=0xb8e8f060 <_OBJC_SELECTOR_TABLE+1760>) at NSApplication.m:885 #12 0xb87c4c16 in -[NSObject performSelector:withObject:] (self=0xb5a15330, _cmd=0xb8aa5138 <_OBJC_SELECTOR_TABLE+280>,     aSelector=0xb8e8f060 <_OBJC_SELECTOR_TABLE+1760>, anObject=0xb5a15330) at NSObject.m:2009 #13 0xb883740a in -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] (     self=0xb5a15330, _cmd=0xb8aa5240 <_OBJC_SELECTOR_TABLE+544>, aSelector=0xb8e8f060 <_OBJC_SELECTOR_TABLE+1760>,     aThread=<optimized out>, anObject=0xb5a15330, aFlag=1 '\001', anArray=0xb5a73a10) at NSThread.m:2136 #14 0xb8832c68 in -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:modes:] (     self=self@entry=0xb5a15330, _cmd=_cmd@entry=0xb8aa5248 <_OBJC_SELECTOR_TABLE+552>,     aSelector=aSelector@entry=0xb8e8f060 <_OBJC_SELECTOR_TABLE+1760>, anObject=anObject@entry=0xb5a15330,
    aFlag=aFlag@entry=1 '\001', anArray=0xb5a73a10) at NSThread.m:2095
#15 0xb8835272 in -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] (     self=0xb5a15330, _cmd=0xb8e8f068 <_OBJC_SELECTOR_TABLE+1768>, aSelector=0xb8e8f060 <_OBJC_SELECTOR_TABLE+1760>,
    anObject=0xb5a15330, aFlag=1 '\001') at NSThread.m:2105

(gdb) p anImage
$1 = (struct NSImage *) 0xb8e8f638 <_OBJC_SELECTOR_TABLE+3256>
(gdb) p *anImage
$2 = {{isa = 0x1d006b}, _name = 0xb8e8be84 <_OBJC_METH_VAR_TYPE_0>, _fileName = 0x16009c, _size = {width = -0.000110969879,     height = 1.92876542e-39}, _flags = {archiveByName = 0, scalable = 0, dataRetained = 0, flipDraw = 0,     sizeWasExplicitlySet = 0, useEPSOnResolutionMismatch = 1, colorMatchPreferred = 0, multipleResolutionMatching = 0,     cacheSeparately = 0, unboundedCacheDepth = 0, syncLoad = 0}, _reps = 0xa006e,   _color = 0xb8e8b7e0 <_OBJC_METH_VAR_TYPE_437>, _lockedView = 0x120094, _delegate = 0xb8e8be7c <_OBJC_METH_VAR_TYPE_1>,
  _cacheMode = 1704046}
(gdb) p _app_icon


so now it is "worse" it is not even printable as address, cannot check the contents of _app_icon


Riccardo
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to