[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
why does this crash?
From: |
David Wetzel |
Subject: |
why does this crash? |
Date: |
Fri, 31 May 2002 15:35:34 +0000 |
Hi folks,
maybe I am too tired to see the problem...
if (string_)
{
NSData* newData=nil;
NSString* _string=nil;
NSLog(@"DAVE string_ ....");
NSLog(@"DAVE string_ %p",string_);
if (string_ == EONullNull) {
NSLog(@"DAVE string_ is EONullNull");
}
NSLog(@"DAVE string_ 1");
NSLog(@"DAVE string_ class = %@",[string_ class]);
_string=[NSString stringWithObject:string_];
(.....)
The output is:
2002-05-31 13:56:38.124 PDFDemo[8455] File GSWKeyValueAssociation.m: 73. In
[GSWKeyValueAssociation -valueInObject:] retValue=(nil) () (class=(nil))
2002-05-31 13:56:38.124 PDFDemo[8455] DAVE string_ ....
2002-05-31 13:56:38.124 PDFDemo[8455] DAVE string_ 0x481714d0
2002-05-31 13:56:38.124 PDFDemo[8455] DAVE string_ 1
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x8053a01 in objc_msg_lookup ()
(gdb)
(gdb) bt
#0 0x8053a01 in objc_msg_lookup ()
#1 0x481708e2 in _i_GSWResponse_GSWContentConveniences_appendContentString_ ()
#2 0x481712a4 in _i_GSWResponse_GSWHTMLConveniences_appendContentHTMLString_
()
#3 0x481ba8a4 in _i_GSWText_GSWTextA_appendToResponse_inContext_ ()
#4 0x481cd36e in
_i_GSWHTMLStaticElement_GSWHTMLStaticElementA_appendToResponse_inContext_elementsFromIndex_toIndex_
()
for those who don't have GSWeb:
@implementation NSString (stringWithObject)
//--------------------------------------------------------------------
+(NSString*)stringWithObject:(id)object_
{
NSString* _string=nil;
if (object_)
{
if ([object_ isKindOfClass:[NSString class]])
_string=[[object_ copy] autorelease];
#ifdef GDL2
else if ([object_ isKindOfClass:[EONull class]])
_string=@"";
#else
else if ([object_ isKindOfClass:[NSNull class]])
_string=@"";
#endif
else if ([object_ respondsToSelector:@selector(stringValue)])
_string=[object_ stringValue];
else if ([object_ respondsToSelector:@selector(description)])
_string=[object_ description];
else
_string=object_;
};
return _string;
};
@end
Any ideas?
---
_ _
_(_)(_)_ David Wetzel, Turbocat's Development,
(_) __ (_) Buchhorster Strasse 23, D-16567 Muehlenbeck/Berlin, FRG,
_/ \_ Fax +49 33056 82835 Phone +49 33056 82834
(______) http://www.turbocat.de/ dave@turbocat.de
- why does this crash?,
David Wetzel <=