.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

llamabeast May 10th, 2007 12:00 PM

Re: Problem: \'Failed to create temp directory\'
 
Okay, another related question: Does anyone know if there's any way to change the temp directory that dominions uses? My /tmp is on a small partition, so there's some danger it'll fill up again.

Johan K May 10th, 2007 12:02 PM

Re: Problem: \'Failed to create temp directory\'
 
Set the environment variable DOM3_TEMP to use the location of your choice.

llamabeast May 10th, 2007 12:08 PM

Re: Problem: \'Failed to create temp directory\'
 
Brilliant! Thanks Johan. Problem solved.

HermesHand May 16th, 2007 11:29 PM

Re: Problem: \'Failed to create temp directory\'
 

I am having a problem that may be related. Dominions 3.08 on linux and when I try and play a multiplayer turn it needs to download the map. It connects, downloads the map and then crashes. The debug output is this.

Check if we have map bl_fully.rgb
We have to download the map (/home/lambda/dominions3/maps/bl_fully.rgb)
readinfo
era 3
done, can start 0
uncompressing decomplen = 5554497 (0x54c141) complen 4254862
lzhdec len 4254862 textsize 5554497
tcp_downloadmap len 5554492
/home/lambda/dominions3/maps/bl_fully.rgb
N&amp;#65533;got gick fel!
savefile: error opening file
N&amp;#65533;got gick fel!
savefile: error opening file
flushopengl
DeinitPrint
Aborted


Anyone have any ideas?

llamabeast May 17th, 2007 06:42 AM

Re: Problem: \'Failed to create temp directory\'
 
Just first things to check:

Does the map file already exist? If so delete it I guess.
Is your disk full?

Gandalf Parker May 17th, 2007 10:37 AM

Re: Problem: \'Failed to create temp directory\'
 
Does the person who is downloading the file (running dom3) have permission to create a file in that directory?

HermesHand May 17th, 2007 01:15 PM

Re: Problem: \'Failed to create temp directory\'
 

The map file doesn't exist and the disk has plenty of space.

The account running dominions should be the same account that created those directories, so I don't think it is a permissions problem.

llamabeast May 17th, 2007 01:40 PM

Re: Problem: \'Failed to create temp directory\'
 
That's very strange.

In the absence of any ideas how to solve it, I'd suggest you ask one of the other players to e-mail you the map file. Normally I'd say get them to post it as an attachment here, but the attachments are broken at the moment.

How did you manage to get to turn 6 with no map?

lch May 17th, 2007 03:35 PM

Re: Problem: \'Failed to create temp directory\'
 
bl_fully.rgb isn't the map, it's just the background graphic. You never get the map file, it's encoded in your turn file. Why you get errors for the filename, I have no idea.

HermesHand May 17th, 2007 03:42 PM

Re: Problem: \'Failed to create temp directory\'
 

I play on multiple machines depending on where I am. The windows systems don't have this problem.

lch May 17th, 2007 07:49 PM

Re: Problem: \'Failed to create temp directory\'
 
Sorry, my crystal sphere is broken. http://forum.shrapnelgames.com/image...ies/tongue.gif
Same thing like I said to llamabeast:

- what does "df -h" tell you (in a bash console)?
- what does "mount" tell you?
- what does dom3 tell you on startup if you start it with "-ddd"?

Please copy&amp;paste the output here.

HermesHand May 18th, 2007 08:49 PM

Re: Problem: \'Failed to create temp directory\'
 

I fixed it. It was a permissions problem. I think because of the way I copied the game from CD the directory was set read-only. Thanks for the help!


All times are GMT -4. The time now is 07:19 PM.

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