Skip to content
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

Closed
robbor8 opened this issue May 3, 2018 · 17 comments
Closed

Log relocation error #2999

robbor8 opened this issue May 3, 2018 · 17 comments
Labels
Bug Issues involving unexpected behavior. Engine General game engine issues that do not fit in any other category.

Comments

@robbor8
Copy link

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

@irydacea
Copy link
Member

irydacea 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?

@irydacea irydacea added Bug Issues involving unexpected behavior. Windows OS-specific issues that apply to Microsoft Windows Stable 1.14 Issues specific to the Wesnoth 1.14 maintenance branch. labels May 3, 2018
@Wedge009
Copy link
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.

@irydacea
Copy link
Member

irydacea 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
Copy link
Member

Wedge009 commented May 3, 2018

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

@robbor8
Copy link
Author

robbor8 commented May 3, 2018

@shikadiqueen the folder exists but it's empty

@robbor8
Copy link
Author

robbor8 commented May 3, 2018

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

@irydacea
Copy link
Member

irydacea 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
Copy link
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
Copy link
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
Copy link
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
Copy link
Contributor

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

@sevu sevu removed the Stable 1.14 Issues specific to the Wesnoth 1.14 maintenance branch. label Jun 12, 2019
@Wedge009 Wedge009 added the Engine General game engine issues that do not fit in any other category. label Sep 13, 2019
@cooljeanius
Copy link
Contributor

I think this affects save files too, and not just log files

@soliton-
Copy link
Member

Do you have any indication on how this can possibly affect save files?

@cooljeanius
Copy link
Contributor

Do you have any indication on how this can possibly affect save files?

It was something I noticed when trying to play on a different computer that I don't currently have access to at the moment, so, no, I can't find the info that I thought indicated this at the moment; sorry...

@Wedge009
Copy link
Member

Wedge009 commented Mar 6, 2023

Would be good to have a current report on this. Not that I expect it should affect the underlying log location issue, but logs are written by default across platforms now, so this may not be Windows-specific any more.

@Pentarctagon Pentarctagon removed the Windows OS-specific issues that apply to Microsoft Windows label Mar 6, 2023
@Pentarctagon
Copy link
Member

It might be best to close this issue and open one specifically for the OneDrive problem? This specific error message doesn't exist anymore since the logging system consolidation and if Wesnoth doesn't have write permission to a folder it needs then that's not really something Wesnoth can solve.

@Wedge009
Copy link
Member

Wedge009 commented Mar 6, 2023

If the error doesn't exist any more, then it sounds like this issue is resolved, at least for 1.17.

@Wedge009 Wedge009 closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues involving unexpected behavior. Engine General game engine issues that do not fit in any other category.
Projects
None yet
Development

No branches or pull requests

9 participants