.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   Problem: 'Failed to create temp directory': Solved (http://forum.shrapnelgames.com/showthread.php?t=34627)

llamabeast May 9th, 2007 11:42 AM

Problem: \'Failed to create temp directory\': Solved
 
My copy of dominions has developed a problem - on trying to run it, it exits and says:

Nagot gick fel!
Failed to create temp directory properly (unknown reason)
Nagot gick fel!
Failed to create temp directory properly (unknown reason)
Aborted

This is on Linux. Anyone have any ideas?

Please help quickish if you can, since the computer with the problem is my MP server.

lch May 9th, 2007 11:48 AM

Re: Problem: \'Failed to create temp directory\'
 
Disk full?

What does Dominions report when you start it from the command line? Should look something like this:

<font class="small">Code:</font><hr /><pre>-------------------------
----- DOMINIONS ---------
-------------------------

Version version 3.08 (308)dbglevel 1 pc_endian
datapath='...'
confpath='...'
savepath='...'
modpath='...'
mappath='...'
localmappath='...'
temppath='/tmp/dominions3_45275'</pre><hr />

Then, what does "df -h" tell you? In case the disk isn't full to 100%, what does "mount" tell you?

DrPraetorious May 9th, 2007 11:59 AM

Re: Problem: \'Failed to create temp directory\'
 
I get the same problem when I put multiple dom3 shortcuts in my startup directory - but it is intermittent.

My guess:
* Instance A checks to see if temp dir exists. It doesn't.
* Instance B checks to see if temp dir exists. It doesn't.
* Instance A creates temp directory.
* Instance B attempts to create temp directory; mkdir returns a failure, dominions exits.

llamabeast May 9th, 2007 12:02 PM

Re: Problem: \'Failed to create temp directory\'
 
Wow, that was fast Ich.

For some reason dom3 doesn't give me any of that stuff back normally, and I couldn't work out where the temp directory was (although I use linux a lot there's a lot of things I don't know about it). Anyway, shortly after posting I remembered the debug switches, so I did dom3 -ddddd, which told me the location of the temp directory. Exactly why it was having a problem I don't know, but having deleted all the /tmp/dominions3_***** folders it's working again. Hurrah!

Sorry for solving it myself so quickly after posting - I'd actually already been stuck on it for quite a while. Anyway, hopefully this thread will be useful if anyone else has the same problem.

PS Actually, I can perhaps guess why it was having a problem. I think that the name of the temp folder is a random number using the system clock as a seed, but only to the nearest second (as it's the same if you run it multiple times in quick succession). If it uses the time but not the date for the seed, then running it at the same second on a following day would use the same folder name again. Since it doesn't delete the folders its created, this would cause a clash. Being as my server runs dominions at scheduled times, I guess it was hitting this problem.

What I'm going to do is make a 2-line script along the lines of

dom3 --someswitches
rm -r /tmp/dominions3_*

so it cleans up after itself. Windows users could do a similar thing with a .bat file.

llamabeast May 9th, 2007 12:03 PM

Re: Problem: \'Failed to create temp directory\'
 
Dr P - I guess what is happening is that both of your instances sometimes start in the same second and so try to use the same temp directory name. Sometimes they will fall in different seconds, hence the problem being intermittent. That's my theory anyway. Anyone have any thoughts on this?

llamabeast May 9th, 2007 12:39 PM

Re: Problem: \'Failed to create temp directory\'
 
Correction to the above: it looks like dominions does normally delete the temp directories, and so I guess it only fails to delete them if it doesn't exit properly. How I ended up with so many, and why it wouldn't work for me when I was trying repeatedly to run it (obviously over a number of different seconds) is a bit of a mystery.

lch May 9th, 2007 01:06 PM

Re: Problem: \'Failed to create temp directory\'
 
I noticed myself that lots of these folders are still residing in /tmp and don't get cleaned up. However, I never had problems to start Dom3 because of it. I've deleted them now.

llamabeast May 9th, 2007 01:37 PM

Re: Problem: \'Failed to create temp directory\'
 
Alright, I am a muppet. What Ich said in the first place was right. The partition that /tmp is in was full. Clearing the dominions directories only helped because it freed up a bit of space. So much for my complicated theory!

D'oh!!!

PS Completely irrelevantly - Ich, are you, um, Lch or ich? Lowercase L and uppercase i look the same.

Edit: I guess my complicated theory could still be the cause of Dr P's problem though.

MaxWilson May 9th, 2007 03:17 PM

Re: Problem: \'Failed to create temp directory\'
 
It's an uppercase "I." I pasted it into a console. http://forum.shrapnelgames.com/images/smilies/happy.gif

-Max

lch May 9th, 2007 03:50 PM

Re: Problem: \'Failed to create temp directory\'
 
Minus 100 points for MaxWIlson


All times are GMT -4. The time now is 05:15 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.