stderr - Error setting write dir(...): File not found

Discuss the future of Warzone 2100 with us.
Tribaldome
Greenhorn
Posts: 11
Joined: 28 Sep 2009, 17:16

stderr - Error setting write dir(...): File not found

Post by Tribaldome »

Hi,

i am trying to develop WZ with VC++ 9.0 Express unter Windows Vista x64 SP2, i can compile it without errors, but the generated .exe file do not start...
First i tried just copying new file (5,63 MB) in a existing gamefolder and tried to start it but getting a lot error messages about missing dll's. After copying all .dll's from the "/data" folder, i got the following error message by using the link "D:\Programme(x86)\Warzone 2100 dev\Warzone2100-Dbg.exe" --debug all

stderr.txt

Code: Select all

wz      |05:48:32: [SDL_main] Using language: 
error   |05:48:32: [initialize_ConfigDir] Error setting write directory to "D:\Benutzer\Jens Grünewald\Documents\": File not found
may i have missed a description how to run a current version?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: stderr - Error setting write dir(...): File not found

Post by Per »

Does the directory exist, and with write permissions for your current user?
Tribaldome
Greenhorn
Posts: 11
Joined: 28 Sep 2009, 17:16

Re: stderr - Error setting write dir(...): File not found

Post by Tribaldome »

Yes, the folder exists and its my current used profile. I also tried to copy the data from an existing sub folder (Warzone 2100 2.2) and starting the application with administator rights, but both results with the same error...
Note: the folder is also used by the currrend release version 2.2.3 and work.
Tribaldome
Greenhorn
Posts: 11
Joined: 28 Sep 2009, 17:16

Re: stderr - Error setting write dir(...): File not found

Post by Tribaldome »

Well the Debugger throws the following:

Code: Select all

Detected memory leaks!
Dumping objects ->
{185} normal block at 0x03B05630, 96 bytes long.
 Data: <l           File> 6C 05 00 00 00 00 00 00 00 00 00 00 46 69 6C 65 
{183} normal block at 0x03B054F8, 29 bytes long.
 Data: <D:\Benutzer\Jens> 44 3A 5C 42 65 6E 75 74 7A 65 72 5C 4A 65 6E 73 
{177} normal block at 0x03B05490, 40 bytes long.
 Data: <d:\Programming\W> 64 3A 5C 50 72 6F 67 72 61 6D 6D 69 6E 67 5C 57 
{171} normal block at 0x03B05368, 28 bytes long.
 Data: <D:\Benutzer\Jens> 44 3A 5C 42 65 6E 75 74 7A 65 72 5C 4A 65 6E 73 
{168} normal block at 0x03B05900, 487 bytes long.
 Data: <Program: d:\Prog> 50 72 6F 67 72 61 6D 3A 20 64 3A 5C 50 72 6F 67 
Object dump complete.
Das Programm "[2876] Warzone2100-Dbg.exe: Systemeigen" wurde mit Code 1 (0x1) beendet.
Tribaldome
Greenhorn
Posts: 11
Joined: 28 Sep 2009, 17:16

Re: stderr - Error setting write dir(...): File not found

Post by Tribaldome »

So i have identified now that i have problems accessing the user dir (D:\User\My Name\Documents), but when i change the path (D:\Test\), everything is running.

main.c

Code: Select all

static void initialize_ConfigDir(void)
{
	//char tmpstr[PATH_MAX] = { '\0' };
	char* tmpstr="D:\\Test\\";

	if (strlen(configdir) == 0)
	{
		//getPlatformUserDir(tmpstr, sizeof(tmpstr));

		if (PHYSFS_setWriteDir(tmpstr) == 0) // Workaround for PhysFS not creating the writedir as expected.
		{
			debug(LOG_ERROR, "Error setting write directory to \"%s\": %s",
			      tmpstr, PHYSFS_getLastError()); // Here it throws me out when i use default user dir
			exit(1);
		}
(...)
Maybe this happen due to the fact that the path has a space in it?