[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
two bugs...
From: |
Benhur Stein |
Subject: |
two bugs... |
Date: |
Thu, 9 Nov 2000 23:38:53 -0200 |
Hi all,
I just found two bugs that were preventing my program to run
(current cvs snapshot version of GNUstep on Debian 2.2):
In -[NSGCString initWithCoder:] it takes the zone from self
after having released self. I added a local variable to hold
the zone before releasing and it worked.
In NSBundle.m:
in function _bundle_load_callback() there is:
if (theClass)
className = NSStringFromClass(theClass);
else
className = [NSString stringWithCString: theCategory->class_name];
#if !LINKER_GETSYMBOL
if ([NSBundle _addFrameworkFromClass: theClass] == YES)
which means that +[NSBundle _addFrameworkFromClass:] can be called with
parameter theClass being Nil. This gives a segfault in:
+ (BOOL) _addFrameworkFromClass:(Class)frameworkClass
{
NSBundle *bundle;
NSString **fmClasses;
NSString *bundlePath = nil;
int len = strlen(frameworkClass->name);
Well, my program is still not running, it gets a segfault inside X when
dealloc'ing a NSWindow... but I didn't have enough time to dig this one :-(
I've simply put a return in NSWindow dealloc and now it runs...
Benhur
- two bugs...,
Benhur Stein <=