-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Using Spdlog on Windows 32 bits apps always returns error level -1073741819 while closing #3220
Comments
-1073741819 is 0xC0000005, this error code means an access violation. Could you provide traceback? |
Thanks @tt4g for getting back to me. I did a sample app to detail what's the issue (and the fact that it comes from SPDLog version 1.14.0 and above). The sample is build on a Windows platform using mingw32 (version 8.1.0 - but I do not think the mingw version really matters). Sample attached manages version of spdlog as build variable. Here I used the following conditions:
You will see on code that I build it and run it on a computer with Windows 7 64 bits. In any case it operates right. Now, when running on Windows 10 computer the %errorLevel% variable varies depending on the compile conditions:
Please find attached the sample program (without compiled files nor dll), I will try another comment to send the compile file (if github accept them...) Note: I include as well my CLion Workspace definitions if it can help... |
Full project path with required dlls and compiled apps |
In the source code, |
Hi again @tt4g , thanks for getting back to me again. I tried with the following coding:
In all cases it always return Note that the code I sent you originally (To adapt) is operating fine when compiled with 64 bits option... |
Please call And since the access violation occurs after |
Ok, I tried with many different options and possibilities (with console only, file only, with and without flush methods...). Here is code it turned finally turned out:
So as long as I ask to log something, it returns with error I cannot go further on testings. I will try to pull commits between versions 1.13.0 and 1.14.1 to point out when SDPLog started to return this error |
Ok, it took me a while, but I was finally able to catch the commit culprit: With this commit I'm starting to get troubles as mentioned previously. I'm not really involved in the process, but if you wish me to make some more tests, or check compile result, please feel free to get back to me! |
It appears that MinGW has a problem with the combined use of the The report is from 2017, but if this bug is still there, it is a compiler issue and spdlog cannot fix it. |
In the latest source code (not yet released), You can avoid using |
I found a report of the same problem: #3100 |
Well catch @tt4g ! I checked on branch 1.x and it worked perfectly by adding compile option So yes, I agree that it's an issue from mingw. the thing that I do not really catch, is that's it only affected 32 bits compilation. Anyhow, as you correctly mentioned, this is an issue from mingw, and the solution provided works perfectly. Thanks again for all the support |
Since version 1.14.0 of SPDLog I'm having troubles while compiling 32 bits applications that includes SPDLog libs.
When closing the application the app always returns error level -1073741819 on Windows 10 and Windows 11 operating systems whatever the return state of the
main.cpp
Version 1.13.0 and below of SPDLog are not affected by this issue.
Compile options: mingw32
Note: The error level really depends on the operating system the application is running:
main.cpp
I did not check other operating system as they are not on my scope of use.
It apparently seems to be linked to update of "bundled fmt" to version 10.2.1
The text was updated successfully, but these errors were encountered: