Crash on app start due to icon

classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Crash on app start due to icon

Riccardo Mottola-5
Hi,

after having upgraded base, gui, back on Ubuntu I observe the followiing
crash when any GUI app is started.
I am running windowmaker.

This smells to be related to the "app icon fix".given the trace below
calling the new method.

Riccardo

Program received signal SIGSEGV, Segmentation fault.
0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
     _cmd=0x81ba588, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
     at NSApplication.m:2392
2392      imageSize = [_app_icon size];
(gdb)

#0  0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
     _cmd=0x81ba588, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
     at NSApplication.m:2392
#1  0xb7ed3230 in _OBJC_SELECTOR_TABLE ()
    from /System/Library/Libraries/libgnustep-gui.so.0.26
#2  0xb7b384f7 in -[NSApplication(Private) _loadAppIconImage]
(self=0x81ba588,
     _cmd=0xb7ed2c08 <_OBJC_SELECTOR_TABLE+1672>) at NSApplication.m:3834
#3  0xb7b40c31 in -[NSApplication _init] (self=0x81ba588,
     _cmd=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>) at NSApplication.m:885
#4  0xb76a51ea in -[NSObject performSelector:withObject:] (self=0x81ba588,
     _cmd=0xb7a24af8 <_OBJC_SELECTOR_TABLE+280>,
     aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>, anObject=0x81ba588)
     at NSObject.m:2009
#5  0xb7711a43 in -[NSObject(NSThreadPerformAdditions)
performSelector:onThread:withObject:waitUntilDone:modes:] (self=0x81ba588,
     _cmd=0xb7a24c00 <_OBJC_SELECTOR_TABLE+544>,
     aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>,
aThread=<optimized out>,
     anObject=0x81ba588, aFlag=1 '\001', anArray=0x81a9b20) at
NSThread.m:2136
#6  0xb770d4c3 in -[NSObject(NSThreadPerformAdditions)
performSelectorOnMainThread:withObject:waitUntilDone:modes:]
(self=0x81ba588,
     _cmd=0xb7a24c08 <_OBJC_SELECTOR_TABLE+552>,
     aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>, anObject=0x81ba588,


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Richard Frith-Macdonald-7
> On 1 Aug 2018, at 07:41, Riccardo Mottola <[hidden email]> wrote:
>
> Hi,
>
> after having upgraded base, gui, back on Ubuntu I observe the followiing crash when any GUI app is started.
> I am running windowmaker.
>
> This smells to be related to the "app icon fix".given the trace below calling the new method.
>
> Riccardo
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
>    self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
>    _cmd=0x81ba588, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
>    at NSApplication.m:2392

Of course my situation is probably wildly different, but when I read this email I checked Ink.app with the latest base from git, then with the latest gui, then with the latest back.
After each update from git Ink.app started up normally.
So at least on my system (CentOS-7, 64bit) the x11/cairo backend seems to be OK.
_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Riccardo Mottola-5
Richard Frith-Macdonald wrote:
>> Program received signal SIGSEGV, Segmentation fault.
>> 0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
>>     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
>>     _cmd=0x81ba588, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
>>     at NSApplication.m:2392
> Of course my situation is probably wildly different, but when I read this email I checked Ink.app with the latest base from git, then with the latest gui, then with the latest back.
> After each update from git Ink.app started up normally.
> So at least on my system (CentOS-7, 64bit) the x11/cairo backend seems to be OK.

I can reproduce this on 3 systems.
When I revert the two commits by Gregory about icons, things works
again. So I am sure that they cause the issue, although not exactly what
is wrong.

Riccardo

_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Wolfgang Lux
In reply to this post by Riccardo Mottola-5
Hi Riccardo,

> Program received signal SIGSEGV, Segmentation fault.
> 0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
>     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
>     _cmd=0x81ba588, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
>     at NSApplication.m:2392
> 2392      imageSize = [_app_icon size];
> (gdb)
>
> #0  0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
>     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
>     _cmd=0x81ba588, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
>     at NSApplication.m:2392
> #1  0xb7ed3230 in _OBJC_SELECTOR_TABLE ()
>    from /System/Library/Libraries/libgnustep-gui.so.0.26
> #2  0xb7b384f7 in -[NSApplication(Private) _loadAppIconImage] (self=0x81ba588,
>     _cmd=0xb7ed2c08 <_OBJC_SELECTOR_TABLE+1672>) at NSApplication.m:3834
> #3  0xb7b40c31 in -[NSApplication _init] (self=0x81ba588,

This stack trace looks fairly weird to me; it seems like the debug info does not match the code. This reminds me of situations where my programs got linked to two different versions of a GNUstep library (a newer one used directly from the application and an older one linked indirectly from some library/bundle that I forgot to recompile). You might check using
  info sharedlibrary
from the gdb prompt and looking for more than one instance of libgnustep-gui.so in the list.

Wolfgang


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Gregory Casamento
I’ve been running all apps for nearly two weeks without a problem.   I will try to reproduce. 

On Wed, Aug 1, 2018 at 07:34 Wolfgang Lux <[hidden email]> wrote:
Hi Riccardo,

> Program received signal SIGSEGV, Segmentation fault.
> 0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
>     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
>     _cmd=0x81ba588, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
>     at NSApplication.m:2392
> 2392      imageSize = [_app_icon size];
> (gdb)
>
> #0  0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
>     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
>     _cmd=0x81ba588, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
>     at NSApplication.m:2392
> #1  0xb7ed3230 in _OBJC_SELECTOR_TABLE ()
>    from /System/Library/Libraries/libgnustep-gui.so.0.26
> #2  0xb7b384f7 in -[NSApplication(Private) _loadAppIconImage] (self=0x81ba588,
>     _cmd=0xb7ed2c08 <_OBJC_SELECTOR_TABLE+1672>) at NSApplication.m:3834
> #3  0xb7b40c31 in -[NSApplication _init] (self=0x81ba588,

This stack trace looks fairly weird to me; it seems like the debug info does not match the code. This reminds me of situations where my programs got linked to two different versions of a GNUstep library (a newer one used directly from the application and an older one linked indirectly from some library/bundle that I forgot to recompile). You might check using
  info sharedlibrary
from the gdb prompt and looking for more than one instance of libgnustep-gui.so in the list.

Wolfgang


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
--
Gregory Casamento
GNUstep Lead Developer / OLC, Principal Consultant
http://www.gnustep.org - http://heronsperch.blogspot.com
http://ind.ie/phoenix/

_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Riccardo Mottola-5
In reply to this post by Riccardo Mottola-5
Hi,

On 2018-08-01 13:33:39 +0200 Wolfgang Lux <[hidden email]> wrote:

> Hi Riccardo,
>

>
> This stack trace looks fairly weird to me; it seems like the debug
> info does
> not match the code. This reminds me of situations where my programs
> got
> linked to two different versions of a GNUstep library (a newer one
> used
> directly from the application and an older one linked indirectly from
> some
> library/bundle that I forgot to recompile). You might check using
>   info sharedlibrary
> from the gdb prompt and looking for more than one instance of
> libgnustep-gui.so in the list.

It is indeed strange, I saw that too.. however the problem is quite
reproducable. I will clean & check on this system (Debian)
I got this trace from another computer (Gentoo)

It is clearly "corrupted". I guess that the _app_icon is invalid.

Program received signal SIGSEGV, Segmentation fault.
0xb7b356a2 in -[NSApplication setApplicationIconImage:] (
     self=0xb7b329d3 <-[NSApplication(Private) _loadAppIconImage]+483>,
_cmd=0x537200,
     anImage=0xb7ece238 <_OBJC_SELECTOR_TABLE+3256>) at NSApplication.m:2392
2392      imageSize = [_app_icon size];


(gdb) bt
#0  0xb7b356a2 in -[NSApplication setApplicationIconImage:] (
     self=0xb7b329d3 <-[NSApplication(Private) _loadAppIconImage]+483>,
_cmd=0x537200,
     anImage=0xb7ece238 <_OBJC_SELECTOR_TABLE+3256>) at NSApplication.m:2392
#1  0x005ac9d0 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)


(gdb) p _app_icon
$1 = (struct NSImage *) 0x2474ff55

(gdb) po _app_icon
Cannot access memory at address 0x2474ff55


If I back out exactly the two commits from Gregory, Ink (as well as
other apps, I'm using Ink only for simplicity) starts again.

Riccardo


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Riccardo Mottola-5
In reply to this post by Wolfgang Lux
Hi,

Wolfgang Lux wrote:
> This stack trace looks fairly weird to me; it seems like the debug info does not match the code. This reminds me of situations where my programs got linked to two different versions of a GNUstep library (a newer one used directly from the application and an older one linked indirectly from some library/bundle that I forgot to recompile). You might check using
>    info sharedlibrary
> from the gdb prompt and looking for more than one instance of libgnustep-gui.so in the list.

the gentoo stack was a bit short.
I cleaned debian and now get a similar trace. I had an older version of
GUI installed (older number shouldn't matter, but it did) so here it is,
now the code lines do match.

Program received signal SIGSEGV, Segmentation fault.
0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
     _cmd=0x8128a88, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
     at NSApplication.m:2392
2392      imageSize = [_app_icon size];

#0  0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
     _cmd=0x8128a88, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
     at NSApplication.m:2392
#1  0xb7ed3230 in _OBJC_SELECTOR_TABLE ()
    from /System/Library/Libraries/libgnustep-gui.so.0.26
#2  0xb7b384f7 in -[NSApplication(Private) _loadAppIconImage]
(self=0x8128a88,
     _cmd=0xb7ed2c08 <_OBJC_SELECTOR_TABLE+1672>) at NSApplication.m:3834
#3  0xb7b40c31 in -[NSApplication _init] (self=0x8128a88,
     _cmd=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>) at NSApplication.m:885
#4  0xb76a51ea in -[NSObject performSelector:withObject:] (self=0x8128a88,
     _cmd=0xb7a24af8 <_OBJC_SELECTOR_TABLE+280>,
     aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>, anObject=0x8128a88)
     at NSObject.m:2009
#5  0xb7711a43 in -[NSObject(NSThreadPerformAdditions)
performSelector:onThread:withObject:waitUntilDone:modes:] (self=0x8128a88,
     _cmd=0xb7a24c00 <_OBJC_SELECTOR_TABLE+544>,
     aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>,
aThread=<optimized out>,
     anObject=0x8128a88, aFlag=1 '\001', anArray=0x81ba818) at
NSThread.m:2136
#6  0xb770d4c3 in -[NSObject(NSThreadPerformAdditions)
performSelectorOnMainThread:withObject:waitUntilDone:modes:]
(self=0x8128a88,
     _cmd=0xb7a24c08 <_OBJC_SELECTOR_TABLE+552>,
     aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>, anObject=0x8128a88,
     aFlag=1 '\001', anArray=0x81ba818) at NSThread.m:2095
#7  0xb770fb77 in -[NSObject(NSThreadPerformAdditions)
performSelectorOnMainThread:withObject:waitUntilDone:] (self=0x8128a88,
     _cmd=0xb7ed2c70 <_OBJC_SELECTOR_TABLE+1776>,
     aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>, anObject=0x8128a88,
     aFlag=1 '\001') at NSThread.m:2105
#8  0xb7b3f68e in -[NSApplication init] (self=0x8128a88,
     _cmd=0xb7ed29d0 <_OBJC_SELECTOR_TABLE+1104>) at NSApplication.m:984
#9  0xb7b36580 in +[NSApplication sharedApplication] (
     self=0xb7ed35c0 <_OBJC_Class_NSApplication>,
     _cmd=0xb7ec73c8 <_OBJC_SELECTOR_TABLE+872>) at NSApplication.m:851
#10 0xb7b1e972 in NSApplicationMain (argc=1, argv=0xbffff444) at
Functions.m:78
#11 0x08048da7 in main (argc=1, argv=0xbffff444, env=0xbffff44c) at
main.m:33

(gdb) p _app_icon
$1 = (struct NSImage *) 0x548b0cc4
(gdb) po _app_icon
Cannot access memory at address 0x548b0cc4

a situation similar to the Gentoo box.
I have this failing on Gentoo, Ubuntu, Solaris 10 however it works on my
FreeBSD box. The former are all GCC builds, the working one is GCC and
64bit amd64. But I don't think if this is relevant

Riccardo

_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Fred Kiefer
This is really weird. Could it be that a theme is causing this? If not I would as always suggest to run the program under valgrind to see what is the real cause of the issue. You could also try to output the variable „anImage“ instead of „_app_icon“ and try to inspect that with the command „p *anImage“.

We could try to make the image loading lazy, which would move it back a bit again. But first we should try to understand what is going on on your machines and why this is only happening there.

> Am 01.08.2018 um 23:12 schrieb Riccardo Mottola <[hidden email]>:
>
> Wolfgang Lux wrote:
>> This stack trace looks fairly weird to me; it seems like the debug info does not match the code. This reminds me of situations where my programs got linked to two different versions of a GNUstep library (a newer one used directly from the application and an older one linked indirectly from some library/bundle that I forgot to recompile). You might check using
>>   info sharedlibrary
>> from the gdb prompt and looking for more than one instance of libgnustep-gui.so in the list.
>
> the gentoo stack was a bit short.
> I cleaned debian and now get a similar trace. I had an older version of GUI installed (older number shouldn't matter, but it did) so here it is, now the code lines do match.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
>    self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
>    _cmd=0x8128a88, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
>    at NSApplication.m:2392
> 2392      imageSize = [_app_icon size];
>
> #0  0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
>    self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
>    _cmd=0x8128a88, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
>    at NSApplication.m:2392
> #1  0xb7ed3230 in _OBJC_SELECTOR_TABLE ()
>   from /System/Library/Libraries/libgnustep-gui.so.0.26
> #2  0xb7b384f7 in -[NSApplication(Private) _loadAppIconImage] (self=0x8128a88,
>    _cmd=0xb7ed2c08 <_OBJC_SELECTOR_TABLE+1672>) at NSApplication.m:3834
> #3  0xb7b40c31 in -[NSApplication _init] (self=0x8128a88,
>    _cmd=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>) at NSApplication.m:885
> #4  0xb76a51ea in -[NSObject performSelector:withObject:] (self=0x8128a88,
>    _cmd=0xb7a24af8 <_OBJC_SELECTOR_TABLE+280>,
>    aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>, anObject=0x8128a88)
>    at NSObject.m:2009
> #5  0xb7711a43 in -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] (self=0x8128a88,
>    _cmd=0xb7a24c00 <_OBJC_SELECTOR_TABLE+544>,
>    aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>, aThread=<optimized out>,
>    anObject=0x8128a88, aFlag=1 '\001', anArray=0x81ba818) at NSThread.m:2136
> #6  0xb770d4c3 in -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:modes:] (self=0x8128a88,
>    _cmd=0xb7a24c08 <_OBJC_SELECTOR_TABLE+552>,
>    aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>, anObject=0x8128a88,
>    aFlag=1 '\001', anArray=0x81ba818) at NSThread.m:2095
> #7  0xb770fb77 in -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] (self=0x8128a88,
>    _cmd=0xb7ed2c70 <_OBJC_SELECTOR_TABLE+1776>,
>    aSelector=0xb7ed2c68 <_OBJC_SELECTOR_TABLE+1768>, anObject=0x8128a88,
>    aFlag=1 '\001') at NSThread.m:2105
> #8  0xb7b3f68e in -[NSApplication init] (self=0x8128a88,
>    _cmd=0xb7ed29d0 <_OBJC_SELECTOR_TABLE+1104>) at NSApplication.m:984
> #9  0xb7b36580 in +[NSApplication sharedApplication] (
>    self=0xb7ed35c0 <_OBJC_Class_NSApplication>,
>    _cmd=0xb7ec73c8 <_OBJC_SELECTOR_TABLE+872>) at NSApplication.m:851
> #10 0xb7b1e972 in NSApplicationMain (argc=1, argv=0xbffff444) at Functions.m:78
> #11 0x08048da7 in main (argc=1, argv=0xbffff444, env=0xbffff44c) at main.m:33
>
> (gdb) p _app_icon
> $1 = (struct NSImage *) 0x548b0cc4
> (gdb) po _app_icon
> Cannot access memory at address 0x548b0cc4
>
> a situation similar to the Gentoo box.
> I have this failing on Gentoo, Ubuntu, Solaris 10 however it works on my FreeBSD box. The former are all GCC builds, the working one is GCC and 64bit amd64. But I don't think if this is relevant
>
> Riccardo
>
> _______________________________________________
> Discuss-gnustep mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Riccardo Mottola-5
Hi,Fred,


