The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: VS on October 10, 2012, 09:51:00 PM

Title: r5973 gdi -> freeze in ~loadsave_frame_t() on failure to write cache
Post by: VS on October 10, 2012, 09:51:00 PM
Short:
loadsave_frame_t::~loadsave_frame_t() tries to write a cache but proceeds even when the file can't be created.

Long:
loadsave_frame_t::~loadsave_frame_t() tries to write a cache. It calls file.wr_open which returns false because hte file could not be created. The caller (destructor) ignores this and proceeds, using the object in reading state for writing without valid file, and from there it all falls apart. When backtraced while frozen, program appears to be trying to find "<".


Don't ask how I managed to make that folder unwritable on Windows. It does not matter to the bug ;)
Title: Re: r5973 gdi -> freeze in ~loadsave_frame_t() on failure to write cache
Post by: TurfIt on October 11, 2012, 12:07:30 AM
Fixed r5977.