Oracle8 & NT Multithreading problems 
Author Message
 Oracle8 & NT Multithreading problems

We have a VB Client that invokes a DLL that performs queries/updates records in a Oracle8 database. The architecture in brief is as follows :
a.. The VB Client creates a record that contains the parameters that will be used by the Generate process
    b.. Calls an entry point in the DLL passing the Id of the record created
    c.. The DLL function after validations fires a separate thread to handle the Generate process and returns to the VB Client
    d.. From this point on, VB Client polls & reads the Generate parameter record it created to obtain the status & updates the UI
    e.. The thread function periodically updates the Generate parameter record with the latest status of its progress.

Problems :
1.. When the VB Client app is exited on NT, it displays the following msg : "The instruction at '0x77f7cf1a' referenced memory at '0x0008000'. The memory could not be written"  [if the Generate process is invoked more than once during a session, the second address changes to '0x000c1000']. On Win95 m/cs the same app works fine.
    2.. Wrote an VC++ Client that simulates the VB Client for testing purposes and noted that the above problem does not happen(?!)
    3..



Sun, 17 Sep 2000 03:00:00 GMT  
 Oracle8 & NT Multithreading problems

Generally this happens when you use a DLL tha tries to access other memory regions ou to pass some parameter by REF.

We have a VB Client that invokes a DLL that performs queries/updates records in a Oracle8 database. The architecture in brief is as follows :

Quote:
> a.. The VB Client creates a record that contains the parameters that will be used by the Generate process
>     b.. Calls an entry point in the DLL passing the Id of the record created
>     c.. The DLL function after validations fires a separate thread to handle the Generate process and returns to the VB Client
>     d.. From this point on, VB Client polls & reads the Generate parameter record it created to obtain the status & updates the UI
>     e.. The thread function periodically updates the Generate parameter record with the latest status of its progress.

> Problems :
> 1.. When the VB Client app is exited on NT, it displays the following msg : "The instruction at '0x77f7cf1a' referenced memory at '0x0008000'. The memory could not be written"  [if the Generate process is invoked more than once during a session, the second address changes to '0x000c1000']. On Win95 m/cs the same app works fine.
>     2.. Wrote an VC++ Client that simulates the VB Client for testing purposes and noted that the above problem does not happen(?!)
>     3..

--
Cludio Avolio Rodrigues
Systems Especialist
IBM GS

Home page: http://www.geocities.com/SunsetStrip/4994

Please remove NOSPAN from username to reply.



Mon, 18 Sep 2000 03:00:00 GMT  
 Oracle8 & NT Multithreading problems

[sorry to re-post this request again... i had accidentally pressed the post
button before i could complete the msg]

We have a VB Client that invokes a DLL that performs queries/updates records
in a Oracle8 database. The architecture in brief is as follows :

 a.. The VB Client creates a record that contains the parameters that will
be used by the Generate process
 b.. Calls an entry point in the DLL passing the Id of the record created
 c.. The DLL function after validations fires a separate thread to handle
the Generate process and returns to the VB Client
 d.. From this point on, VB Client polls & reads the Generate parameter
record it created to obtain the status & updates the UI
 e.. The thread function periodically updates the Generate parameter record
with the latest status of its progress.

Problems :
 1.. When the VB Client app is exited on NT, it displays the following msg :
"The instruction at '0x77f7cf1a' referenced memory at '0x0008000'. The
memory could not be written"  [if the Generate process is invoked more than
once during a session, the second address changes to '0x000c1000']. On Win95
m/cs the same app works fine.
 2.. Wrote an VC++ Client that simulates the VB Client for testing purposes
and noted that the above problem does not happen(?!)

Using VB 5.0, VC++ 5.0 (both SP3) & Oracle Driver 8.00.0400

Some observations made so far...
1.  Instead of creating a thread from the DLL, if the process is invoked as
simple function call, the problem does not appear.
2. Inorder to eliminate the database driver as the possible culprit, i
created stub thread function  which returned immediately without
opening/invoking any database functions. The problem still was present!
3. The DLL exported function has the following prototype :
        GenerateForms (int, CString, CString)
    In the Dr. Watson's diagnostic report, noted the following functions in
callstack trace : ntdll!RtlDestroyHeap, ntdll!RtlFreeHeap,
ole32!<nosymbols>, oleaut32!SysFreeString, MSVBVM50!_vbaStrR4,
MSVBVM50!EVENT_SINK_QueryInterface  etc.

Suspecting that the mechanism that VB uses to cleanup strings passed to a
DLL as the likely source of the problem.

Need a workaround - any help would be greatly appreciated!

Chen




Mon, 18 Sep 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. DataBase Project & Oracle8 problem

2. Multithreading & Problem :: MFC

3. problem accessing ORACLE8 database using CDatabase

4. Problem Accessing Oracle8 Using ODBC

5. NT SP3 & NT SP4

6. Win NT 4.0 & a RPC problem

7. WIN98&NT SDK&DDK

8. WIN98&NT SDK&DDK

9. Multithreading, MFC & DAO

10. ODBC & Multithreading

11. Winsock & Multithreading

12. Win32 & multithreading

 

 
Powered by phpBB® Forum Software