[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #42782] Crash when loading a gorm file
From: |
Yavor Doganov |
Subject: |
[bug #42782] Crash when loading a gorm file |
Date: |
Thu, 24 Jul 2014 00:00:30 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 |
Follow-up Comment #11, bug #42782 (project gnustep):
Yes, I used Gorm 1.2.20 + your latest changes. Most probably it is not an
issue with Gorm at all.
I'd really wish to provide more information... Perhaps I could put
breakpoints at some places and step through from there, this would at least
give you some clue, as blurry as that may be. As Gorm is a fairly complex
program, I'm trying Vindaloo first. I already figured out that Vindaloo
crashes in -[Document -makeWindowControllers], right after [self
addWindowController: ctrl]; ctrl is initalized properly with
-initWithWindowNibName: with [self windowNibName] as argument (which returns
@"Document"). Stepping from there:
(gdb) n
-[NSDocumentController openDocumentWithContentsOfURL:display:error:] (
self=0x840c0a8, _cmd=0xb7f73648 <_OBJC_SELECTOR_TABLE+520>, url=0x840ae20,
flag=1 ' 01', err=0xbffff4cc) at NSDocumentController.m:708
708 [self noteNewRecentDocument: document];
(gdb) n
710 if (flag && [self shouldCreateUI])
(gdb) n
712 [document showWindows];
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0xbfffef8a in ?? ()
Putting breakpoints further:
Breakpoint 2, -[NSDocument showWindows] (self=0x82a1268,
_cmd=0xb7edd828 <_OBJC_SELECTOR_TABLE+488>) at NSDocument.m:415
415 {
(gdb) po _window_controllers
("<Controller: 0x83e54f8>")
(gdb) n
417 withObject: self];
(gdb) n
416 [_window_controllers makeObjectsPerformSelector:
@selector(showWindow:)
(gdb) n
417 withObject: self];
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0xbfffef8a in ?? ()
....
Breakpoint 3, -[NSWindowController showWindow:] (
self=0xb7edb1b8 <_OBJC_SELECTOR_TABLE+504>,
_cmd=0xb7edb1b8 <_OBJC_SELECTOR_TABLE+504>, sender=0x81fdb90)
at NSWindowController.m:394
394 {
(gdb) n
395 NSWindow *window = [self window];
(gdb) po self
<Controller: 0x83e73e8>
(gdb) po [self window]
Program received signal SIGSEGV, Segmentation fault.
0xbfffef6a in ?? ()
....
Breakpoint 4, -[NSWindowController window] (self=0x83ea168,
_cmd=0xb7f680f0 <_OBJC_SELECTOR_TABLE+176>) at NSWindowController.m:297
297 {
(gdb) n
298 if (_window == nil && ![self isWindowLoaded])
(gdb) n
308 [self windowWillLoad];
(gdb) p _window
$5 = (struct NSWindow *) 0x0
(gdb) n
309 if (_owner != self &&
(gdb) po self
<Controller: 0x83ea168>
(gdb) po _owner
<Controller: 0x83ea168>
(gdb) n
315 [self loadWindow];
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
....
Breakpoint 5, -[NSWindowController loadWindow] (self=0x83e5340,
_cmd=0xb7f68170 <_OBJC_SELECTOR_TABLE+304>) at NSWindowController.m:476
476 {
(gdb) n
479 if ([self isWindowLoaded])
(gdb) n
484 table = [NSDictionary dictionaryWithObject: _owner forKey:
NSNibOwner];
(gdb) po table
value has been optimized out
(gdb) n
485 if ([NSBundle loadNibFile: [self windowNibPath]
(gdb) po self
<Controller: 0x83e5340>
(gdb) po [self windowNibPath]
/home/yavor/scratch/viewpdf.app-0.2dfsg1/ViewPDF.app/Resources/English.lproj/Document.gorm
(gdb) po _owner
<Controller: 0x83e5340>
(gdb) n
487 withZone: [_owner zone]])
(gdb) n
485 if ([NSBundle loadNibFile: [self windowNibPath]
(gdb) n
487 withZone: [_owner zone]])
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0xbfffef8a in ?? ()
....
Breakpoint 6, +[NSBundle(NSBundleAdditions)
loadNibFile:externalNameTable:withZone:] (self=0xb79d43e0
<_OBJC_Class_NSBundle>,
_cmd=0xb7f68250 <_OBJC_SELECTOR_TABLE+528>, fileName=0x8268c18,
context=0x8267fe0, zone=0xb7a3f0c0 <default_zone>)
at NSBundleAdditions.m:234
234 {
(gdb) n
235 NSNib *nib = [[NSNib alloc] initWithContentsOfURL: [NSURL
fileURLWithPath: fileName]];
(gdb) po fileName
/home/yavor/scratch/viewpdf.app-0.2dfsg1/ViewPDF.app/Resources/English.lproj/Document.gorm
(gdb) po [NSURL fileURLWithPath: fileName]
file://localhost/home/yavor/scratch/viewpdf.app-0.2dfsg1/ViewPDF.app/Resources/English.lproj/Document.gorm/
(gdb) po context
{NSOwner = "<Controller: 0x83e5568>"; }
(gdb) n
237 withZone: zone];
(gdb) po nib
value has been optimized out
(gdb) n
235 NSNib *nib = [[NSNib alloc] initWithContentsOfURL: [NSURL
fileURLWithPath: fileName]];
(gdb) n
239 RELEASE(nib);
(gdb) n
235 NSNib *nib = [[NSNib alloc] initWithContentsOfURL: [NSURL
fileURLWithPath: fileName]];
(gdb) n
237 withZone: zone];
(gdb) n
236 BOOL loaded = [nib instantiateNibWithExternalNameTable: context
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0xbfffef8a in ?? ()
....
Breakpoint 7, -[NSNib instantiateNibWithExternalNameTable:withZone:] (
self=0x8411090, _cmd=0xb7ebc0d0 <_OBJC_SELECTOR_TABLE+208>,
externalNameTable=0x8410c28, zone=0xb7a3f0c0 <default_zone>) at
NSNib.m:152
152 {
(gdb) n
155 withZone: zone];
(gdb) po _loader
<GSGormLoader: 0x84116c0>
(gdb) po _nibData
<474e5573 74657020 61726368 69766530 30303032 6166393a 30303030 30303135
3a303030 30303032 303a3030 30303030 30303a30 01310100 0e47534e 6962436f
6e746169 6e657200 00000131 0200084e 534f626a 65637400 00000000 30023103
00134e53 4d757461 626c6544 69637469 6f6e6172 79000000 00310400 ...(skipped)>
(gdb) po externalNameTable
{NSOwner = "<Controller: 0x83e55c8>"; }
(gdb) n
153 return [_loader loadModelData: _nibData
(gdb) n
155 withZone: zone];
(gdb) n
153 return [_loader loadModelData: _nibData
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0xbfffef8a in ?? ()
....
Breakpoint 8, -[GSGormLoader loadModelData:externalNameTable:withZone:] (
self=0x83df480, _cmd=0xb7f09cb0 <_OBJC_SELECTOR_TABLE+112>,
data=0x83dfbc8, context=0x83de9d0, zone=0xb7a3f0c0 <default_zone>)
at GSGormLoader.m:98
98 {
(gdb) n
104 if (data != nil)
(gdb) n
106 unarchiver = [[NSUnarchiver alloc]
(gdb) n
107 initForReadingWithData: data];
(gdb) n
106 unarchiver = [[NSUnarchiver alloc]
(gdb) n
107 initForReadingWithData: data];
(gdb) n
106 unarchiver = [[NSUnarchiver alloc]
(gdb)
108 if (unarchiver != nil)
(gdb)
106 unarchiver = [[NSUnarchiver alloc]
(gdb)
108 if (unarchiver != nil)
108 if (unarchiver != nil)
(gdb)
112 NSDebugLog(@"Invoking unarchiver");
(gdb)
113 [unarchiver setObjectZone: zone];
(gdb)
114 obj = [unarchiver decodeObject];
(gdb)
113 [unarchiver setObjectZone: zone];
(gdb)
114 obj = [unarchiver decodeObject];
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0xbfffef8a in ?? ()
I put a break on -[NSCoder decodeObject] here and there's a lot of stepping as
all the objects get decoded. Then,
-[GSWindowTemplate initWithCoder:] (self=0x83e7bc0,
_cmd=0xb7a29268 <_OBJC_SELECTOR_TABLE+232>, coder=0x84118f8)
at GSGormLoading.m:879
879 if (obj != nil)
(gdb)
878 id obj = [super initWithCoder: coder];
(gdb)
879 if (obj != nil)
(gdb)
881 int version = [coder versionForClassName: @"GSWindowTemplate"];
(gdb)
883 if (version == GSWINDOWT_VERSION)
(gdb)
890 else if (version == 0)
(gdb)
893 [coder decodeValueOfObjCType: @encode(BOOL) at: &_deferFlag];
(gdb)
894 _autoPositionMask = GSWindowAutoPositionNone;
(gdb)
895 _screenRect = [[_object screen] frame];
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0xbfffef8a in ?? ()
I restart the program putting another break here. Trying to dereference
_object results in "No symbol "_object" in current context" so sending a
message to _object expectedly ends with a crash at runtime level. FYI the
value of obj there is "<DocumentWindow: 0x83e9ab8>Number: 6 Title: Window".
This is with GUI 0.24.0 + your change from bug#42717 cherry-picked; built with
--disable-imagemagick and default optimization (-O2) on i386 (x86). GCC
4.9.1, GCC runtime.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42782>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #42782] Crash when loading a gorm file, (continued)
- [bug #42782] Crash when loading a gorm file, Sebastian Reitenbach, 2014/07/16
- [bug #42782] Crash when loading a gorm file, Yavor Doganov, 2014/07/16
- [bug #42782] Crash when loading a gorm file, Fred Kiefer, 2014/07/19
- [bug #42782] Crash when loading a gorm file, Yavor Doganov, 2014/07/20
- [bug #42782] Crash when loading a gorm file, Fred Kiefer, 2014/07/21
- [bug #42782] Crash when loading a gorm file, Yavor Doganov, 2014/07/21
- [bug #42782] Crash when loading a gorm file, Fred Kiefer, 2014/07/23
- [bug #42782] Crash when loading a gorm file, Yavor Doganov, 2014/07/23
- [bug #42782] Crash when loading a gorm file, Yavor Doganov, 2014/07/23
- [bug #42782] Crash when loading a gorm file, Fred Kiefer, 2014/07/23
- [bug #42782] Crash when loading a gorm file,
Yavor Doganov <=
- [bug #42782] Crash when loading a gorm file, Fred Kiefer, 2014/07/24
- [bug #42782] Crash when loading a gorm file, Yavor Doganov, 2014/07/24
- [bug #42782] Crash when loading a gorm file, Yavor Doganov, 2014/07/24
- [bug #42782] Crash when loading a gorm file, Fred Kiefer, 2014/07/24
- [bug #42782] Crash when loading a gorm file, Yavor Doganov, 2014/07/25
- [bug #42782] Crash when loading a gorm file, Yavor Doganov, 2014/07/25
- [bug #42782] Crash when loading a gorm file, Fred Kiefer, 2014/07/25
- [bug #42782] Crash when loading a gorm file, Yavor Doganov, 2014/07/25
- [bug #42782] Crash when loading a gorm file, Fred Kiefer, 2014/07/26