discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: signal SIGSEGV, Segmentation fault


From: Yavor Doganov
Subject: Re: signal SIGSEGV, Segmentation fault
Date: Tue, 22 May 2018 14:23:45 +0000 (UTC)
User-agent: Pan/0.144 (Time is the enemy; 28ab3ba git.gnome.org/pan2)

В Tue, 22 May 2018 13:54:08 +0200, Andreas Höschler написа:

> - (id)initWithFrame:(NSRect)frameRect {
>    NSLog(@"initWithFrame ...");
>    self = [super initWithFrame: frameRect];
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>    [self retain];
>    ...
> }

Good practice is to check the result of that assignment.  If it fails for 
some reason, it would explain (to an extent) why your program crashes 
when you attempt to assign a value to the ivar at line 168.  Also, if 
self is nil, -retain will do nothing.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]