VA 7.01, Ubuntu Linux 6.10 and C-libraries calling

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

VA 7.01, Ubuntu Linux 6.10 and C-libraries calling

Postby marten » Thu Jan 11, 2007 11:18 am

I was porting my SQLite interface to Linux and Solaris and I've started wih Linux and I have a strange behaviour here when calling SQLite libraries (low level C api calls).

- all methods work as expected, when I execute them in the debugger in a synchronous way in single step via

functionCall callWithArgument: ...

- the framework crashes, when executing all API call in a synchronous way via

functionCall callWithArgument: ...

without debugger (the normal way - just execute it).

- the framework works, when all calls are done in future static call mode.

I do not see a pattern here. When executing it, all API calls are always done from the same thread (either synchron (in the GUI thread) or via static future). Or is the behaviour under Linux different from that under Windows ?

Any ideas ?
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: VA 7.01, Ubuntu Linux 6.10 and C-libraries calling

Postby marten » Fri Jan 19, 2007 12:39 pm

marten wrote:I was porting my SQLite interface to Linux and Solaris and I've started wih Linux and I have a strange behaviour here when calling SQLite libraries (low level C api calls).

- all methods work as expected, when I execute them in the debugger in a synchronous way in single step via

functionCall callWithArgument: ...

- the framework crashes, when executing all API call in a synchronous way via

functionCall callWithArgument: ...

without debugger (the normal way - just execute it).

- the framework works, when all calls are done in future static call mode.

I do not see a pattern here. When executing it, all API calls are always done from the same thread (either synchron (in the GUI thread) or via static future). Or is the behaviour under Linux different from that under Windows ?

Any ideas ?


Just for your information: It seems, that I've found the error (or better: the reason for the strange behaviour). When calling the c-api I call a method with the following content:

...
^platformFunction callWithArguments: pArray

and this code works without problems, but if I change the code in this method to (and this was the original content):

...
Processor yield.
^platformFunction callWithArguments: pArray

the system crashes with a general protection fault at once ....
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest