When I am using 4coder_casey, and I try to load a .prj file, nothing appears to happen. Specifically I get 'Permission Denied' as the error returned from errno. But comparing the permissions of the prj file to other files loaded by 4coder_custom (such as config.4coder, which does load), they are equivalent.
Is there other reasons why fopen would fail specifically in Casey's OpenProject? Are there any debugging techniques that I did not try below that I could investigate?
More information regarding my debugging attempts:
4coder: Version 184.108.40.206 power (the patched version, I named it .1)
OS: Windows 7 ultimate
MSVC: Visual Studio 2012 ultimate
When debugging, I find that issue is ProjectFile is null:
1102: FILE *ProjectFile = fopen(ProjectFileName, "r");
I added code to catch what the error from errno would return, which is simply: Permission Denied.
There is no visible reason for why this would be the case. procexp's handle does not return anything is using it, and icacls returns:
1 2 3 4 5
D:\work\Tests\handmade_hero>icacls handmade_main.prj handmade_main.prj BUILTIN\Administrators:(I)(F) NT AUTHORITY\SYSTEM:(I)(F) NT AUTHORITY\Authenticated Users:(I)(M) BUILTIN\Users:(I)(RX)
I am starting 4ed as administrator, either through a cmd prompt or Visual Studio, both running as Administrator.
To further debug, I tried simply creating a small app that would open the same file, and this works. I even tested using '\\' or '/' for the slashes and again, in this small app it works.
I thought it maybe an issue with 4coder_custom, but if I switch to 4coder_default_bindings.cpp, process_config_file successfully loads.
config.4coder is loaded as rb, so I tried that with the prj file, but again, still get NULL from fopen.
The final thing I did was move the location of the prj file to the 4coder\code folder and it still failed.
What debugging techniques am I missing? Is there other reasons why fopen would fail to open as read if the user has permission, and the file exist?