[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling Cenon
From: |
Georg Fleischmann |
Subject: |
Re: Compiling Cenon |
Date: |
Thu, 1 Sep 2011 13:59:51 +0800 |
Hi Fred,
On 01.09.2011, at 02:46, Fred Kiefer wrote:
> On 29.08.2011 10:25, Georg Fleischmann wrote:
>> On 28.08.2011, at 08:10, Germán Arias wrote:
>>> Now compile. But crash at launch. This is the backtrace:
>>>
>>> (gdb) backtrace
>>> #0 0xb6df5fe6 in objc_msg_lookup (receiver=0xb7655740, op=0xb76155f0)
>>> at /home/german/Instalados/GCC/gcc-4.6.0/libobjc/sendmsg.c:397
>>> #1 0xb735e433 in -[NSApplication setApplicationIconImage:]
>>> (self=0x8050134,
>>> _cmd=0x84a295c, anImage=0x824c070) at NSApplication.m:2332
>>> #2 0xbff15c38 in ?? ()
>>> #3 0x08050134 in main (argc=786480, argv=0x824bc85) at Cenon_main.m:62
>>
>> It's crashing within GNUstep when setting the Application Icon. It used to
>> work.
>> Anyway, just change the following line to a capital "C". This is obviously
>> wrong
>> (since July 2002):
>>
>> [app setApplicationIconImage:[NSImageimageNamed:@"cenon.tiff"]];
>> to
>> [app setApplicationIconImage:[NSImageimageNamed:@"Cenon.tiff"]];
>>
>> I have uploaded a new source package 3.9.5 also, fixing both issues.
>
> Hi Georg,
>
> thank you for the quick fix. Although there was a bug in your code, I still
> would like to understand what is going wrong on the GNUstep side.
> First of all, why do you need your own main function? Would it be possible to
> call the GNUstep implementation of NSApplicationMain? You may have to add an
> Info.plist to define the main bundle and the application icon, but most
> likely you have that file anyway. Just checked you already have that file but
> the NSMainNibFile key is missing there. Could you please try to add a
> definition for that and remove the special GNUstep main implementation?
I will do this. This special treatment of GNUstep in the main file of Cenon is
pretty old. Apple and OpenStep simply call the NSApplicationMain(), but I guess
GNUstep didn't provide a (complete) Info plist at the time of the code, or I
just missed something then.
I am pretty confident that NSApplicationMain() will work now. I changed it to
standard and will test it when compiling a new package of Cenon.
I also added missing entries to the CenonInfo.plist, most importantly
NSMainNibFile = Main; and NSPrincipalClass = App;
Thanks for pointing this out.
> But even that still doesn't explain what may go wrong here. Most likely we
> are talking about a sparc processor here. There (and on very view other
> machines) message sends to nil that are supposed to return a structure crash
> the program. We need to check before each such message send whether we have
> nil. This is missing in the code in question. I will add that, although it is
> no longer needed for Cenon.
This would certainly explain this.
Best wishes,
Georg
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Compiling Cenon,
Georg Fleischmann <=