Hi all, I am testing one of my apps out on the recent GNUstep tree I managed to get to work on Ubuntu 16.04 in the meanwhile. I already got relatively far with a few minor tweaks (replacing deprecated methods,...). However, I got stuck at one point and have no idea how to proceed from here! :-(
I have a subclass MapView : ESMMapView : GSImageView : NSImageView with @interface MapView : ESMMapView //FBMapView { NSPoint _currentPosition; NSTimer *_routeFadeTimer; float _positionAlpha; BOOL _addAlpha; NSString *_message; NSArray *_routeNodes; NSBezierPath *_routePath; NSArray *_departurePaths; NSArray *_arrivalPaths; NSArray *_overlayPaths; BOOL _routeVisible; BOOL _departurePathVisible; BOOL _arrivalPathVisible; } and @interface ESMMapView : GSImageView { BOOL _osmDrawing; BOOL _drawPrimaryInLays; BOOL _drawOtherInLays; NSRect _visibleMapSection; float _heightOfVisibleMapInKm; NSMutableArray *_labels; NSArray *_bezierPathsForLand; NSData *_shapeData; @public NSMutableArray *_rectObjects; // make sure labels do not overlap NSMutableArray *_mapPaths; // for each kind one, unless we are in detailed mode NSMutableArray *_mapShields; // "A1", B 203",... NSMutableArray *_mapLabels; // lables like "Bad Oldesloe", "AS Reinfeld", "Bahnhof",... NSMutableArray *_mapLocs; // Polter, Companies,... NSMutableArray *_mapLines; // routes } I get a Thread 1 "TimberNav" received signal SIGSEGV, Segmentation fault. -[MapView drawRect:] (self=0xb7ca746e <-[NSView displayRectIgnoringOpacity:inContext:]+318>, _cmd=0x8a704b8, rect=...) at MapView.m:168 168 NSLog(@"routeVisible: %d", _routeVisible); (gdb) when running the app in gdb and simply a Segmentation fault when running the app directly. This happens in the MapView::drawRect method - (void)drawRect:(NSRect)rect { NSLog(@"MapView drawRect %@ ... _osmDrawing %d", NSStringFromRect(rect), _osmDrawing); [super drawRect:rect]; NSLog(@"After super drawRect:rect"); [self bums]; // if (image != nil && _osmDrawing == NO) { NSImage *image = [self image]; NSSize imageSize = [image size]; // draw route NSLog(@"routeVisible: %d", _routeVisible); // <-- this causes the SIGSEGV NSLog(@"routePath: %@", _routePath); if (_routeVisible && _routePath != nil) { [[NSColor purpleColor] set]; [_routePath setLineWidth:8]; [_routePath stroke]; } ... } while accessing one of its instance variables, actually in the NSLog(@"routeVisible: %d", _routeVisible); line. When I comment this line out I get the same error in the next line while accessing _routePath and so on. I am clueless how to fix this. The code works on MacOSX and also with on an ancient GNUstep/Debian/Kubuntu setup. Any idea what might cause this trouble on Ubuntu 16.04 with the latest GNUstep or how to further track this down? Thanks a lot in advance!! Andreas
_______________________________________________ Discuss-gnustep mailing list Discuss-gnustep@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnustep