jkriege2 / JKQtPlotter

an extensive Qt5 & Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
http://jkriege2.github.io/JKQtPlotter/index.html
GNU Lesser General Public License v2.1
866 stars 187 forks source link

Release mode runtime error #141

Open sajadblog opened 1 week ago

sajadblog commented 1 week ago

Hi,

First of all, thank you for your tremendous effort in developing an excellent plotting tool. I’ve been using version 4.0.3 in my application, and it worked flawlessly in both release and debug modes.

Last week, I switched to the latest version on the main branch to take advantage of the MultiAxis graph and ColoredBar chart. While everything compiles and executes correctly in debug mode, I’m encountering a runtime error in release mode. The error seems to originate from within the Qt core library. It’s intermittent—sometimes the application runs fine, and other times, it fails at startup.

It seems like this issue might be related to some initialization that’s occasionally missing, as the error only occurs during startup. Once the application is running, everything works as expected.

I’ve attached two images related to the error. In most cases, one of the errors in the images occurs, though on rare occasions, it runs normally.

There is only one thread in the application.

Error1 Error2

jkriege2 commented 6 days ago

Hmmm ... hard to say ... I played around a bit with adress-sanitizer (the MSVC flavour), but couldn't find any issues ... other than that I never encountered such problems ...

Is your application very complex? Could there be any other source of heap corruption?

jkriege2 commented 6 days ago

Could you use adress sanitizer on your application?

sajadblog commented 1 day ago

Yes, it's really hard to pinpoint the issue. I tried ASan, and while there were no errors during compilation, it consistently shows this exception at runtime.

If I am the only one facing this issue, I’d suspect something unique to my application. However, since this is the only third-party library where the problem occurs, I’d greatly appreciate it if you could let me know if you have any suspicions about the cause.

image