Topic: Project Directory name containing spaces.

If the project directory contains spaces, e.g.

D:\My Project To Sort Numbers\Sorting_Project

Then the "current directory" isn't set properly and attempts to run the project inside the GUI will fail with an error similar to:

Cannot find D:\My

I can make the debugger work by putting the current directory as "D:\My Project To Sort Numbers\Sorting_Project" (including the quotes) but the program will not run inside the GUI even with this workaround.

Could you look into this please?

--
David

Re: Project Directory name containing spaces.

David,

I'll have a look at the issue.  I'm not sure why there'd be a problem.  Are you using the Internal Console or External Console, just out of curiosity?

Jeff Armstrong
Approximatrix, LLC

Re: Project Directory name containing spaces.

I have this issue whether or not I use the built in console or use an external one.

If it is relevant,

Windows 8.1, 64 bit.
SF Version 2.16 Build 1726
My projects are on my D: drive

--
David

Re: Project Directory name containing spaces.

David,

I can't seem to replicate your problem on my end with any combination of spaces in the path.  Could you email me your project file?  I just need the ".prj" file to examine, no source code.  You can send it to support@approximatrix.com.

Sorry for the trouble.

Jeff Armstrong
Approximatrix, LLC

Re: Project Directory name containing spaces.

Jeff,

I have sent you an email.

I have found that the problem arises when I try to switch to use the external console.

David.

--
David

Re: Project Directory name containing spaces.

David,

Is there a chance you're using "Resilient File System (ReFS)" on your D: drive?  I suspect that could be the source of the bug.  It's a Simply Fortran bug, of course, not a Windows bug.

Jeff Armstrong
Approximatrix, LLC

Re: Project Directory name containing spaces.

My D: drive is just NTFS.

--
David

Re: Project Directory name containing spaces.

Well, regardless of your D: configuration, I believe this bug is all due to some calls by Simply Fortran to Windows's GetShortPathName function.  Simply Fortran calls this, and, if it returns successfully, doesn't bother applying quotation marks around commands.  However, deep in the remarks section is a nice, little note:

Resilient File System (ReFS) doesn't support short names. If you call GetShortPathName on a path that doesn't have any short names on-disk, the call will succeed, but will return the long-name path instead. This outcome is also possible with NTFS volumes because there's no guarantee that a short name will exist for a given long name.

The important point in the paragraph above states that GetShortPathName will also occasionally return the string it was originally passed if there is no short-name equivalent.  I suspect that's what is occurring in your case.

I've fixed the code that is problematic  in your case, but I still need to audit a few other calls.    This will also be fixed in 2.17.

Jeff Armstrong
Approximatrix, LLC

9 (edited by davidb 2014-10-13 20:15:22)

Re: Project Directory name containing spaces.

Thanks for looking at this so promptly.

Short file names (DOS 8.3 names) are disabled by default on non-system volumes in Windows 8, 8.1 (10?) (e.g. my D: drive) but they were enabled in Windows 7, Vista, XP.

Short file names are enabled by default on the system C: drive in Windows 8, 8.1 so this issue won't arise if the project is on the C: drive.

A user can configure this on a per drive basis, but most won't bother (as I haven't bothered). There is probably an API function for reading the setting for the drive of interest.

Regards,

David.

--
David

Re: Project Directory name containing spaces.

All,

Jeff may have fixed this now. Just waiting for him to complete his testing and make 2.17 available to us all.

--
David

Re: Project Directory name containing spaces.

It might be a few days.  It appears that the release candidate that David had tried out had a very slight buffer overrun when starting the debugger.  In fact, this overrun might be a long-standing issue that could cause intermittent crashes and memory corruption when initializing the debugger.

Jeff Armstrong
Approximatrix, LLC