gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Application crashes when embedding GNU Smalltalk lib - Help?


From: Tim McIntosh
Subject: Re: Application crashes when embedding GNU Smalltalk lib - Help?
Date: Tue, 1 May 2007 22:27:11 -0500

Nicola,

Good call!  Apparently libgst includes libsnprintfv, which provides another version of register_printf_function (incompatible, of course -- it returns a pointer upon success).  I'll have to think about how to best work around this.

This brings up another question, though:  is it really safe/advisable to raise an exception in NSString +initialize?  Is there a better way to handle this error condition?  I've never seen the exception actually get printed;  the app always crashes with SIGSEGV.  In the original application where I first encountered this, I couldn't even get a usable stack trace--it looked like a stack overflow was occurring due to recursion or something.

Thanks!
-Tim

On May 1, 2007, at 10:07 AM, Nicola Pero wrote:

from the stacktrace that you provided, it seems that the problem is in NSString +initialize.


In particular, you're getting the following exception:


#ifdef HAVE_REGISTER_PRINTF_FUNCTION                                                                  

      if (register_printf_function ('@',                                                              

                                    handle_printf_atsign,                                             

#if PRINTF_ATSIGN_VA_LIST                                                                             

                                    0))                                                               

#else                                                                                                 

                                    arginfo_func))                                                    

#endif                                                                                                

        [NSException raise: NSGenericException                                                        

                     format: @"register printf handling of %%@ failed"];                              

#endif /* HAVE_REGISTER_PRINTF_FUNCTION */ 


Maybe if you link GNU smalltalk, that interferes with register_printf_function() somehow ?  Or anyway

causes it to fail



reply via email to

[Prev in Thread] Current Thread [Next in Thread]