EMULAB Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The new forum is online, hope you enjoy it!

Pages: [1]   Go Down

Author Topic: 32k Path Length Issue  (Read 12416 times)

Cassiel

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 106
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 80.0 Firefox 80.0
    • View Profile
32k Path Length Issue
« on: 21 September 2020, 09:37 »

Hey Roman, long time no post.

I'm experiencing an issue regarding your v4.036 change:
"added: automatic 32k path length support, no more need to use \\?\ prefixes (*)"
(BTW was super stoked when I read that!)

I have a TOSEC-PIX DAT that CMP does not recognise:
"C:\Program Files\ClrMamePro\datfiles\TOSEC-PIX\Tandy Radio Shack\Magazines\Byte Bandits of America Tandy TRS-80's Computer Club Newsletter\Tandy Radio Shack - Magazines - Byte Bandits of America Tandy TRS-80's Computer Club Newsletter (TOSEC-v2010-01-21_CM)"

The path length is 261, which takes it over the MAX_PATH limit of 260 (by one bloody char!) but my understanding is this should not be an issue now?

Obviously this is not the end of the world, can work around, but thought you would like to know (especially if an easy fix). I've not checked any other TOSEC DATs yet, this is just one I spotted first.
Logged


Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3443
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 85.0.4183.102 Chrome 85.0.4183.102
    • View Profile
Re: 32k Path Length Issue
« Reply #1 on: 21 September 2020, 09:50 »

So..what is actually the issue? Yes, all file operations are wrapped so they detect too long paths and automatically add a prefix when needed, so the question is really where exactly (during which operation) it fails for you. I assume in the profiler when adding the datfile? (can you send it please). Or during a datfile update? during a batch run? Drag'n drop a datfiles? So..where exactly?
Logged

Cassiel

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 106
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 80.0 Firefox 80.0
    • View Profile
Re: 32k Path Length Issue
« Reply #2 on: 21 September 2020, 10:09 »

Profiler. Brand new DAT, sitting in that path (manually copied over). It's definitely there, I can see/open it through regular Windows Explorer and XYplorer. Profiler does not see it.
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3443
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 85.0.4183.102 Chrome 85.0.4183.102
    • View Profile
Re: 32k Path Length Issue
« Reply #3 on: 21 September 2020, 10:52 »

ah..manually copied over is bad ;) The profiler data is cached. It won't recognize your manual changes. Either use "add" or hit "refresh list". So maybe it's not related to long paths at all
Logged

Cassiel

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 106
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 80.0 Firefox 80.0
    • View Profile
Re: 32k Path Length Issue
« Reply #4 on: 21 September 2020, 11:28 »

Hmmm, will try again using "Add" later today (I do usually use Add for MAME Softlists, but not most DATs).

I did try Refreshing a couple of times.... no change.
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3443
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 85.0.4183.102 Chrome 85.0.4183.102
    • View Profile
Re: 32k Path Length Issue
« Reply #5 on: 21 September 2020, 11:46 »

ok...I can repeat it and I know the problem.....and I'm working on it
« Last Edit: 21 September 2020, 13:11 by Roman »
Logged

Cassiel

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 106
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 80.0 Firefox 80.0
    • View Profile
Re: 32k Path Length Issue
« Reply #6 on: 22 September 2020, 08:39 »

Excellent...   :)
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3443
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 85.0.4183.121 Chrome 85.0.4183.121
    • View Profile
Re: 32k Path Length Issue
« Reply #7 on: 23 September 2020, 09:59 »

well, while it was relatively easy and obvious why it didn't work, fixing that one brings up a new problem. It now shows up in the profiler but when cmpro tries to create profile-based backup folders it fails. For whatever reason a CreateDirectory call fails for long values (even though it should support 32k since it's a unicode variant and got the well known prefix in its path). Grr.....will dig deeper into win32 function calls now.....stay tuned
Logged

Cassiel

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 106
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 80.0 Firefox 80.0
    • View Profile
Re: 32k Path Length Issue
« Reply #8 on: 23 September 2020, 14:57 »

Cool. As always, thanks for the attention to detail.
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3443
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 85.0.4183.121 Chrome 85.0.4183.121
    • View Profile
Re: 32k Path Length Issue
« Reply #9 on: 23 September 2020, 19:17 »

well...fine...great...found out that if you want to recursively create a directory with a long path (e:\long\verylong\evenlonger\.........etc), then you need to add the \\?\ prefix right from the beginning and not only if the recursion sees that the filename gets too long. Totally weird behaviour..but that works for now.

But of course, I found the next win32 api call which might have a problem under some circumstances when path+filename gets too big....*sigh*

But on the other hand, I guess I somehow fooled Windows10 a bit...I've created folders in folders and used very long names. Until Windows complained that it gets too long. Then I reduced it a bit, put the dat inside it, stepped up some parent folders and increased their length again. I wasn't able to move any file to the deepest folder anymore and aren't able to rename the folder anymore......and the win32 api calls also fail.
So I more assume it's a Windows bug ;)
« Last Edit: 23 September 2020, 19:24 by Roman »
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3443
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 85.0.4183.121 Chrome 85.0.4183.121
    • View Profile
Logged

Cassiel

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 106
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 81.0 Firefox 81.0
    • View Profile
Re: 32k Path Length Issue
« Reply #11 on: 27 September 2020, 12:44 »

Perfect.

Apologies for the belated feedback.
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3443
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 85.0.4183.121 Chrome 85.0.4183.121
    • View Profile
Re: 32k Path Length Issue
« Reply #12 on: 28 September 2020, 15:19 »

you're welcome.....I need users like you who spot the weirdest things ;)
Logged

Cassiel

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 106
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 81.0 Firefox 81.0
    • View Profile
Re: 32k Path Length Issue
« Reply #13 on: 12 November 2020, 15:23 »

You're going to regret saying that, have spotted another weird thing...   ;D

I have a DAT set, it is complete (224 files in folder, as should be).

When I run a scan in CMP, it insists I am missing the ROM (but not SET interestingly): "Montezuma's Revenge (1984)(Parker Brothers)(II+)[cr Black Bag - High Society][48K] & One On One (1983)(Electronic Arts)[cr L.S.D.][48K] & Hard Hat Mack (1983)(Electronic Arts)[cr Mr. Krac-Man][48K].rar".

The file is definitely there, I can see (and retrieve Properties for example) in both Windows Explorer and XYplorer. I can open it in WinRAR without issue, and it passes Test Archive.

The path is: "G:\Emulation Images\TOSEC\Apple\II\Compilations\Games\[DO]\Montezuma's Revenge (1984)(Parker Brothers)(II+)[cr Black Bag - High Society][48K] & One On One (1983)(Electronic Arts)[cr L.S.D.][48K] & Hard Hat Mack (1983)(Electronic Arts)[cr Mr. Krac-Man][48K].rar" which is obviously on the long side again.
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3443
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 86.0.4240.198 Chrome 86.0.4240.198
    • View Profile
Re: 32k Path Length Issue
« Reply #14 on: 12 November 2020, 18:43 »

did you use the lastest nightly?

If no, try it. If yes, send me the dat, the file in question, your *.cmp file (cmpro's settings folder) and cmpro.ini
« Last Edit: 12 November 2020, 18:43 by Roman »
Logged

Cassiel

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 106
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 81.0 Firefox 81.0
    • View Profile
Re: 32k Path Length Issue
« Reply #15 on: 12 November 2020, 22:04 »

Just tired, no dice. PM coming your way...
Logged

Cassiel

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 106
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 81.0 Firefox 81.0
    • View Profile
Re: 32k Path Length Issue
« Reply #16 on: 12 November 2020, 22:07 »

Oh! Forgot attachments disabled.

Find below:
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3443
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 86.0.4240.198 Chrome 86.0.4240.198
    • View Profile
Re: 32k Path Length Issue
« Reply #17 on: 18 November 2020, 18:43 »

Fixed in next nightly.... :)

funnily enough the path is exactly 260 chars long (which is identical to the system's MAX_PATH).
But hitting this means I have to auto add the 32k prefix stuff....so I had to change the check from < MAX_PATH to <= MAX_PATH

https://mamedev.emulab.it/clrmamepro/binaries/cmpro20201118.7z
« Last Edit: 18 November 2020, 18:50 by Roman »
Logged

Cassiel

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 106
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 83.0 Firefox 83.0
    • View Profile
Re: 32k Path Length Issue
« Reply #18 on: 20 November 2020, 21:14 »

Excellent. Thanks, will give it a go.
Logged
Pages: [1]   Go Up
 

Page created in 0.091 seconds with 21 queries.