From: Max H. <ma...@qu...> - 2001-10-09 20:22:54
|
OK, I gave up trying with the CVS (it seems to much has changed to get this working easily), and indeed, with the source of the latest release it fits in much better (I had to remove one typedef bool in one header, though). I can start the app now. But it crashed when I tried to "boot", the reason being inside the code that creats the NSBitmapImageRep (i had set the display depth to 8 bit, but it turns out this is ignored anyway?). This code is baaaaad: bitmap = [NSBitmapImageRep alloc]; [bitmap initWith.... You should *NEVER* do this!!! always do it like this: bitmap = [NSBitmapImageRep alloc]; bitmap = [bitmap initWith.... or maybe direcly bitmap = [[NSBitmapImageRep alloc] initWith.... The reason is that the init methods return the actual object, which might very well be different from the originally alloced object (e.g. for singleton classes), or even NULL, as in this case. This is especially "interesting" if one considers the commment in the same line: // If NULL, allocate own data Well, you will never detect this NULL with the current code :) Next, the Build Styles are being abused: setting -O3 in the development build style, but no optimizations (e.g. default) in the deployment style is not very logical. I reverted it to the default, which set -O0 for development builds (making it much easier to use the debugger). it now runs, but the speed is very disappointing, both with and without -O3. The Xfree86 based version on the same machine using XonX is quite a bit faster. Max -- ----------------------------------------------- Max Horn Software Developer email: <mailto:ma...@qu...> phone: (+49) 6151-494890 |