[10.52] Access violation on open 7z file with TC7Z64.DLL (v23.01 from TC11b10)

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

[10.52] Access violation on open 7z file with TC7Z64.DLL (v23.01 from TC11b10)

Post by *MaxX »

TC 10.52 x64 + new TC7Z64.DLL (ver.23.01 = from TC 11 beta 10 package).
Just try to open 7z file...


---------------------------
Total Commander 10.52
---------------------------
Access violation.
Access violation
Windows 11 Professional 10.0 (Build 22621), base: 0400000

Please report this error to the Author, with a description
of what you were doing when this error occurred!

Stack trace (x64):B23154
36B386B
Press Ctrl+C to copy this report!
Continue execution?
---------------------------
Так Ні
---------------------------
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: [10.52] Access violation

Post by *Hacker »

Yup, this is fixed in TC 11.00b10.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [10.52] Access violation

Post by *ghisler(Author) »

It's a really strange problem: The 7zip dll needs a stream object of the archive file as a parameter. Total Commander passes this stream object to the dll, and the dll reads from the object to access the 7zip archive. So far so good until version 22.01.

In version 23.01, the dll immediately calls "Release" on the stream object when called, so the object closes the file and releases the pointer. But then the dll tries to read from that same object, which is now NULL -> crash.

My workaround is to call "AddRef" (the counterpart to "Release") before passing the object to the 7zip library, so when 7zip calls "Release", it just decreases a counter and doesn't release the stream. Afterwards I can call "Release" myself to free the stream.
Author of Total Commander
https://www.ghisler.com
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: [10.52] Access violation on open 7z file with TC7Z64.DLL (v23.01 from TC11b10)

Post by *MaxX »

2Hacker
Em.. May be yes and no. I have both totalcmd64*.exe (release 10.52 and 11 beta) in one folder. Previous TC7Z64.DLL (from beta 1...9 packages) worked fine. Have problem only with new dll.

2ghisler(Author)
Can be there any solution that does not break TC 10.52? Or should I use this new dll only with 11.0 b10 or newer?
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: [10.52] Access violation on open 7z file with TC7Z64.DLL (v23.01 from TC11b10)

Post by *Hacker »

MaxX,
history.txt wrote:05.07.23 Release Total Commander 11.00 beta 10
04.07.23 Fixed: Updated 7zip unpacker dlls (TC7Z.DLL/TC7Z64.DLL) to version 23.01, fixed crash in 64-bit caused by the new dll (32/64)
Well, the history.txt entry literally says that the new DLL causes a crash. So you either have to use an older DLL, use TCv11b10 or newer, or wait until a fixed DLL is released by Igor Pavlov.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [10.52] Access violation on open 7z file with TC7Z64.DLL (v23.01 from TC11b10)

Post by *ghisler(Author) »

2MaxX
You cannot use the newer dll with TC 10.52 because it causes a crash, so unless you fix the dll code and compile the dll yourself, you cannot use the newer dll with TC 10.52.
Author of Total Commander
https://www.ghisler.com
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: [10.52] Access violation on open 7z file with TC7Z64.DLL (v23.01 from TC11b10)

Post by *MaxX »

Understood. Thanks.
Ukrainian Total Commander Translator. Feedback and discuss.
Post Reply