Invalid Memory Location

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

Invalid Memory Location

Postby danilomarcondes » Tue Sep 30, 2008 4:49 am

I'm using VA 7.5, and I'm having a problem when I try to do a request in my database.
The funny thing is that sometimes it works, sometimes it doesn't - and both method and database are the same in both situations.
When I try to do the query, this is the return message:

'Primitive failed in: Platform function>>#callWithArguments: due to General protection fault - read from invalid memory location' ==> {UIProcess:(30/09/2008 10:05:20){suspended, 3}}

This is the debugger final error method:
callWithArguments: anArray
"Issue the API call for the receiver."

<primitive: VMprPlatformFunctionCallWithArguments>

self primitiveErrorCode = PrimErrUnimplementedPrimitive ifTrue: [
^self
perform: (#(#call #callWith: #callWith:with: #callWith:with:with: #callWith:with:with:with:
#callWith:with:with:with:with: #callWith:with:with:with:with:with:
#callWith:with:with:with:with:with:with: #callWith:with:with:with:with:with:with:with:
#callWith:with:with:with:with:with:with:with:with:
#callWith:with:with:with:with:with:with:with:with:with:
#callWith:with:with:with:with:with:with:with:with:with:with:
#callWith:with:with:with:with:with:with:with:with:with:with:with:
#callWith:with:with:with:with:with:with:with:with:with:with:with:with:
#callWith:with:with:with:with:with:with:with:with:with:with:with:with:with:
#callWith:with:with:with:with:with:with:with:with:with:with:with:with:with:with:
#callWith:with:with:with:with:with:with:with:with:with:with:with:with:with:with:with:)
at: anArray size + 1)
withArguments: anArray
].
^self primitiveFailed


Can somebody help me please (I really don't know what to do about this)?
Thanks.
Danilo Marcondes
danilomarcondes
 
Posts: 8
Joined: Wed Sep 24, 2008 10:33 am

Re: Invalid Memory Location

Postby marten » Tue Sep 30, 2008 10:26 am

danilomarcondes wrote:I'm using VA 7.5, and I'm having a problem when I try to do a request in my database.
The funny thing is that sometimes it works, sometimes it doesn't - and both method and database are the same in both situations.
When I try to do the query, this is the return message:

'Primitive failed in: Platform function>>#callWithArguments: due to General protection fault - read from invalid memory location' ==> {UIProcess:(30/09/2008 10:05:20){suspended, 3}}


What I would like to know: which database and which database connector and under what platform ? In general it means, that some pointers are simply wrong ... but it is very difficult to tell more specific about that without knowning more about the external libraries you call.
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: Invalid Memory Location

Postby danilomarcondes » Tue Sep 30, 2008 12:41 pm

What I would like to know: which database and which database connector and under what platform ? In general it means, that some pointers are simply wrong ... but it is very difficult to tell more specific about that without knowning more about the external libraries you call.


I'm using a DB2 database. This is my "connect" code:

connect

| wcon wlgn |

wcon := AbtDatabaseConnectionSpec forDbmClass: #AbtIbmCliDatabaseManager databaseName: 'DBNAME'.
wlgn := AbtDatabaseLogonSpec id: 'LOGIN' password: 'PASSWD' server: nil.
wcon connectUsingAlias: 'DBALIAS' logonSpec: wlgn.


While I use the database, I'm using some webservices too.
Danilo Marcondes
danilomarcondes
 
Posts: 8
Joined: Wed Sep 24, 2008 10:33 am

Re: Invalid Memory Location

Postby tc » Wed Oct 01, 2008 11:45 pm

It is hard to know without more information, such as what is the sql string being executed and what does the table look like that is being referenced.

A general answer, based on the info so far is, a DB string is not properly terminated or a buffer where information is deposited is being overrun.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Re: Invalid Memory Location

Postby FredF » Thu Oct 02, 2008 11:39 pm

We had sometimes this error using DB2 on i5, and everytime a correction of the ODBC driver has fixed the problem.
Fred
FredF
 
Posts: 18
Joined: Tue Feb 05, 2008 6:50 am

Re: Invalid Memory Location

Postby danilomarcondes » Mon Nov 24, 2008 9:13 am

Well, I'm using a statement with several 'joins', but when I run it on the Database Server, it goes ok.
Even when I run it with VisualAge itself it goes ok sometimes:

SELECT TAB1.*, TAB2.CODOBJ, TAB3.*, TAB4.*, TAB5.*, TAB6.*, TAB7.*, TAB8.DESCRIPT
FROM TAB1
LEFT JOIN TAB2 ON (TAB1.CODTP = TAB2.CODTP)
LEFT JOIN TAB3 ON (TAB1.COD = TAB3.COD)
LEFT JOIN TAB8 ON (TAB3.DESC2 = TAB8.DESC2)
LEFT JOIN TAB4 ON (TAB1.COD = TAB4.COD)
LEFT JOIN TAB5 ON (TAB1.COD = TAB5.COD)
LEFT JOIN TAB6 ON (TAB1.COD = TAB6.COD)
LEFT JOIN TAB7 ON (TAB1.COD = TAB7.COD)
WHERE TAB1.COD = '008'
Danilo Marcondes
danilomarcondes
 
Posts: 8
Joined: Wed Sep 24, 2008 10:33 am


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest