Access Violation in ORAGENERIC8.DLL

rkreykes

Member
When I use a multi-threaded application on a multi-processor server I receive an Access Violation on orageneric8.dll at 000B51D5, read address of 00000098. I am creating a separate TOracleSession in each thread and every TOracleQuery uses its thread's TOracleSession. I have tried using the multi-threaded option with the same results.

I need to resolve this soon or I will be forced to discard DOA and change to BDE/ODBC.

Thanks for your assistance.
 
The orageneric8.dll library is used internally by Net8, and is not accessed directly by Direct Oracle Access. Therefore it seems like a low-level problem. Note that for multi-threaded applications where each thread has its own session, there are no special requirements for your application or for Direct Oracle Access. Assuming that your threads do not share some DOA component by mistake of course.

Could you let me know when the access violation occurs in your application? For example during logon, during query execution, when fetching records, and so on.

Could you also let me know the exact Net8 version you are using?

As a first test you could try to set TOracleSession.Preferences.UseOCI7 to True. This will cause DOA to use the old, but more robust SQL*Net 2.3 interface within Net8. You can only do this if you are not using any Net8 specific objects (BLOB's, CLOB's, BFiles, TOracleObject, TOracleReference). If it is indeed a Net8 bug, this might fix it.

------------------
Marco Kalter
Allround Automations
 
Thanks for the reply. I have tried the 8.1.5 and the 8.1.6 clients. Both receive a similiar error. As a test I tried using the BDE and I receivied a similiar error using that!. It appears that initializing the Oracle client from multiple threads at the same time is causing the problem. It appears that if I surround the creation of the TOracleSession with a Mutex the problem does not occur. Also if I create a TOracle Session in the main thread and release it prior to creating the sub-processing threads the problem does not occur. Seems to be related to initializing the Oracle client interface in a process does not support multiple threads!

For now I will surround the TOracleSession.Create with a Mutex and
continue testing. I will send you an update when I complete the testing or if I have any additional information.
 
Back
Top