-
Notifications
You must be signed in to change notification settings - Fork 883
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
startup error on Windows11 24H2 #957
Comments
Sorry for forgetting to mention that I am using version 2.1.7 of mimalloc |
Yikes -- that's a bit scary. I recently updated the redirection dll; can you perhaps try with the latest Also, if it still fails, can you try with the environment variable |
I have the same problem with the latest mimalloc-redirect.dll version Unhandled exception at 0x00007FF891B55CC9 (ntdll.dll) in 1.exe: 0xC0000005: Access violation reading location 0x0000000000000000. Call stack:
|
Ah great -- thanks, I'm looking into it. It is a bit strange to see an access violation inside ntdll though... |
I updated mimalloc-redirect in the latest |
It didn't work for me, the same error. |
Ok -- I need to get my hands on a 24H2 windows version then -- that would be earliest later next week though :-( |
ok, thanks a lot. BTW I'm using version 2.0.3. |
Thank you for your work. I will test it tomorrow. |
I conducted two tests, |
I got my hands on Windows 24H2, version 10.0.26100.2314 (use I could not reproduce the issue though. I see patch 2314 came out on Nov 12 -- maybe this fixed the issue? Can you try this? |
On my machine, |
I tried the 2314 patch (downloaded from https://www.windowslatest.com/2024/11/12/windows-11-kb5046617-24h2-out-with-fixes-direct-download-msu/), after installing it and restarting my computer, Then, when I ran my program, the error 0xc0000142 still persisted. |
I tried to create a new project with VS, a console application, and then introduced mimalloc (using the same dynamic libraries, mimalloc-override.dll and mimalloc-redirect.dll, following the same steps). When I ran it on Windows 11 24H2, everything worked fine, and the console printed "Hello World!". Oh my goodness, now I'm completely at a loss. I don't know how to solve the issue with my program. |
For me the problem was solved after I added the inclusion of the <mimalloc-new-delete.h> to the file that contains the main function. |
I had the same issue too (started happening after I upgraded to 24H2). Mine is a simple Qt application and I was (probably incorrectly), doing the #include "mimalloc-override.h" after including the Qt headers. Moving mimalloc-overide near the top of the include chain seems to have fixed the issue, although I'm now getting compile warnings about Qt (C:\Qt\6.7.1\msvc2019_64\include\QtCore\qhash.h(123,15): warning C4003: not enough arguments for function-like macro invocation 'free'). Still... better than the immediate startup crash :-) Hope this helps someone |
We are having the same problem here too, updated Windows to 24H2 (26100.2314) over the weekend, now (Monday), got this access violation, we are using mimalloc version 1.8.7:
Not sure if it makes sense, but only seems to happen with debug version, not release version |
We're experiencing the same issue after updating to Windows 24H2 (26100.1742) this week. We're encountering an access violation and are using mimalloc version 2.0.6. |
I had to revert my Windows to 23H2, @daanx could you give us any feedback on this? Even if it's "I'm not gonna fix it", because then we can at least look for other options. |
Hmm, this is not great. Unfortunately, I cannot repro the problem (yet). I wonder if it has to do with a locale setting, or DLL's with paths that contain fun unicode characters. If anyone has an exe that reproduces this, that would be great. Another thing I could do is remove the calls to RtlUnicodeToAnsiString -- maybe that would fix it. I checked the code though and all parameters are good -- really strange it fails. TBC. |
This problem occurs when the main project is built first with a <mimalloc-new-delete.h> header included, and then another executable is built using the same generated object files, but the file containing the main function in the second executable doesn't include the <mimalloc-new-delete.h> header. In my case, the project's executable was built first, and then unit tests were built using the generated object files, but the file containing the main function in the unit tests didn't include the <mimalloc-new-delete.h> header. |
So, I created a version of the redirect that avoids calling RtlUnicodeStringToAnsiString -- maybe it will avoid the crash; As I can't repro myself it is a bit of an experiment, for now, you can download a binary (dll+lib) at: It works with any mimalloc version, just make sure the files are in the same folder as the executable (and overwrite the old dll that is failing). Then run with |
I tried replacing this version of mimalloc-redirect, but unfortunately, the crash issue still occurs. |
:-( Can you capture a stack trace ? Otherwise, if any of you have an exe that can be shared, maybe that helps me to get a repro on my local machine. (best is of course source code for the exe so I can build it myself) |
What is the locale setting? Also, if you think it is the load order, maybe you can use |
Thanks for all the traces -- I'll look further into trying to repro on my machines. I need to figure out how to trigger this, and what is different:
If you experience a crash, please also report:
|
|
I gave it another try -- I cannot repro still; but maybe the following version of |
|
Thanks @daanx , this works for me. Can you tell me from which version of mimalloc this dll was compiled? It could be the commit id, or the tag. did you use C++ or C compilation? |
Also works for me! Really appreciate it, thanks so much! |
Great to hear this :-) I pushed updated redirection modules to the latest |
My program uses the mimalloc dynamic library, and when it starts on Windows 11 24H2, a popup error occurs stating, "The application was unable to start correctly (0xc0000142). Click OK to close the application." I have tested it and found that it works normally on Windows 11 23H2. Currently, I have switched the dynamic library to a static library, and users on Windows 11 24H2 are not encountering any startup errors.
The text was updated successfully, but these errors were encountered: