Path > 1024 chars -> access violation

Bug reports will be moved here when the described bug has been fixed

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
Hacker
Moderator
Moderator
Posts: 11400
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Path > 1024 chars -> access violation

Post by *Hacker » 2016-08-25, 17:30 UTC

Bug report translated from the Slovak and Czech forum:
Win 7 x64
When trying to browse a path longer than 1024 chars TC 32bit 9.0ß10 silently crashes and TC x64 9.0ß10 shows the following error message:

Access violation.
Access violation
Windows 7 SP1 6.1 (Build 7601), base: 0400000

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

Stack trace (x64):46B4B6

Press Ctrl+C to copy this report!
Continue execution?

TC 8.52a just "dings", refuses to enter the directory and otherwise works fine.
It would be very nice if TC could handle such long paths just like MultiCommander or UnrealCommander can.
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.

Cubex
Junior Member
Junior Member
Posts: 9
Joined: 2016-08-24, 07:45 UTC

Path > 1024 chars -> access violation

Post by *Cubex » 2016-08-26, 07:00 UTC

Report TC 9.0ß11 32bit and continue

Access violation at address 006E0077. Write of address 006C0067.
Access violation at address 006E0077. Write of address 006C0067
Windows 7 SP1 6.1 (Build 7601), base: 00400000

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

Windows exception: C0000005
Stack trace:
006E0077
004485C6 00448F56 004261FC 00448469 004261FC 00446F99
004485C6 00448F56 004261FC 004E6B9E 004E7AA8 004470EC
00446F99 004485C6 00446ECF 0044930A 00446F99 00448F56
>004261FC 004484FB 004261FC 00448469 004261FC 004485C6
00448F56 004261FC 004484FB 004261FC 0042B8E0 0042B97C

Raw:
005C0042 005C0042 005F0042 00448469 004261FC 004492CF
00446F99 00449225 00448F56 00438242 0044854E 004485C6
00448F56 00448F79 004261FC 005C0042 005C0042 00448469
004261FC 004492CF 0044968C 004384A3 00446F99 00449225
00438242 0044854E 004485C6 00448F56 00448F79 004261FC
004E6B9E 00448469 004261FC 004492CF 00446F99 00449225
004485C6 00448F56 00448F79 004261FC 004484FB 004261FC
0045C23E 004FC943 00448469 004261FC 004492CF 00446F99
00449225 00438242 0044854E 004485C6 00448F56 00448F79
004261FC 004484FB 004261FC 004E7AA8 0057005A 00417F3E

Press Ctrl+C to copy this report!
Continue execution?

Report TC 9.0.ß11 64bit and continue

Access violation.
Access violation
Windows 7 SP1 6.1 (Build 7601), base: 0400000

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

Stack trace (x64):46B5C6

Press Ctrl+C to copy this report!
Continue execution?

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38438
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2016-08-26, 20:13 UTC

Sorry, cannot reproduce, TC 9 behaves exactly like TC 8.x here! I cannot find any error in my code either, and the stack trace doesn't give the right location.

Can you post a path with which you get this error, please?
1. Go to the deepest directory to which you can go without crash.
2. Press Ctrl+P, then copy the path from the command line
3. Press ESC to clear the command line
4. Press Ctrl+Enter on the subdir which causes the crash
5. Again copy the directory name from the command line

Then please post them here or send them via e-mail. You may change the names of the folders, but don't change the length of each folder!
Author of Total Commander
http://www.ghisler.com

Cubex
Junior Member
Junior Member
Posts: 9
Joined: 2016-08-24, 07:45 UTC

Post by *Cubex » 2016-08-27, 10:25 UTC

Thank you for a quick response.

File supplied with the required 33 days

http://mysharegadget.com/638722661

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38438
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2016-08-29, 08:46 UTC

Thanks, I could reproduce it now. It happens because TC history now stores both the directory and the last file/folder under the cursor.

Btw, I don't plan to support paths longer than 1023 characters. They are very unhandy to use, and finding bugs with them is almost impossible.
Author of Total Commander
http://www.ghisler.com

Cubex
Junior Member
Junior Member
Posts: 9
Joined: 2016-08-24, 07:45 UTC

Post by *Cubex » 2016-08-29, 14:47 UTC

I'm sad. It's very simple. I use it.
\\?\C:\full path over 30k characters long

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247

Note The maximum path of 32,767 characters is approximate, because the
"\\?\" prefix may be expanded to a longer string by the system at run
time, and this expansion applies to the total length.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38438
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2016-08-31, 16:19 UTC

The crash should be fixed!

And it's NOT very simple. I do use \\? prefix for paths longer than 259 characters. But I can't work with fixed 32k buffers, that would eat too much stack memory. Instead, I would have to dynamically reallocate the strings for each string operation, which would be 100x more risky for buffer overflows and other errors.
Author of Total Commander
http://www.ghisler.com

Post Reply