Giter Site home page Giter Site logo

Comments (12)

narnaud avatar narnaud commented on September 13, 2024 1

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.

tt4g avatar tt4g commented on September 13, 2024

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.

tt4g avatar tt4g commented on September 13, 2024

I have read the documentation for the QTEST_MAIN macro used in the following location and it says it creates QApplication object.

https://github.com/narnaud/tst-release/blob/898faf93af139b3fe07ea5a6c2d092d2b93632f2/tests/tst_spdlog.cpp#L26

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.

narnaud avatar narnaud commented on September 13, 2024

The top of the stacktrace is QTest::toString(), so it looks like a QTest 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.

narnaud avatar narnaud commented on September 13, 2024

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.

tt4g avatar tt4g commented on September 13, 2024

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.

narnaud avatar narnaud commented on September 13, 2024

Thank you for your time, I think we can close it... I'm still puzzled by all of this :)

from spdlog.

LeonMatthesKDAB avatar LeonMatthesKDAB commented on September 13, 2024

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.

zchrissirhcz avatar zchrissirhcz commented on September 13, 2024

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.

narnaud avatar narnaud commented on September 13, 2024

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.

zchrissirhcz avatar zchrissirhcz commented on September 13, 2024

@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:

image

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:

Uploading image.png…

from spdlog.

tt4g avatar tt4g commented on September 13, 2024

Resolved (MSVC breaking change): #2902 (comment)

from spdlog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.