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

os.tempfolder is broken on Windows #7430

Closed
sfan5 opened this issue Jun 10, 2018 · 4 comments
Closed

os.tempfolder is broken on Windows #7430

sfan5 opened this issue Jun 10, 2018 · 4 comments
Labels
Bug Issues that were confirmed to be a bug High priority Windows

Comments

@sfan5
Copy link
Member

sfan5 commented Jun 10, 2018

Reproduced on Wine, but it looks like the problem happens on real Windows too.

With some debug output added inside os.tempfolder and dlg_contentstore.lua:

filetocheck = '\s1d.'
randname = 'MTTempModFolder_1185'
screenshot_dir = '\MTTempModFolder_1185'
2018-06-10 18:50:49: ERROR[Main]: GUIEngine: execution of menu script failed: Failed to load and run script from Z:\var\tmp\minetest-0.5.0-90acb9b-win64\bin\..\builtin\init.lua:
2018-06-10 18:50:49: ERROR[Main]: ...acb9b-win64\bin\..\builtin\mainmenu\dlg_contentstore.lua:24: assertion failed!

This was caused by a2de439, @nOOb3167

@sfan5 sfan5 added Bug Issues that were confirmed to be a bug Windows High priority labels Jun 10, 2018
@Fixer-007
Copy link
Contributor

Fixer-007 commented Jun 11, 2018

Can confirm this on win7

@nOOb3167
Copy link
Contributor

https://blogs.msdn.microsoft.com/vcblog/2014/06/18/c-runtime-crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1/

tmpnam Generates Usable File Names: In previous versions, the tmpnam and tmpnam_s functions generated file names in the root of the drive (e.g. \sd3c.). These functions now generate usable file name paths in a temporary directory.

The '\s1d.' filename format is a tmpnam defect fixed somewhere in year 2014.
I think VS 2012 and earlier do not support enough C++11 standard to build minetest.
So I assume you are using Visual Studio 2013 to build?
Visual Studio 2015, 2017, or higher should be safe.

What toolchain produces the defective builds?
In worst case scenario even MinGW build could be affected, if they tried to be bug-compatible with older visual studio.

@SmallJoker
Copy link
Member

So I assume you are using Visual Studio 2013 to build?

They're using GCC/MinGW to cross compile it for Windows (we have a buildbot script for that). What we need here is glue to provide compatibility for MSVC >= 2015 and MinGW.

nOOb3167 added a commit to nOOb3167/minetest that referenced this issue Jun 12, 2018
@SmallJoker
Copy link
Member

#7443 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug High priority Windows
Projects
None yet
Development

No branches or pull requests

4 participants