New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log relocation error #2999

Open
robbor8 opened this Issue May 3, 2018 · 11 comments

Comments

Projects
None yet
5 participants
@robbor8

robbor8 commented May 3, 2018

I'm getting the following error when launching game through steam and after downloading the installer from wesnoth.org. The first path mentioned has no .log file and the second had files such as the one attached.


Battle for Wesnoth

Log relocation failed.

Runtime error: No such file or directory (2)
New log file path: C:\Users<username>\Documents\My Games\Wesnoth1.14/logs/wesnoth-20180502-221248-1412.log
Old log file path: C:\Users<username>\AppData\Local\Temp/wesnoth-20180502-221248-1412.log

This may indicate an issue with your Wesnoth launch configuration. If the problem persists, contact the development team for technical support, including the full contents of this message (copy with CTRL+C).

OK

wesnoth-20180502-221248-1412.log

@shikadiqueen

This comment has been minimized.

Member

shikadiqueen commented May 3, 2018

Does the first location actually exist? That is, is there a My Games\Wesnoth1.14\logs folder in your Documents folder?

@Wedge009

This comment has been minimized.

Member

Wedge009 commented May 3, 2018

I don't know that this is necessarily Window-specific - I tried the Steam build for the first time today and had no issues. I was pleasantly surprised that it uses the same paths for preferences, etc, as my normal development builds.

@shikadiqueen

This comment has been minimized.

Member

shikadiqueen commented May 3, 2018

It is Windows-specific because it's the only platform where log management exists, out of necessity.

(Technical explanation for @Wedge009 and other devs follows. The person posting this report may prefer to stop reading after this line.)

To elaborate, Wesnoth is a GUI application (IMAGE_SUBSYSTEM_WINDOWS_GUI is the subsystem value on the executable header) so it doesn't get a text console by default. I introduced --wconsole in 1.13.2 to allow people to have an option to get a console on startup to see log output in real-time. Additionally, since SDL 2.0 doesn't include the (also Windows-specific) stderr redirection code sitting above our main() that SDL 1.2 had, I introduced our own along with the log rotation feature — without this, console output would not be recorded anywhere even if you used redirection operands on the command prompt, because that's how Windows works with GUI subsystem applications, their stdout and stderr are just discarded entirely unless you do something special with them from inside.

On all other platforms this is a non-issue since stdout and stderr are controlled from outside.

@Wedge009

This comment has been minimized.

Member

Wedge009 commented May 3, 2018

Got it, thanks. Yes, I remember dealing with Console vs GUI for Win32 development...

@robbor8

This comment has been minimized.

robbor8 commented May 3, 2018

@shikadiqueen the folder exists but it's empty

@robbor8

This comment has been minimized.

robbor8 commented May 3, 2018

Not sure if this helps, but cwesnoth.cmd seems to run just fine

@shikadiqueen

This comment has been minimized.

Member

shikadiqueen commented May 4, 2018

That's to be expected since it disables log file management. Do you have any issues writing save files and installing add-ons when it's started like that, though?

Also, do you have your Documents\My Games folder managed using OneDrive, Google Drive, Dropbox or any other kind of cloud storage mechanism? Could you post the log file left behind in Temp when Wesnoth is started with --log-debug=filesystem?

(For Steam, the way to accomplish this would be to go into the game's properties, and set the Launch Options to --log-debug=filesystem. Outside steam you'd add that after the game exe's path in the shortcut properties, one space after the closing quotes.)

@jyrkive

This comment has been minimized.

Member

jyrkive commented May 14, 2018

We got some new information from Ethanil on Discord, who is also affected by this issue:

The folder it is complaining about is in fact read-only but i can't seem to change that... any solutions?

@jyrkive

This comment has been minimized.

Member

jyrkive commented May 15, 2018

More info from Ethanil:

I posted an error message yesterday, found a solution .... my bitdefender blocked wesnoth and i had it on gaming mode so i got no notification about it, unblocking it solved the issue 😃 @jyrkive

So, it appears that AVs are one reason why this issue can occur.

@jyrkive

This comment has been minimized.

Member

jyrkive commented Sep 11, 2018

I happened to run across this tidbit of information, related to the OneDrive problems:

Reparse points can also be used for other functionality such as the placeholder files used by OneDrive in Windows 8.

https://blogs.msdn.microsoft.com/wsl/2016/06/15/wsl-file-system-support/

@GregoryLundberg

This comment has been minimized.

Contributor

GregoryLundberg commented Sep 11, 2018

Probably just being nit-picky but is it C:\Users<username> or C:\Users\<username>?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment