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

[no squash] Windows stuff #14207

Merged
merged 5 commits into from Jan 6, 2024
Merged

[no squash] Windows stuff #14207

merged 5 commits into from Jan 6, 2024

Conversation

sfan5
Copy link
Member

@sfan5 sfan5 commented Jan 2, 2024

there isn't much to write here because I tested all of it

perhaps about the second commit: if you run this test with a MinGW build it should fail.

@sfan5 sfan5 added @ Build CMake, build scripts, official builds, compiler and linker errors Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements Windows labels Jan 2, 2024
@lhofhansl
Copy link
Contributor

Does this change the MINGW crash upon exit?

@sfan5
Copy link
Member Author

sfan5 commented Jan 2, 2024

Does this change the MINGW crash upon exit?

no
if you want to test a build that doesn't crash try this:
minetest-llvm-mingw.zip

src/porting.cpp Outdated Show resolved Hide resolved
@SmallJoker
Copy link
Member

SmallJoker commented Jan 4, 2024

Did a few quick tests on Windows (Wine is too broken) and the console does show up as expected. --run-unittests no longer needs the --console argument, which is good to see. Also a minidump file is generated upon crash, which is at least something.

There seems to be an issue after the unittest "testGetModMediaPathsWrongDir". The most recent MSVC x64 build produces the following dump:

FAULTING_IP: 
minetest+3edd88
00007ff7`69ebdd88 4c8b7f10        mov     r15,qword ptr [rdi+10h]

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ff769ebdd88 (minetest+0x00000000003edd88)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 0000000000000050
Attempt to read from address 0000000000000050


STACK_TEXT:  
00000059`51fef320 00007ff7`69e72066 : 00000059`51fef690 00000167`26006900 00000059`51fef690 00000000`00000300 : minetest+0x3edd88
00000059`51fef5c0 00007ff7`69ec0feb : 00007ff7`6a27ec30 00007ff7`6a15bc78 00007ff7`6a27ec30 00000000`0009611c : minetest+0x3a2066
00000059`51fef630 00007ff7`69e727d4 : 00000000`000960ec 00000000`00000308 00000167`26006900 00007ff7`6a27ec30 : minetest+0x3f0feb
00000059`51fef6e0 00007ff7`69e72ec0 : 00000167`2601c3d0 00000000`00000003 00000000`00000003 00000000`00000000 : minetest+0x3a27d4
00000059`51fef730 00007ff7`69f355c1 : 00000000`000951ce 00000000`00000010 00000000`00000000 00000000`00000000 : minetest+0x3a2ec0
00000059`51fef7c0 00007ff7`69c52edc : 00007ff7`00000002 00000167`2603cf90 00000059`51fefa01 00000167`2605edd0 : minetest+0x4655c1
00000059`51fefde0 00007ffb`b6f774b4 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : minetest+0x182edc
00000059`51fefe20 00007ffb`b83226a1 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x14
00000059`51fefe50 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21

But that can be fixed in a later PR. Without setting up a build env on Windows this rather prevents me from checking whether testTLS() works because it would be executed after the crash code. The buildbot checks seem to pass, so that's fine by me.

@sfan5
Copy link
Member Author

sfan5 commented Jan 4, 2024

this rather prevents me from checking whether testTLS() works

You can use --test-module TestThreading.

@SmallJoker
Copy link
Member

You can use --test-module TestThreading.

I figured this requires --run-unittests to be specified as well. This is not visible from the --help output but fine by me. The tests passed.

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sfan5 sfan5 merged commit 8db4ba9 into minetest:master Jan 6, 2024
13 checks passed
@sfan5 sfan5 deleted the wstuff2024 branch January 6, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Build CMake, build scripts, official builds, compiler and linker errors Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️ Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants