help-gnustep
[Top][All Lists]
Advanced

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

Re: GDL2 Crash


From: David Ayers
Subject: Re: GDL2 Crash
Date: Tue, 20 Nov 2007 23:56:17 +0100
User-agent: Mozilla Thunderbird 1.0.2 (X11/20070113)

Eric schrieb:
> First of all, please excuse me if this is the wrong list.

This list is fine... you also use bugs-gnustep@ if you like...

> I have been trying to get GDL2 (I have tried both 0.10.1 and 0.11.0)
> working under GNUstep Startup 0.18.2 and 0.19.0, on Ubuntu Gutsy Gibbon
> 7.10. All of my installed GNUstep related libraries and applications are
> self-built. Recently, I tried to get the demo GDL2 application from
> Linux Journal (URL: http://www.linuxjournal.com/article/7101) to work
> under this system. It builds, and everything works except for the
> "Update" button (the only one that actually contacts the database after
> login). When I press it, the program dumps core, with no error. When I
> run the program (linked with GDL2 0.11.0) under GDB, and press Update,
> this is the output on the console:
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1223342400 (LWP 20216)]
> 0xb696c372 in newValueForNumberTypeLengthAttribute (bytes=0x98640a4,
> length=1, 
>     attribute=0x83589c0, encoding=NSUTF8StringEncoding)
>     at PostgreSQLChannel.m:268
> 268                 : [[attribute valueType] cString][0];
> 
> Which I, since I am only starting out at programming, can only guess
> means that it's a problem in the PostgreSQL adaptor.

Indeed this a bug in both the adaptor and in the .eomodel(d) file...

We are assuming that the valueType returns non-nil (but potentially
empty) string.  For a quick workarount you could make sure that the
eomodel(d) file contains the following declartion for attributes having
a valueClassName of NSNumber:

          valueType = i;

DBModeler should do that for you...oh wait... that code sets up the
EOAttribute programmatically.  So I guess you could add:

[EOAttribute setValueType:@"i"];

or whatever the approriate value is:
http://www.gnustep.org/resources/documentation/Developer/GDL2/EOAccess/EOAttribute.html#method$EOAttribute-valueType
[http://tinyurl.com/yu5wje]

I'll try to fix the crash and figure out how that value should be
initialized if it hasn't been set explicitly.

Cheers,
David




reply via email to

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