Memory Violation with socket program

Posted by MABeatty1978 on 18-Aug-2015 09:30

I have a socket application that was written in VB (to which I don't have access to the source code) that calls a Progress application, which calls an external C library function that puts messages to IBM WebSphere.  The C library function works fine from dozens of other Progress applications, but gets a Memory Violation when its called by this "socket program". 

The library is called by a .i file which looks like:

&GLOBAL-DEFINE libmq "/path/to/library.so"

PROCEDURE send_q EXTERNAL {&libmq} CDECL :

define input parameter dest as char.

define input parameter msg as char.

define input parameter msgLen as long.

define return parameter returnStatus as long.

END PROCEDURE.

I tried executing the procedure using hard coded values that are known to work in other programs and I get the same memory violation.

Any direction would be appreciated.

All Replies

Posted by Peter Judge on 18-Aug-2015 09:42

OE version?
 
In 11.4? 11.5? there was a 64-bit windows client introduced which requires the DLLs to match the bitness of the Progress executable.
 
[collapse]
From: MABeatty1978 [mailto:bounce-MABeatty1978@community.progress.com]
Sent: Tuesday, 18 August, 2015 10:31
To: TU.OE.Development@community.progress.com
Subject: [Technical Users - OE Development] Memory Violation with socket program
 
Thread created by MABeatty1978

I have a socket application that was written in VB (to which I don't have access to the source code) that calls a Progress application, which calls an external C library function that puts messages to IBM WebSphere.  The C library function works fine from dozens of other Progress applications, but gets a Memory Violation when its called by this "socket program". 

The library is called by a .i file which looks like:

&GLOBAL-DEFINE libmq "/path/to/library.so"

PROCEDURE send_q EXTERNAL {&libmq} CDECL :

define input parameter dest as char.

define input parameter msg as char.

define input parameter msgLen as long.

define return parameter returnStatus as long.

END PROCEDURE.

I tried executing the procedure using hard coded values that are known to work in other programs and I get the same memory violation.

Any direction would be appreciated.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Garry Hall on 18-Aug-2015 09:42

The signature of the send_q function might provide some insight (I could look it up online, but there is no guarantee that the one I find is the one you are using).

Is there a difference in the platforms between where it works and where it doesn't? You mention VB, which AFAIK is Windows only, but the library has a .so extension suggesting unix. OS versions and bitness might be important.

When you used the known good values, did you pass them directly from ABL, or did they go through this VB program? If through the VB program, I would suggest trying them from ABL directly. If it fails only from VB, then it would suggest the values are being extracted incorrectly in the AVM prior to passing to the DLL.

You could also log a call with TS requesting assistance on the protrace.

This thread is closed