NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] Shutdown When Accessing Dir in Open/Save Dialog


Joined: 31 Jul 2008
Posts: 17
Location: Basingstoke, UK
Reply with quote
Double-clicking a directory junction (e.g. "C:\Users\<username>\My Documents" on Windows 7, which links to "C:\Users\<username>\Documents") in an open or save file dialog box causes PhpED to issue a brief "Access is denied" error message before, about one second later, crashing entirely (but seemingly not triggering the crash detector & reporting app).
View user's profileFind all posts by Lord d'EathSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Why do you think "My Documents" is linked to the "Documents" directory?
Probably you're new to Windows7.

There are TWO different layers in Windows - 1) physical - it's what is written on disk - we call it filesystem and 2) shell it's what shown by Explorer.
PhpED works with filesystem and shows what has written on the disk. In this case just do not use any "My XXX" folders, they all are FAKE links pointing to nowhere.

As of the Windows Shell -- it's where you can see "My Documents" shell folder for example. Such directories are not physical -- but they are pointing to physical directories like "Documents" in case of "My Documents". Check any file inside "My Documents" - and you'll see it's in fact is in "Documents" subdirectory.

Why (the hell) Microsoft implemented this all in such a complicated way - remains unclear.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 31 Jul 2008
Posts: 17
Location: Basingstoke, UK
Reply with quote
Excuse me? I "think" that "My Documents" is a link to Documents because it quite clearly is:
Code:
C:\Users\Andrew>dir /AL
23/02/2011  21:24    <JUNCTION>     Application Data [C:\Users\Andrew\AppData\Roaming]
23/02/2011  21:24    <JUNCTION>     Cookies [C:\Users\Andrew\AppData\Roaming\Microsoft\Windows\Cookies]
23/02/2011  21:24    <JUNCTION>     Local Settings [C:\Users\Andrew\AppData\Local]
23/02/2011  21:24    <JUNCTION>     My Documents [C:\Users\Andrew\Documents]
23/02/2011  21:24    <JUNCTION>     NetHood [C:\Users\Andrew\AppData\Roaming\Microsoft\Windows\Network Shortcuts]
23/02/2011  21:24    <JUNCTION>     PrintHood [C:\Users\Andrew\AppData\Roaming\Microsoft\Windows\Printer Shortcuts]
23/02/2011  21:24    <JUNCTION>     Recent [C:\Users\Andrew\AppData\Roaming\Microsoft\Windows\Recent]
23/02/2011  21:24    <JUNCTION>     SendTo [C:\Users\Andrew\AppData\Roaming\Microsoft\Windows\SendTo]
23/02/2011  21:24    <JUNCTION>     Start Menu [C:\Users\Andrew\AppData\Roaming\Microsoft\Windows\Start Menu]
23/02/2011  21:24    <JUNCTION>     Templates [C:\Users\Andrew\AppData\Roaming\Microsoft\Windows\Templates]

I've been using Windows 7 on both of my main computers since the public betas and, when I was at university a few years ago, I had to write an in-depth essay about NTFS (including its features such as Directory Junctions, which were actually added with Windows Vista, so we're talking about PhpED not supporting a six-year-old feature, here...), so I'm by no means "new" to Windows 7 and I know entirely what's going on with the links. Microsoft chose to rename these directories to neaten things up (and presumably to get rid of the spaces in directory names), but then created the Directory Junctions to maintain compatibility with old applications which expect the old names. It's not really illogical. So no, the "My xxx" directories are not "fake links pointing to nowhere" - they're very definitely real links pointing to the correct location.

If you don't want to support Directory Junctions, just display an error message when one is accessed (hell, even the old, totally inaccurate "Access is Denied" error message is better than the current behaviour), don't completely crash. And remember that this is happening in the Save dialog, so when PhpED crashes it's very likely that the user will have unsaved work which will be completely lost!

I wasn't actually trying to access the My Documents folder, anyway - I simply missed with the mouse cursor and hit My Documents instead of the directory I was aiming for. This sort of thing happens frustratingly frequently thanks to my RSI problems, but most applications don't outright crash on me because of it.

I should point out that this crash behaviour is fairly new. In build 6026, the inaccurate-but-harmless error message was displayed but there was no crash, so somewhere between 6026 and 6234 (I can't be more specific than that; sorry) the behaviour changed.

Stop accusing me of ignorance, blaming Microsoft for your problems and giving me unhelpful workarounds, and start actually fixing what would be considered a fairly major bug (i.e. crash and quite likely data loss) by most software teams.
View user's profileFind all posts by Lord d'EathSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Andrew,
Sorry, I thought they are fakes and I was wrong. Oh, these are JUNCTIONS, not symlinks. There is big difference between symlinks and junctions. Try to list files in this directory and you'll get ACCESS_DENIED error (code=5). If it was a link, it would return the content, not error.

Regarding 6years of the feature, you're not exactly correct. Reparse points (junctions) exist since W2k, ~ 12years now. But your report is the only report we've got so far. So this great feature is not needed to people. At least not so frequently.

As of "crash", it's not a crash in normal sense of this word, not AV, not attempt to dereference an invalid pointer, or something like that. Just a shutdown on an unexpected error. Workaround is implemented in 6235 (see #3691 in the changelog).

Thanks for teaching me what I have to do Smile

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[resolved] Shutdown When Accessing Dir in Open/Save Dialog
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic