1.05j infinite loop while saving.

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Grahammm
Cornac
Posts: 34
Joined: Tue Dec 14, 2004 7:22 pm
Location: UK
Contact:

1.05j infinite loop while saving.

#1 Post by Grahammm »

I have completed escape from reknor, exited to the world map (via the Iron town) and entered into Norgos Lair. There is a pop-up box saying "Please Wait while saving" with the 'bar at 100%'. In the character status area, beneath the equilibrium bar, there is a yellow bar indicating "Saving 107%". The console is streaming the following.

[SAVEFILE] checked validity of type zone => path not found
[SAVEFILE PIPE] *RE*new save running in the pipe: Frnn zone :: zone-reknor-escape.teaz :: table: 0x4051af78 => table: 0x426c5d00 (3281)
Loading savefile /save/Frnn/
[SAVEFILE PIPE] Resaving sent Frnn zone /save/Frnn/zone-reknor-escape.teaz.tmp
Saving zipname /save/Frnn/zone-reknor-escape.teaz.tmp
Saved zipname /save/Frnn/zone-reknor-escape.teaz.tmp
[SAVEFILE PIPE] Checking save Frnn zone /save/Frnn/zone-reknor-escape.teaz.tmp
Loading savefile /save/Frnn/
[SAVEFILE] checked validity of type zone => path not found
[SAVEFILE PIPE] *RE*new save running in the pipe: Frnn zone :: zone-reknor-escape.teaz :: table: 0x4051af78 => table: 0x426c5d00 (3281)
Loading savefile /save/Frnn/
[SAVEFILE PIPE] Resaving sent Frnn zone /save/Frnn/zone-reknor-escape.teaz.tmp
Saving zipname /save/Frnn/zone-reknor-escape.teaz.tmp
Saved zipname /save/Frnn/zone-reknor-escape.teaz.tmp
[SAVEFILE PIPE] Checking save Frnn zone /save/Frnn/zone-reknor-escape.teaz.tmp
Loading savefile /save/Frnn/
[SAVEFILE] checked validity of type zone => path not found
[SAVEFILE PIPE] *RE*new save running in the pipe: Frnn zone :: zone-reknor-escape.teaz :: table: 0x4051af78 => table: 0x426c5d00 (3281)
Loading savefile /save/Frnn/

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: 1.05j infinite loop while saving.

#2 Post by Doctornull »

Same thing is happening for me.

Code: Select all

Loading savefile 	/save/YEEEK/
[SAVEFILE] checked validity of type	zone	 => path not found
[SAVEFILE PIPE] *RE*new save running in the pipe:	YEEEK	zone	::	zone-town-irkkk.teaz	::	table: 0x096e0e40	=>	table: 0x101b3630	(2205)
Loading savefile 	/save/YEEEK/
[SAVEFILE PIPE] Resaving sent	YEEEK	zone	/save/YEEEK/zone-town-irkkk.teaz.tmp
Saving zipname /save/YEEEK/zone-town-irkkk.teaz.tmp
Saved zipname /save/YEEEK/zone-town-irkkk.teaz.tmp
[SAVEFILE PIPE] Checking save	YEEEK	zone	/save/YEEEK/zone-town-irkkk.teaz.tmp
Loading savefile 	/save/YEEEK/
[SAVEFILE] checked validity of type	zone	 => path not found
[SAVEFILE PIPE] *RE*new save running in the pipe:	YEEEK	zone	::	zone-town-irkkk.teaz	::	table: 0x096e0e40	=>	table: 0x101b3630	(2205)
Loading savefile 	/save/YEEEK/
[SAVEFILE PIPE] Resaving sent	YEEEK	zone	/save/YEEEK/zone-town-irkkk.teaz.tmp
Saving zipname /save/YEEEK/zone-town-irkkk.teaz.tmp
Saved zipname /save/YEEEK/zone-town-irkkk.teaz.tmp
[SAVEFILE PIPE] Checking save	YEEEK	zone	/save/YEEEK/zone-town-irkkk.teaz.tmp
Loading savefile 	/save/YEEEK/
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: 1.05j infinite loop while saving.

#3 Post by Doctornull »

Yeah I can't enter any zones after the 1st.

This beta is unplayable.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Fungah
Low Yeek
Posts: 7
Joined: Wed Sep 07, 2011 8:10 pm

Re: 1.05j infinite loop while saving.

#4 Post by Fungah »

Yeah, same thing's happening to me. Also if I try to exit while the saving loop's happening, the game hangs and I have to sic the task manager on it. Here's my log from where it starts saving onwards:

http://pastebin.com/KrpZAu18

e: oh, there's also a weird graphical glitch going on where if you let the game keep saving, it keeps creating little yellow bars going horizontally across the screen.

jotwebe
Uruivellas
Posts: 725
Joined: Fri Apr 15, 2011 6:58 am
Location: GMT+1

Re: 1.05j infinite loop while saving.

#5 Post by jotwebe »

Same thing, linux 64 bit.

Code: Select all

Loading savefile 	/save/Granitas/
[SAVEFILE] checked validity of type	zone	 => path not found
[SAVEFILE PIPE] *RE*new save running in the pipe:	Granitas	zone	::	zone-norgos-lair.teaz	::	table: 0x412d9050	=>	table: 0x4043e180	(1503)
Loading savefile 	/save/Granitas/
Saving zipname /save/Granitas/zone-norgos-lair.teaz.tmp
[SAVEFILE PIPE] Resaving sent	Granitas	zone	/save/Granitas/zone-norgos-lair.teaz.tmp
Ghoul never existed, this never happened!

Waladil
Halfling
Posts: 103
Joined: Tue Jan 10, 2012 10:40 pm

Re: 1.05j infinite loop while saving.

#6 Post by Waladil »

StarKeep asked me to unbreak it... so I did. Really surprised I managed to actually do it, too.
Here's the code that DG wrote in engine/savefile.lua:

--- Checks validity of a kind
function _M:checkValidity(type)
local path = fs.getRealPath(self.save_dir..self['nameLoad'..type:lower():capitalize()](self))
if not path or path == "" then
print("[SAVEFILE] checked validity of type", type, " => path not found")
return false
end
fs.mount(path, self.load_dir)
local ok = false
local f = fs.open(self.load_dir.."main", "r")
if f then ok = true f:close() end
fs.umount(path)
print("[SAVEFILE] checked validity of type", type, " => ", ok and "all fine" or "main not found")
return ok
end


Going off of a few complete guesses, I tried changing the code to this:

--- Checks validity of a kind
function _M:checkValidity(type)
local path = fs.getRealPath(self.save_dir..self['nameLoad'..type:lower():capitalize()](self))
fs.mount(path, self.load_dir)
if not path or path == "" then
print("[SAVEFILE] checked validity of type", type, " => path not found")
return false
end
local ok = false
local f = fs.open(self.load_dir.."main", "r")
if f then ok = true f:close() end
fs.umount(path)
print("[SAVEFILE] checked validity of type", type, " => ", ok and "all fine" or "main not found")
return ok
end

and it SEEMS TO work. Notice that the only change is the line of code "fs.mount(path, self.load_dir)" was moved up a few lines to before the game checks for it. A simple code mistake (assuming I actually fixed it, and didn't just accidentally break everything while making it look fixed).

EDIT: As expected, I found a flaw in my fix. It seems that this only makes it work on manual saves or non-background saves. If it tries to save in the background then it'll hang at around 40-60% complete. Disabling background saves seems to work fine, though.

Waladil
Halfling
Posts: 103
Joined: Tue Jan 10, 2012 10:40 pm

Re: 1.05j infinite loop while saving.

#7 Post by Waladil »

Found a better fix. This removes the functionality from the save checking, but has no special caveats.

Open the file \engine\SaveFilePipe.lua and find the line that starts "local okmain =" and just remove the function call and make it "local okmain = true"

That'll bypass the buggy function. It doesn't have the level of security that DG was trying to get with the new code though.

Elroniel
Higher
Posts: 52
Joined: Wed May 08, 2013 11:51 pm

Re: 1.05j infinite loop while saving.

#8 Post by Elroniel »

Forgive the potentially noob question, but where is this file? I was looking in the engine folder, but I'm not seeing any .lua files. Do I need to do something to make them viewable?

EDIT: I did find an engine.lua file, is that what I'm looking for? And, if so, what do I need to edit it? Notepad?

Alamar
Low Yeek
Posts: 5
Joined: Tue Nov 05, 2013 2:33 am

Re: 1.05j infinite loop while saving.

#9 Post by Alamar »

Elroniel wrote:Forgive the potentially noob question, but where is this file? I was looking in the engine folder, but I'm not seeing any .lua files. Do I need to do something to make them viewable?

EDIT: I did find an engine.lua file, is that what I'm looking for? And, if so, what do I need to edit it? Notepad?
edit in any editor you like. then put .lua file back into the archive (te4-1.0.5.teae)

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: 1.05j infinite loop while saving.

#10 Post by Doctornull »

Waladil wrote:Found a better fix. This removes the functionality from the save checking, but has no special caveats.

Open the file \engine\SaveFilePipe.lua and find the line that starts "local okmain =" and just remove the function call and make it "local okmain = true"

That'll bypass the buggy function. It doesn't have the level of security that DG was trying to get with the new code though.
Seems to work, thanks!

Everyone else:
- game/engines/te-1.0.5.teae is secretly a zip file
- unzip it
- find engines/SavefilePipe.lua and edit it
- re-zip
- rename if you must
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Elroniel
Higher
Posts: 52
Joined: Wed May 08, 2013 11:51 pm

Re: 1.05j infinite loop while saving.

#11 Post by Elroniel »

Thank you very much, guys; that got it worked out nicely!

Post Reply