Toad crash oin close "'OCI Environment cannot be released, because it is being used'"

Hi,

This error is following me from last several beta releases, and now I’m on current 12.7.0.50

EurekaLog 7.1.1.0

Application:

1.1 Start Date : Tue, 10 Mar 2015 14:21:34 +0100
1.2 Name/Description: Froggy127b.exe - (Toad™ for Oracle®)
1.3 Version Number : 12.7.0.50
1.4 Parameters :
1.6 Up Time : 3 hour(s), 17 minute(s), 7 second(s)

Exception:

2.1 Date : Tue, 10 Mar 2015 17:38:42 +0100
2.2 Address : 0000000008EDF2D4
2.3 Module Name: Froggy127b.exe - (Toad™ for Oracle®)
2.5 Type : EAccessViolation
2.6 Message : Access violation at address 0000000008EDF2D4 in module ‘Froggy127b.exe’. Read of address 0000000000000074.
2.7 ID : B23C0000
2.8 Count : 1
2.11 Sent : 0

User:

3.2 Name : A1 Telekom Austria AG
3.3 Email:

Active Controls:

4.1 Form Class : MozillaWindowClass
4.2 Form Text : db statistics & partitioning | SCN - Mozilla Firefox
4.3 Control Class:
4.4 Control Text :

Computer:

5.2 Total Memory : 8520146944 (7,94 Gb)
5.3 Free Memory : 3663912960 (3,41 Gb)
5.4 Total Disk : 161755426816 (150,65 Gb)
5.5 Free Disk : 64809361408 (60,36 Gb)
5.6 System Up Time : 2 day(s), 9 hour(s), 39 minute(s), 32 second(s)
5.7 Processor : Intel® Core™ i7-3520M CPU @ 2.90GHz
5.8 Display Mode : 1920 x 1080, 32 bit
5.9 Display DPI : 96
5.12 Virtual Machine:

Operating System:

6.1 Type : Microsoft Windows 7 (64 bit)
6.2 Build #: 7601

Steps to reproduce:

8.1 Text:
Just closed the toad.

Assembler Information:

; Base Address: $8EDF000, Allocation Base: $4190000, Region Size: 36110336
; Allocation Protect: PAGE_EXECUTE_WRITECOPY, Protect: PAGE_EXECUTE_READWRITE
; State: MEM_COMMIT, Type: MEM_IMAGE
;
;
; OraCall.TOCIEnvironment.Release (Line=0 - Offset=96)
; ----------------------------------------------------
0000000008EDF290 751D JNZ +$1D ; ($0000000008EDF2AF) OraCall.TOCIEnvironment.Release (Line=0)
0000000008EDF292 488B0D3F6131FB MOV RCX, [REL -$04CE9EC1] ; ($00000000041F53D8) Exception Data as ANSI: ‘ˆT…’; Data as UNICODE: ‘咈П’
0000000008EDF299 B201 MOV DL, 1
0000000008EDF29B 4C8D05D6000000 LEA R8, [REL $000000D6] ; ($0000000008EDF378) OraCall.TOCIEnvironment.Release (Line=0) UNICODE: ‘OCI Environment cannot be released, because it is being used’
0000000008EDF2A2 E809DC32FB CALL -$04CD23F7 ; ($000000000420CEB0) System.Exception.Create
0000000008EDF2A7 4889C1 MOV RCX, RAX
0000000008EDF2AA E841FA2BFB CALL -$04D405BF ; ($000000000419ECF0) System._RaiseExcept
0000000008EDF2AF 488B4D50 MOV RCX, [RBP+$50]
0000000008EDF2B3 488B4550 MOV RAX, [RBP+$50]
0000000008EDF2B7 488B5028 MOV RDX, [RAX+$28]
0000000008EDF2BB E8A0010000 CALL +$01A0 ; ($0000000008EDF460) OraCall.TOCIEnvironment.FreeErrorHandle
0000000008EDF2C0 488B4550 MOV RAX, [RBP+$50]
0000000008EDF2C4 48C7402800000000 MOV QWORD PTR [RAX+$28], 0
0000000008EDF2CC 488B4550 MOV RAX, [RBP+$50]
0000000008EDF2D0 488B4010 MOV RAX, [RAX+$10]
;
; Line=0 - Offset=164
; -------------------
0000000008EDF2D4 480FB64074 MOVZX RAX, BYTE PTR [RAX+$74] ; <-- EXCEPTION
0000000008EDF2D9 F6C004 TEST AL, 4
0000000008EDF2DC 7437 JZ +$37 ; ($0000000008EDF315) OraCall.TOCIEnvironment.Release (Line=0)
0000000008EDF2DE 488B4550 MOV RAX, [RBP+$50]
0000000008EDF2E2 80783000 CMP BYTE PTR [RAX+$30], 0
0000000008EDF2E6 7421 JZ +$21 ; ($0000000008EDF309) OraCall.TOCIEnvironment.Release (Line=0)
0000000008EDF2E8 488B4550 MOV RAX, [RBP+$50]
0000000008EDF2EC 488B4810 MOV RCX, [RAX+$10]
0000000008EDF2F0 E84BABFFFF CALL -$54B5 ; ($0000000008ED9E40) OraCall.TOracleHome.GetOCI8
0000000008EDF2F5 488B4D50 MOV RCX, [RBP+$50]
0000000008EDF2F9 488B4920 MOV RCX, [RCX+$20]
0000000008EDF2FD C7C201000000 MOV EDX, 1
0000000008EDF303 FF90C0000000 CALL QWORD PTR [RAX+$000000C0]
0000000008EDF309 488B4550 MOV RAX, [RBP+$50]
0000000008EDF30D 48C7402000000000 MOV QWORD PTR [RAX+$20], 0
0000000008EDF315 488B4550 MOV RAX, [RBP+$50]
0000000008EDF319 C6404400 MOV BYTE PTR [RAX+$44], 0

Is there something with mine rights or some other program that runs as security policy … I’m not a local admin but granted all tasks through some program instead (which is allowing me to do “more sensitive tasks”).

Brg

Damir

What did you do right before this error was generated? I have occasionally seen similar messages after closing all connections and then trying to make another connection that requires a different Oracle Home.

When we switch from one Oracle Home to another, we have to release one Oracle Home’s DLLs before attaching to those of the other, but I have seen OCI DLLs refuse to be released (for reasons unknown to me) and that leads to this error. If you get this message, I would just close Toad and then restart, making the first connection in the new instance of Toad with the desired Oracle Home.

What did you do right before this error was generated?

Always after closing Toad (with or without opened connections)

When we switch from one Oracle Home to another,

I have two homes (11.2.0.3 and 12.1) but all the connections are pointing to just one-11.2.0.3

Brg

Damir

Hi John,

Today I installed 12.7.0.51 and remove all connections for the user that was using other ORACLE_HOME (12c) but was never connected in mentioned period, so now only 11.2.0.3 is inside Toad …
Do not if this is important but mentioned as a fact.

Now 5 hours working and no crashes …

:slight_smile: