Comments (12)
Ok, we are experiencing a problem on Windows runner in release mode on different repository (some where passing before).
May be related to: actions/runner-images#10019
So nothing to do with spdlog or Qt apparently...
from spdlog.
The top of the stacktrace is QTest::toString()
, so it looks like a QTest
problem.
Why did you think it was an spdlog problem?
from spdlog.
I have read the documentation for the QTEST_MAIN
macro used in the following location and it says it creates QApplication
object.
Although this is the case with PyQt5, there have been reports of crashes with GItHub Action when using QApplication
: https://stackoverflow.com/questions/60692711/cant-create-python-qapplication-in-github-action
I think the crash is caused by Qt.
from spdlog.
The top of the stacktrace is
QTest::toString()
, so it looks like aQTest
problem. Why did you think it was an spdlog problem?
There are different reasons for that, but maybe my conclusions are wrong:
- the link I sent is just a small test-case, on my bigger project, if I remove spdlog all tests are passing
- a normal test not using spdlog just pass (I've added one here: https://github.com/narnaud/tst-release/actions/runs/9427392246/job/25971452412?pr=5)
- the stacktrace shows an exception raised after calling a spdlog function. I agree the tip of the stacktrace is QTest::toString, but at this point QTest is trying to handle the exception gracefully
Of course, I may be wrong, I need to create a test case without Qt. Maybe the problem is the combination of Qt/spdlog/Windows github CI?
from spdlog.
I can confirm it's the combination of Qt / spdlog / Windows github CI in release.
I tried with doctest, and the test is passing:
https://github.com/narnaud/tst-release/actions/runs/9427485839/job/25971652480?pr=6
Sorry for the noise. Now I wonder how I am going to find the problem...
from spdlog.
If the problem only occurs when using QTest, then that is the cause.
I don't think the Qt experts are checking here, so you should ask your question in the Qt community.
from spdlog.
Thank you for your time, I think we can close it... I'm still puzzled by all of this :)
from spdlog.
For completeness sake: The issue seems to be resolved now with the newest Windows runners.
So time to revert the workarounds and reenable spdlog in our tests 😅
from spdlog.
Hi, @narnaud and @LeonMatthesKDAB , I meet a very similar crash on Windows. I paste my minimal reproducible example steps in #2902, which use a very simple code, no Qt stuffs:
#include <spdlog/spdlog.h>
int main()
{
SPDLOG_INFO("x");
return 0;
}
I'm also puzzled with what help solved the KDAB/knut. Just update github action's windows image? Well, my reproduce runs on a local machine, with latest Visual Studio 2022 installed (17.10.3). @narnaud Do you use a exactly same version Visual Studio 2022 in your github action and your local machine? If possible, would you please use my minimal code for reproduce trial? Note that I did not enable Address Sanitizer, and crash only occurs in Release
and RelWithDebInfo
configurations.
from spdlog.
Hi @zchrissirhcz
I didn't test you minimal example, but everything is working for us on the github workers or locally on my computer (latest version of VS 2022).
I would suggest to try a known version of spdlog instead of using master first.
Sorry, I can't help you more than that.
from spdlog.
@narnaud Thanks for your reply. I also tried spdlog versions 1.14.1
and 1.12.0
, they both reproduce, then I switch to v1.x
(the "master" you mentioned, I guess), also reproduce. Could you please help verify your local machines Visual Studio version? That is in Help
-> About
,
My reproduce uses "the latest version", which is 17.10.3
:
And uninstall that version of VS2022, install an older version, 17.9.7
, from https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history#uninstalling-visual-studio-to-go-back-to-an-earlier-release , cannot reproduce it anymore:
from spdlog.
Resolved (MSVC breaking change): #2902 (comment)
from spdlog.
Related Issues (20)
- ANSI color sink on Windows
- Resource deadlock would ocur HOT 6
- Undefined symbol error for spdlog::details::os::utf8_to_strbuf on Windows HOT 1
- build with SPDLOG_FMT_EXTERNAL_HO error HOT 2
- Windows linker warnings disabled HOT 1
- How do I log a std::iostream? HOT 2
- [MSVC 17.10.5] spdlog::sinks::base_sink<Mutex>::set_pattern() crash HOT 5
- For non-SPDLOG_HEADER_ONLY builds enable export attributes for symbols HOT 9
- Enums do not work. HOT 1
- Why customized logger can't print function name? HOT 3
- When initializing, it prompts "simple log instance" HOT 1
- spdlog does not print in python async function HOT 1
- error: call to non-‘constexpr’ function ‘long int sysconf(int)’ HOT 1
- I found that we can use python format style: HOT 2
- Setting compile time log level seems broken. HOT 10
- Can old files in the Rotating files feature be named by date?
- The description for Event ID 1000 from source XXX cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. HOT 2
- Is spdlog can support placeholders %0 %1 like {0} {1} HOT 2
- fmt conflict with another lib (VRS) HOT 1
- getting exception: spdlog::spdlog_ex HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spdlog.