ObjectiveC2 problems

View: New views
3 Messages — Rating Filter:   Alert me  

ObjectiveC2 problems

by Niels Grewe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all,

I'm having some problems with blocks using the ObjectiveC2 framework.
I can savely link a library which uses blocks to libObjectiveC2, but as
soon as I link a tool or application to it, it crashes at startup - no
matter what compiler and feature combination I use (or what the actual
code in the tool is).
The crash occures specifically when the ObjectPlanes category on
NSObject is loaded and the class initialized. It is trying to send an
-objectPlane message to objc_msg_sender which is 0x0 and thus fails. It
seems to me that the variable is not even set at that point. (at least
if it's correct to assume that it is only set from
objc_msg_lookup_sender()). Any pointers are greatly appreciated.


Cheers,


Niels

_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: ObjectiveC2 problems

by Niels Grewe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jun 18, 2009 at 01:55:01PM +0200, Niels Grewe wrote:
> I'm having some problems with blocks using the ObjectiveC2 framework.

Forgot to attach the backtrace:

(gdb) bt full                                                                                                                                                
#0  0x0000000000000002 in ?? ()                                                                                                                              
No symbol table info available.                                                                                                                              
#1  0x00007f708f4a20c2 in +[NSObject(ObjectPlanes) alloc] (self=0x7f70907d8ea0, _cmd=0x7f70907e3960) at ObjectPlanes.m:101                                  
No locals.                                                                                                                                                  
#2  0x00007f70903661dc in +[NSObject new] (self=0x7f70907d8ea0, _cmd=0x7f70907e38d0) at NSObject.m:1134                                                      
No locals.                                                                                                                                                  
#3  0x00007f7090365f28 in +[NSObject initialize] (self=0x7f70907e3760, _cmd=0x7f709082ea30) at NSObject.m:987                                                
No locals.                                                                                                                                                  
#4  0x00007f708f291644 in __objc_send_initialize (class=0x7f7090808340) at /build/buildd-gcc-4.4_4.4.0-5-amd64-YWUgFt/gcc-4.4-4.4.0/src/libobjc/sendmsg.c:359
        __PRETTY_FUNCTION__ = "__objc_send_initialize"                                                                                                      
#5  0x00007f708f291644 in __objc_send_initialize (class=0x7f70907921a0) at /build/buildd-gcc-4.4_4.4.0-5-amd64-YWUgFt/gcc-4.4-4.4.0/src/libobjc/sendmsg.c:359
        __PRETTY_FUNCTION__ = "__objc_send_initialize"                                                                                                      
#6  0x00007f708f291a3c in objc_msg_lookup (receiver=0x7f70907921a0, op=<value optimized out>)                                                                
    at /build/buildd-gcc-4.4_4.4.0-5-amd64-YWUgFt/gcc-4.4-4.4.0/src/libobjc/sendmsg.c:328                                                                    
        result = <value optimized out>                                                                                                                      
#7  0x00007f708f4a1d71 in +[ETObjectPlane load] (self=0x7f708f6a5120, _cmd=0x156e760) at ObjectPlanes.m:61                                                  
No locals.                                                                                                                                                  
#8  0x00007f708f28db00 in objc_preorder_traverse (tree=0x7f708f6a40e8, level=-1888857536)                                                                    
    at /build/buildd-gcc-4.4_4.4.0-5-amd64-YWUgFt/gcc-4.4-4.4.0/src/libobjc/init.c:310
        node = <value optimized out>
#9  0x00007f708f28db1a in objc_preorder_traverse (tree=<value optimized out>, level=<value optimized out>)
    at /build/buildd-gcc-4.4_4.4.0-5-amd64-YWUgFt/gcc-4.4-4.4.0/src/libobjc/init.c:312
        node = (struct objc_list *) 0x15bce70
#10 0x00007f708f28e5d8 in __objc_exec_class (module=0x0) at /build/buildd-gcc-4.4_4.4.0-5-amd64-YWUgFt/gcc-4.4-4.4.0/src/libobjc/init.c:752
        previous_constructors = 1 '\001'
        unclaimed_categories = (struct objc_list *) 0x1586df0
        symtab = <value optimized out>
        cell = <value optimized out>
        selectors = <value optimized out>
        i = 0
        __PRETTY_FUNCTION__ = "__objc_exec_class"
#11 0x00007f7090289810 in __objc_gnu_init () at GSSocketStream.m:2740
No locals.
#12 0x00007f7090452d16 in __do_global_ctors_aux () from /usr/GNUstep/System/Library/Libraries/x86_64/linux-gnu/gnu-gnu-gnu/libgnustep-base.so.1.19
No locals.
#13 0x00007f709025acdb in _init () from /usr/GNUstep/System/Library/Libraries/x86_64/linux-gnu/gnu-gnu-gnu/libgnustep-base.so.1.19
No locals.
#14 0x00007fff98a77298 in ?? ()
No symbol table info available.
#15 0x00007f709086a778 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#16 0x00007f709086a8a7 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#17 0x00007f709085daca in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#18 0x0000000000000001 in ?? ()
No symbol table info available.
#19 0x00007fff98a78b89 in ?? ()
No symbol table info available.
#20 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb) up
#1  0x00007f708f4a20c2 in +[NSObject(ObjectPlanes) alloc] (self=0x7f70907d8ea0, _cmd=0x7f70907e3960) at ObjectPlanes.m:101
101             return [self allocInPlane: [objc_msg_sender objectPlane]];
(gdb) print objc_msg_sender
$1 = (struct objc_object *) 0x0

_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: ObjectiveC2 problems

by David Chisnall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The ObjectPlanes code requires everything to be built with -fobjc-
sender-aware-dispatch.  I shall disable it from the default build.

David

On 18 Jun 2009, at 12:55, Niels Grewe wrote:

> Hello all,
>
> I'm having some problems with blocks using the ObjectiveC2 framework.
> I can savely link a library which uses blocks to libObjectiveC2, but  
> as
> soon as I link a tool or application to it, it crashes at startup - no
> matter what compiler and feature combination I use (or what the actual
> code in the tool is).
> The crash occures specifically when the ObjectPlanes category on
> NSObject is loaded and the class initialized. It is trying to send an
> -objectPlane message to objc_msg_sender which is 0x0 and thus fails.  
> It
> seems to me that the variable is not even set at that point. (at least
> if it's correct to assume that it is only set from
> objc_msg_lookup_sender()). Any pointers are greatly appreciated.
>
>
> Cheers,
>
>
> Niels
>
> _______________________________________________
> Etoile-discuss mailing list
> Etoile-discuss@...
> https://mail.gna.org/listinfo/etoile-discuss


_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss