[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
puzzled by crash solution
From: |
Lloyd Dupont |
Subject: |
puzzled by crash solution |
Date: |
Tue, 13 Sep 2005 16:27:52 +1000 |
Trying to understand why my installed product was crashing when calling
[NSColor whiteColor]
I had an hint it might be a resource problem, furthermore
+ [NSColor initialize]
call initSystemColors()
which calls [NSColorList colorListNamed: @"System"]
which calls [NSColorList _loadAvailableColorLists]
which calls
====================
e = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
NSAllDomainsMask, YES) objectEnumerator];
while ((dir = (NSString *)[e nextObject]))
{
BOOL flag;
dir = [dir stringByAppendingPathComponent: @"Colors"];
if (![fm fileExistsAtPath: dir isDirectory: &flag] || !flag)
{
// Only process existing directories
continue;
}
de = [fm enumeratorAtPath: dir];
while ((file = [de nextObject]))
{
if ([[file pathExtension] isEqualToString: @"clr"])
{
NSString *name = [file stringByDeletingPathExtension];
newList = [[NSColorList alloc] initWithName: name
fromFile: [dir stringByAppendingPathComponent: file]];
[_gnustep_available_color_lists addObject: newList];
RELEASE(newList);
}
}
====================
Now the intersting bit is, when I installed GNUstep with the install 1.10.1
it created the following dir structure:
C:\GNUstep
\Library
\Colors
System.clr
....
\System
\Tools
\Library
<no Colors directory>
And when I checked the version build from CVS it doesn't contains the
C:\GNUstep\Library\ directory
(nor does it contains C:\GNUstep\System\Tools\Library\Colors\System.clr)
Anyway I copied the content of C:\GNUstep\Library into the Library folder I
ship with my application and that fixes the problem.
But a problem remain, where does this C:\GNUstep\Library folder comes from?
1. it's not generated by the various make (install) and I followed these
directions:
http://wwwmain.gnustep.org/resources/documentation/User/GNUstep/README.MinGW
2. it's essential to run any graphical application! not that I used GNUstep
to draw (I'm using .NET), but I do use NSColor & such...
- puzzled by crash solution,
Lloyd Dupont <=