Fred Kiefer wrote:
> This is really weird. Could it be that a theme is causing this? If not I would as always suggest to run the program under valgrind to see what is the real cause of the issue. You could also try to output the variable „anImage“ instead of „_app_icon“ and try to inspect that with the command „p *anImage“.
>
> We could try to make the image loading lazy, which would move it back a bit again. But first we should try to understand what is going on on your machines and why this is only happening there.
I wonder that only I do see this... It actually happens on most my
machines... the only one(s) where not are the FeeBSD+Clang ones (can't
get GCC work on FreeBSD yet due to libobjc2 issues, so I cannot verify
that factor)


Program received signal SIGSEGV, Segmentation fault.
0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
     _cmd=0x81ba670, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
     at NSApplication.m:2392
2392      imageSize = [_app_icon size];
(gdb) p _app_icon
$1 = (struct NSImage *) 0x548b0cc4
(gdb) p anImage
$2 = (struct NSImage *) 0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>
(gdb) po anImage

Program received signal SIGSEGV, Segmentation fault.
0xb74d3f36 in objc_msg_lookup () from /usr/lib/i386-linux-gnu/libobjc.so.4
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(_NSPrintForDebugger) will be abandoned.
When the function is done executing, GDB will silently stop.

so.... I restarted and retried:

(gdb) p anImage
$3 = (struct NSImage *) 0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>
(gdb) p *anImage
$4 = {{isa = 0x140076}, _name = 0xb7ecfa84 <_OBJC_METH_VAR_TYPE_0>,
   _fileName = 0x150076, _size = {width = -2.82472465e-05,
     height = 2.02054627e-39}, _flags = {archiveByName = 0, scalable = 0,
     dataRetained = 0, flipDraw = 0, sizeWasExplicitlySet = 0,
     useEPSOnResolutionMismatch = 1, colorMatchPreferred = 0,
     multipleResolutionMatching = 0, cacheSeparately = 0,
     unboundedCacheDepth = 0, syncLoad = 1}, _reps = 0x5006e,
   _color = 0xb7ecf3e0 <_OBJC_METH_VAR_TYPE_437>, _lockedView = 0x170076,
   _delegate = 0xb7ecfa84 <_OBJC_METH_VAR_TYPE_0>, _cacheMode = 1769539}


it has a ridiculous size I'd say?

but...

(gdb) p anImage->_fileName
$5 = (struct NSString *) 0x150076
(gdb) po anImage->_fileName
Cannot access memory at address 0x150076

(gdb) p anImage->_name
$6 = (struct NSString *) 0xb7ecfa84 <_OBJC_METH_VAR_TYPE_0>
(gdb) po anImage->_name

Program received signal SIGSEGV, Segmentation fault.
0xb74d3f36 in objc_msg_lookup () from /usr/lib/i386-linux-gnu/libobjc.so.4
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(_NSPrintForDebugger) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb)



_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Riccardo Mottola-5
Hi,

I was just finished updating my NetBSD laptop (8.0 is out) and
rebuilding all packages, so everything is clean, then I rebuilt GNUstep too!

Here it also crashes! making the bug very reproducable across platforms.
Here the trace is similar:
Program received signal SIGSEGV, Segmentation fault.
0xade46638 in objc_msg_lookup () from /usr/lib/libobjc.so.4
(gdb) bt
#0  0xade46638 in objc_msg_lookup () from /usr/lib/libobjc.so.4
#1  0xae40f5b5 in -[NSApplication setApplicationIconImage:]
(self=0xae40c6e2 <-[NSApplication(Private) _loadAppIconImage]+577>,
_cmd=0xab2172c0,
     anImage=0xae6e1638 <_OBJC_SELECTOR_TABLE+3256>) at NSApplication.m:2392
#2  0xae6e1630 in _OBJC_SELECTOR_TABLE () from
/System/Library/Libraries/libgnustep-gui.so.0.26.2
#3  0xae40c6e2 in -[NSApplication(Private) _loadAppIconImage]
(self=0xab2172c0, _cmd=0xae6e1008 <_OBJC_SELECTOR_TABLE+1672>) at
NSApplication.m:3834
#4  0xae4158d8 in -[NSApplication _init] (self=0xab2172c0,
_cmd=0xae6e1068 <_OBJC_SELECTOR_TABLE+1768>) at NSApplication.m:885
#5  0xae016c16 in -[NSObject performSelector:withObject:]
(self=0xab2172c0, _cmd=0xae2f7138 <_OBJC_SELECTOR_TABLE+280>,
     aSelector=0xae6e1068 <_OBJC_SELECTOR_TABLE+1768>,
anObject=0xab2172c0) at NSObject.m:2009
#6  0xae08940a in -[NSObject(NSThreadPerformAdditions)
performSelector:onThread:withObject:waitUntilDone:modes:] (self=0xab2172c0,
     _cmd=0xae2f7240 <_OBJC_SELECTOR_TABLE+544>, aSelector=0xae6e1068
<_OBJC_SELECTOR_TABLE+1768>, aThread=<optimized out>, anObject=0xab2172c0,
     aFlag=1 '\001', anArray=0xab2a3800) at NSThread.m:2136
#7  0xae084c68 in -[NSObject(NSThreadPerformAdditions)
performSelectorOnMainThread:withObject:waitUntilDone:modes:]
(self=self@entry=0xab2172c0,
     _cmd=_cmd@entry=0xae2f7248 <_OBJC_SELECTOR_TABLE+552>,
aSelector=aSelector@entry=0xae6e1068 <_OBJC_SELECTOR_TABLE+1768>,
     anObject=anObject@entry=0xab2172c0, aFlag=aFlag@entry=1 '\001',
anArray=0xab2a3800) at NSThread.m:2095
#8  0xae087272 in -[NSObject(NSThreadPerformAdditions)
performSelectorOnMainThread:withObject:waitUntilDone:] (self=0xab2172c0,
     _cmd=0xae6e1070 <_OBJC_SELECTOR_TABLE+1776>, aSelector=0xae6e1068
<_OBJC_SELECTOR_TABLE+1768>, anObject=0xab2172c0, aFlag=1 '\001') at
NSThread.m:2105
#9  0xae414115 in -[NSApplication init] (self=0xab2172c0,
_cmd=0xae6e0dd0 <_OBJC_SELECTOR_TABLE+1104>) at NSApplication.m:984
#10 0xae40a39e in +[NSApplication sharedApplication] (self=0xae6e19c0
<_OBJC_Class_NSApplication>, _cmd=0xae6d57c8 <_OBJC_SELECTOR_TABLE+872>)
     at NSApplication.m:851
#11 0xae3f0c60 in NSApplicationMain (argc=argc@entry=1,
argv=argv@entry=0xbfb1fe60) at Functions.m:78
#12 0x0804abef in gnustep_base_user_main (argc=1, argv=0xbfb1fe60) at
main.m:15
#13 0xae12da28 in main (argc=1, argv=0xbfb1fe60, env=0xbfb1fe68) at
NSProcessInfo.m:1002
#14 0x0804a614 in ___start ()
#15 0x0804a508 in _start ()


(gdb) p anImage
$1 = (struct NSImage *) 0xae6e1638 <_OBJC_SELECTOR_TABLE+3256>
(gdb) p *anImage
$2 = {{isa = 0x1d006b}, _name = 0xae6dde84 <_OBJC_METH_VAR_TYPE_0>,
_fileName = 0x16009c, _size = {width = -5.40798517e-11, 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 = 0xae6dd7e0 <_OBJC_METH_VAR_TYPE_437>, _lockedView =
0x1a006e, _delegate = 0xae6dde84 <_OBJC_METH_VAR_TYPE_0>, _cacheMode =
1507351}


I tried compiling in debug without optimization, and it works! This
hints even more at memory corruption, more than a retain issue.

Riccardo

_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Fred Kiefer
In reply to this post by Riccardo Mottola-5


> Am 03.08.2018 um 00:38 schrieb Riccardo Mottola <[hidden email]>:
> Fred Kiefer wrote:
>> This is really weird. Could it be that a theme is causing this? If not I would as always suggest to run the program under valgrind to see what is the real cause of the issue. You could also try to output the variable „anImage“ instead of „_app_icon“ and try to inspect that with the command „p *anImage“.
>>
>> We could try to make the image loading lazy, which would move it back a bit again. But first we should try to understand what is going on on your machines and why this is only happening there.
> I wonder that only I do see this... It actually happens on most my machines... the only one(s) where not are the FeeBSD+Clang ones (can't get GCC work on FreeBSD yet due to libobjc2 issues, so I cannot verify that factor)

Does this mean you only tested on clang systems? It could be a clang bug, which version of clang are you using?

> Program received signal SIGSEGV, Segmentation fault.
> 0xb7b3b1a6 in -[NSApplication setApplicationIconImage:] (
>     self=0xb7b384f7 <-[NSApplication(Private) _loadAppIconImage]+503>,
>     _cmd=0x81ba670, anImage=0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>)
>     at NSApplication.m:2392
> 2392      imageSize = [_app_icon size];
> (gdb) p _app_icon
> $1 = (struct NSImage *) 0x548b0cc4
> (gdb) p anImage
> $2 = (struct NSImage *) 0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>
> (gdb) po anImage
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xb74d3f36 in objc_msg_lookup () from /usr/lib/i386-linux-gnu/libobjc.so.4
> The program being debugged was signaled while in a function called from GDB.
> GDB remains in the frame where the signal was received.
> To change this behavior use "set unwindonsignal on".
> Evaluation of the expression containing the function
> (_NSPrintForDebugger) will be abandoned.
> When the function is done executing, GDB will silently stop.
>
> so.... I restarted and retried:
>
> (gdb) p anImage
> $3 = (struct NSImage *) 0xb7ed3238 <_OBJC_SELECTOR_TABLE+3256>
> (gdb) p *anImage
> $4 = {{isa = 0x140076}, _name = 0xb7ecfa84 <_OBJC_METH_VAR_TYPE_0>,
>   _fileName = 0x150076, _size = {width = -2.82472465e-05,
>     height = 2.02054627e-39}, _flags = {archiveByName = 0, scalable = 0,
>     dataRetained = 0, flipDraw = 0, sizeWasExplicitlySet = 0,
>     useEPSOnResolutionMismatch = 1, colorMatchPreferred = 0,
>     multipleResolutionMatching = 0, cacheSeparately = 0,
>     unboundedCacheDepth = 0, syncLoad = 1}, _reps = 0x5006e,
>   _color = 0xb7ecf3e0 <_OBJC_METH_VAR_TYPE_437>, _lockedView = 0x170076,
>   _delegate = 0xb7ecfa84 <_OBJC_METH_VAR_TYPE_0>, _cacheMode = 1769539}
>
>
> it has a ridiculous size I'd say?

No, this is just zero, which is the normal initial state for size. What is strange is that _lockedView is set. This should not be the case. Also the value looks very similar to the isa and the _fileName pointer. Could it be that clang or the library it uses does not clean up the memory for a new object? Or this is an artefact of the debugger.

As usual I would suggest to run the program under valgrind :-)

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.
_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Fred Kiefer


> Am 03.08.2018 um 19:01 schrieb Fred Kiefer <[hidden email]>:
>
> 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.
_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Josh Freeman
In reply to this post by Riccardo Mottola-5
Hi Riccardo,

    I couldn't reproduce this on a fresh Ubuntu 18.04.1 VM (GCC,  
WindowMaker, didn't enable debug). Do you have a build script?


On Aug 3, 2018, at 9:32 AM, Riccardo Mottola wrote:

> (gdb) p anImage
> $1 = (struct NSImage *) 0xae6e1638 <_OBJC_SELECTOR_TABLE+3256>

    Try checking _app_icon - that's where the crash occurs (calling  
[_app_icon size]), and _app_icon's not the same object as anImage  
(it's a copy).

Cheers,

Josh

_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Wolfgang Lux
In reply to this post by Riccardo Mottola-5
Hi Riccardo,

as everybody else I'm also unable to reproduce your issue on NetBSD 7.1.2 with the latest source (except for Fred's patch). So it's seems this is something peculiar with your setup. Do you have any themes installed? If so, can you install them and try again. Also, what is the output of
  info sharedlibrary
(you may abbreviate that to i sh) when the program crashes?

Wolfgang

>
> Hi,
>
> I was just finished updating my NetBSD laptop (8.0 is out) and rebuilding all packages, so everything is clean, then I rebuilt GNUstep too!
>
> Here it also crashes! making the bug very reproducable across platforms. Here the trace is similar:
> Program received signal SIGSEGV, Segmentation fault.
> 0xade46638 in objc_msg_lookup () from /usr/lib/libobjc.so.4
> (gdb) bt
> #0  0xade46638 in objc_msg_lookup () from /usr/lib/libobjc.so.4
> #1  0xae40f5b5 in -[NSApplication setApplicationIconImage:] (self=0xae40c6e2 <-[NSApplication(Private) _loadAppIconImage]+577>, _cmd=0xab2172c0,
>     anImage=0xae6e1638 <_OBJC_SELECTOR_TABLE+3256>) at NSApplication.m:2392
> #2  0xae6e1630 in _OBJC_SELECTOR_TABLE () from /System/Library/Libraries/libgnustep-gui.so.0.26.2
> #3  0xae40c6e2 in -[NSApplication(Private) _loadAppIconImage] (self=0xab2172c0, _cmd=0xae6e1008 <_OBJC_SELECTOR_TABLE+1672>) at NSApplication.m:3834
> #4  0xae4158d8 in -[NSApplication _init] (self=0xab2172c0, _cmd=0xae6e1068 <_OBJC_SELECTOR_TABLE+1768>) at NSApplication.m:885
> #5  0xae016c16 in -[NSObject performSelector:withObject:] (self=0xab2172c0, _cmd=0xae2f7138 <_OBJC_SELECTOR_TABLE+280>,
>     aSelector=0xae6e1068 <_OBJC_SELECTOR_TABLE+1768>, anObject=0xab2172c0) at NSObject.m:2009
> #6  0xae08940a in -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] (self=0xab2172c0,
>     _cmd=0xae2f7240 <_OBJC_SELECTOR_TABLE+544>, aSelector=0xae6e1068 <_OBJC_SELECTOR_TABLE+1768>, aThread=<optimized out>, anObject=0xab2172c0,
>     aFlag=1 '\001', anArray=0xab2a3800) at NSThread.m:2136
> #7  0xae084c68 in -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:modes:] (self=self@entry=0xab2172c0,
>     _cmd=_cmd@entry=0xae2f7248 <_OBJC_SELECTOR_TABLE+552>, aSelector=aSelector@entry=0xae6e1068 <_OBJC_SELECTOR_TABLE+1768>,
>     anObject=anObject@entry=0xab2172c0, aFlag=aFlag@entry=1 '\001', anArray=0xab2a3800) at NSThread.m:2095
> #8  0xae087272 in -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] (self=0xab2172c0,
>     _cmd=0xae6e1070 <_OBJC_SELECTOR_TABLE+1776>, aSelector=0xae6e1068 <_OBJC_SELECTOR_TABLE+1768>, anObject=0xab2172c0, aFlag=1 '\001') at NSThread.m:2105
> #9  0xae414115 in -[NSApplication init] (self=0xab2172c0, _cmd=0xae6e0dd0 <_OBJC_SELECTOR_TABLE+1104>) at NSApplication.m:984
> #10 0xae40a39e in +[NSApplication sharedApplication] (self=0xae6e19c0 <_OBJC_Class_NSApplication>, _cmd=0xae6d57c8 <_OBJC_SELECTOR_TABLE+872>)
>     at NSApplication.m:851
> #11 0xae3f0c60 in NSApplicationMain (argc=argc@entry=1, argv=argv@entry=0xbfb1fe60) at Functions.m:78
> #12 0x0804abef in gnustep_base_user_main (argc=1, argv=0xbfb1fe60) at main.m:15
> #13 0xae12da28 in main (argc=1, argv=0xbfb1fe60, env=0xbfb1fe68) at NSProcessInfo.m:1002
> #14 0x0804a614 in ___start ()
> #15 0x0804a508 in _start ()
>
>
> (gdb) p anImage
> $1 = (struct NSImage *) 0xae6e1638 <_OBJC_SELECTOR_TABLE+3256>
> (gdb) p *anImage
> $2 = {{isa = 0x1d006b}, _name = 0xae6dde84 <_OBJC_METH_VAR_TYPE_0>, _fileName = 0x16009c, _size = {width = -5.40798517e-11, 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 = 0xae6dd7e0 <_OBJC_METH_VAR_TYPE_437>, _lockedView = 0x1a006e, _delegate = 0xae6dde84 <_OBJC_METH_VAR_TYPE_0>, _cacheMode = 1507351}
>
>
> I tried compiling in debug without optimization, and it works! This hints even more at memory corruption, more than a retain issue.
>
> Riccardo
>
> _______________________________________________
> Discuss-gnustep mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Riccardo Mottola-5
In reply to this post by Fred Kiefer

Hi Fred,


On 08/03/18 19:44, Fred Kiefer wrote:

      
Am 03.08.2018 um 19:01 schrieb Fred Kiefer [hidden email]:

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
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Riccardo Mottola-5
In reply to this post by Fred Kiefer
Hi,


On 08/03/18 19:01, Fred Kiefer wrote:
> Does this mean you only tested on clang systems? It could be a clang bug, which version of clang areHi, you using?

No, I tested it on Linux (Ubuntu, Gentoo), NetBSD, Solaris and FreeBSD.
FreeBSD has Clang and there it works.
What I meant, is that it has base  configured with the "next-gen"
runtime and not gnu runtime, because libobjc2 has a bug and does not
work. I cannot test gcc on FreeBSD for that reason. Sorry for being unclear.

Currently it looks for me this way:
- gcc optimized (standard configure) crash
- gcc debug non optimized, works
- clang works

however, Gregory tested with gcc and works for him.


Riccardo

_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Riccardo Mottola-5
In reply to this post by Josh Freeman
Hi,


On 08/04/18 01:04, Josh Freeman wrote:
> I couldn't reproduce this on a fresh Ubuntu 18.04.1 VM (GCC,
> WindowMaker, didn't enable debug). Do you have a build script?
>

I run ubuntu 16 LTS.
I do not have a build script, but I configured everything "out of the
box" no options.. I can check, but I have not the laptop with me at hand.

>
> On Aug 3, 2018, at 9:32 AM, Riccardo Mottola wrote:
>
>> (gdb) p anImage
>> $1 = (struct NSImage *) 0xae6e1638 <_OBJC_SELECTOR_TABLE+3256>
>
>    Try checking _app_icon - that's where the crash occurs (calling
> [_app_icon size]), and _app_icon's not the same object as anImage
> (it's a copy).

as written in another mail, with the latest changes I cannot even print
the pointer address of it.

Riccardo

_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Riccardo Mottola-5
In reply to this post by Wolfgang Lux
Hi,


On 08/04/18 13:53, Wolfgang Lux wrote:
> as everybody else I'm also unable to reproduce your issue on NetBSD 7.1.2 with the latest source (except for Fred's patch). So it's seems this is something peculiar with your setup. Do you have any themes installed? If so, can you install them and try again. Also, what is the output of
>    info sharedlibrary
> (you may abbreviate that to i sh) when the program crashes?

this is a mystery: I get a crash on all my computers except the
FreeBSD/clang ones (both laptop and workstation).

On my NetBSD 8.0 I had themes installed, namely set was the tango theme:
imladris: {21} defaults read NSGlobalDomain GSTheme
NSGlobalDomain GSTheme Tango

this is a pure icon theme.

I removed all the themes and removed the GSTheme variable, to "clean"
everything, but I still get a crash.

I have these configuration settings.

Make:
   $ ./configure --prefix=/ --with-layout=gnustep

Base, Gui and Back: just configure with no arguments. Cairo is
installed, detected and used.

It is window-maker dependent (only there we have the icon dock). If I
quickly switch to plain twm, the application starts.

Riccardo


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Fred Kiefer
In reply to this post by Riccardo Mottola-5
Thank you for finally providing more of the environment conditions.

> Am 04.08.2018 um 22:51 schrieb Riccardo Mottola <[hidden email]>:
>
> On 08/03/18 19:01, Fred Kiefer wrote:
>> Does this mean you only tested on clang systems? It could be a clang bug, which version of clang areHi, you using?
>
> No, I tested it on Linux (Ubuntu, Gentoo), NetBSD, Solaris and FreeBSD.
> FreeBSD has Clang and there it works.
> What I meant, is that it has base  configured with the "next-gen" runtime and not gnu runtime, because libobjc2 has a bug and does not work. I cannot test gcc on FreeBSD for that reason. Sorry for being unclear.

I still don’t understand this sentence. The important bit is what is used on the broken systems? libobjc2 or the GNU libobjc that comes with gcc? And if you use libobjc2 how has that been compiled?
And on the same line, which version of GNUstep make are you using? There used to be some incompatible situation between that and libobjc2.

> Currently it looks for me this way:
> - gcc optimized (standard configure) crash
> - gcc debug non optimized, works
> - clang works
>
> however, Gregory tested with gcc and works for him.

In one of the next mails you also added that this breaks only when used with WindowMake. If you now could also provide the version of gcc you are using, then we would almost have a full picture :-)

As mostly you did not try to run your program with valgrind. I know that you have been able to do so in the past, what is it that stops you from using the valuable tool?
_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Crash on app start due to icon

Wolfgang Lux
In reply to this post by Riccardo Mottola-5
Hi Riccardo,

I finally managed to reproduce the crash, once I've noticed that you are compiling on a 32-bit OS rather than 64-bits (any reason for not using 64-bits nowadays?). Setting a breakpoint on the setApplicationIconImage: and then stepping through that method I found that the code crashes here:
2385      miniWindowSize = [GSCurrentServer() iconSize];

And stepping into that method the problem is that GSCurrentServer() return a null pointer. I've committed a fix now to handle this case.

Wolfgang

> Am 04.08.2018 um 23:10 schrieb Riccardo Mottola <[hidden email]>:
>
> Hi,
>
>
> On 08/04/18 13:53, Wolfgang Lux wrote:
>> as everybody else I'm also unable to reproduce your issue on NetBSD 7.1.2 with the latest source (except for Fred's patch). So it's seems this is something peculiar with your setup. Do you have any themes installed? If so, can you install them and try again. Also, what is the output of
>>   info sharedlibrary
>> (you may abbreviate that to i sh) when the program crashes?
>
> this is a mystery: I get a crash on all my computers except the FreeBSD/clang ones (both laptop and workstation).
>
> On my NetBSD 8.0 I had themes installed, namely set was the tango theme:
> imladris: {21} defaults read NSGlobalDomain GSTheme
> NSGlobalDomain GSTheme Tango
>
> this is a pure icon theme.
>
> I removed all the themes and removed the GSTheme variable, to "clean" everything, but I still get a crash.
>
> I have these configuration settings.
>
> Make:
>   $ ./configure --prefix=/ --with-layout=gnustep
>
> Base, Gui and Back: just configure with no arguments. Cairo is installed, detected and used.
>
> It is window-maker dependent (only there we have the icon dock). If I quickly switch to plain twm, the application starts.
>
> Riccardo
>


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
12