Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.2, 5.8.0
-
None
-
1dda472b72592aaef365c05365c2907894a35bc6
Description
Release builds are triggering assertions from qtwebengine (no steps to reproduce, but this is randomly seen when web content is being rendered):
2016-11-22 08:41:04,791 QtLogger [0x700000117000] FATAL ASSERT:
"texture->hasAlphaChannel() || !quadNeedsBlending" in file /qt5/qtwebengine/src/core/delegated_frame_node.cpp, line 382
The reason for assertion in release build is that when Qt build is configured with "release" qtwebengine gets QT_NO_DEBUG definition and Q_ASSERTs will be suppressed. When Qt is configured with "debug-and-release" (which was the case with us) QT_NO_DEBUG isn't defined for qtwebengine component build and Q_ASSERT will trigger assertion.
To fix this we could rely that on release build NDEBUG is defined, and use that for suppressing Q_ASSERTs with the following patch:
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index a7183cb..4f2f773 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -694,7 +694,7 @@ Q_NORETURN Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line) Q_DECL_NOTHROW; #if !defined(Q_ASSERT) -# if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) +# if ( defined(QT_NO_DEBUG) || defined(NDEBUG) ) && !defined(QT_FORCE_ASSERTS) # define Q_ASSERT(cond) do { } while ((false) && (cond)) # else # define Q_ASSERT(cond) ((!(cond)) ? qt_assert(#cond,__FILE__,__LINE__) : qt_noop())