Crashes on start in debug mode w/ invalid OpenGL error (OS X, Qt 5.7+)

Bug #1628072 reported by Austen McDonald on 2016-09-27
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Stellarium
High
Florian Schaukowitsch

Bug Description

Newly-built trunk crashes on start w/ "Invalid openGL operation. It is likely that you used openGL calls without having a valid instance of StelPainter." log.txt and crash output attached as one file (since this bug reporting flow doesnt allow multiple attachments, lol)

$ open Stellarium.app --args -d

Related branches

Austen McDonald (austenmc) wrote :
tags: added: mac-os-x opengl qt-5.7
Changed in stellarium:
importance: Undecided → High
status: New → Confirmed
milestone: none → 1.0.0

Still here as of today (see log attached).

Alexander Wolf (alexwolf) wrote :

Nicolas, please check this branch on your Mac: lp:~fschauk/stellarium/qopenglwidget

Florian Schaukowitsch (fschauk) wrote :

Hello Nicolas,
I think this is because you are trying to build with Qt 5.7. There is currently a bug in Qt (https://bugreports.qt.io/browse/QTBUG-56798) which may cause OpenGL errors with Stellarium. Please try it with Qt 5.6. The same issue will most likely happen with my new branch when used with 5.7.

@Alexander:
Is it ensured that Qt 5.7 is not being used in official Mac release builds?

summary: - Crashes on start w/ invalid OpenGL error (OS X)
+ Crashes on start w/ invalid OpenGL error (OS X, Qt 5.7)

Binary packages for Windows/OS X has been built with Qt 5.6.2 (0.15.1 will be on Qt 5.6.2 too)

I confirm this bug with Qt 5.7. A simple workaround is to add a dummy glError call before the two affected assert in StelPainter. It's only a problem in debug mode, so a release would still work.

Hopefully Qt 5.8 fixes this problem.

I too confirm that with Qt5.6.2 (and debug mode), the crash doesn't occur. When in release (not debug) mode, even with Qt5.7.1, no crash any more. :-)

Thank you Florian and Guillaume.

Alexander Wolf (alexwolf) wrote :

Could you check it in Qt 5.8?

no longer affects: stellarium/0.15

Just checked with Qt 5.8.0. Same error:

[StelPropertyMgr] Registering object "SolarSystemEditor"
Using the ssystem.ini file that already exists in the user directory...
/Users/nicolas/Development/stellarium/stellarium/src/core/StelApp.cpp:689: OpenGL error: 1282 (GL_INVALID_OPERATION)

ASSERT failure in GL macro: "OpenGL errors encountered", file /Users/nicolas/Development/stellarium/stellarium/src/core/StelApp.cpp, line 689

To be precise:

* current build (release 9175) with Qt 5.8.0 crashes when compiled in debug mode;
* it doesn't crash the compiled in release mode (i.e. cmake -DCMAKE_BUILD_TYPE=Release ../..)

summary: - Crashes on start w/ invalid OpenGL error (OS X, Qt 5.7)
+ Crashes on start w/ invalid OpenGL error (OS X, Qt 5.7 and 5.8)
tags: added: qt-5.8

Can we fix this for Macs as Guillaume suggested?

r9202 clears the GL error state in debug mode after using QPainter functions (in StelMainView and StelPainter::drawText), this seems to prevent the crashes without removing our own GL error checking.

Note: the upstream Qt bug fix is slated to be released with 5.8.1.

Changed in stellarium:
assignee: nobody → Florian Schaukowitsch (fschauk)
status: Confirmed → Fix Committed
summary: - Crashes on start w/ invalid OpenGL error (OS X, Qt 5.7 and 5.8)
+ Crashes on start in debug mode w/ invalid OpenGL error (OS X, Qt 5.7+)
Changed in stellarium:
milestone: 1.0.0 → 0.15.2

Hi Florian,

Confirming that I can't reproduce the bug anymore with your fix. :-)
Thanks!

Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments