Discussion:
[Bug 102148] Crash when running qopenglwidget example on mesa llvmpipe win32
(too old to reply)
b***@freedesktop.org
2017-08-11 11:06:43 UTC
Permalink
Raw Message
https://bugs.freedesktop.org/show_bug.cgi?id=102148

Bug ID: 102148
Summary: Crash when running qopenglwidget example on mesa
llvmpipe win32
Product: Mesa
Version: git
Hardware: x86 (IA32)
OS: Windows (All)
Status: NEW
Severity: normal
Priority: medium
Component: Mesa core
Assignee: mesa-***@lists.freedesktop.org
Reporter: ***@fastprotect.net
QA Contact: mesa-***@lists.freedesktop.org

i've compiled the latest mesa version with llvmpipe on win32 (with
msvc2015) with
"scons build=debug MSVC_VERSION=14.0 opengl32" (with LLVM 4.0). The version
i've compiled is 165be830fd822b8a76ee35080c214e2243d6d0f6 (from 07.08.2017
14:14:38).

Then I downloaded the QtCreator and tried to run the qopenglwidget example
(see
http://code.qt.io/cgit/qt/qtbase.git/tree/examples/opengl/qopenglwidget?h=5.6)
from Qt version 5.6. I copied the mesa opengl32.dll into the application
directory, but it immediately crashes on application startup.

This is the callstack i get in QtCreator:
1 RtlEnterCriticalSection ntdll
0x779d22e2
2 mtx_lock threads_win32.h
436 0x3435cba
3 lp_fence_wait lp_fence.c
119 0x3436404
4 llvmpipe_fence_finish lp_screen.c
616 0x3433ff9
5 st_context_flush st_manager.c
638 0x3040a08
6 stw_make_current stw_context.c
431 0x301d3cc
7 DrvSetContext stw_context.c
930 0x301cc3c
8 wglMakeCurrent stw_wgl.c
114 0x4e85eb3
9 QWindowsGLContext::updateObtainedParams qwindowsglcontext.cpp
1262 0xd09e6e
10 QWindowsGLContext::QWindowsGLContext qwindowsglcontext.cpp
1194 0xd09070
11 QOpenGLStaticContext::createContext qwindowsglcontext.cpp
266 0xd08a56
12 QWindowsIntegration::createPlatformOpenGLContext
qwindowsintegration.cpp 413 0xcae22e
13 QOpenGLContext::create qopenglcontext.cpp
606 0xfab662e
14 QOpenGLWidgetPrivate::initialize qopenglwidget.cpp
759 0x64da5bca
15 QOpenGLWidget::resizeEvent qopenglwidget.cpp
1172 0x64da4ccd
16 QWidget::event qwidget.cpp
8913 0x64d68a1b
17 QOpenGLWidget::event qopenglwidget.cpp
1345 0x64da4e99
18 QApplicationPrivate::notify_helper qapplication.cpp
3804 0x64d19b4b
19 QApplication::notify qapplication.cpp
3767 0x64d17c7e
20 QCoreApplication::notifyInternal2 qcoreapplication.cpp
1015 0x6641ee1c
... <More>


It crashes because the ctx passed into llvmpipe_fence_finish() is NULL.

Is this a known issue or is there some build option which might result in
some missing functionality which result in this kind of crash.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2017-08-16 07:49:45 UTC
Permalink
Raw Message
https://bugs.freedesktop.org/show_bug.cgi?id=102148

--- Comment #1 from ***@gmail.com ---
Created attachment 133534
--> https://bugs.freedesktop.org/attachment.cgi?id=133534&action=edit
Fixes the win32 llvmpipe crash

Fixes the crash with llvmpipe on Win32 by adding another null check (*fence is
expected to be non-null).
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2017-08-16 08:07:10 UTC
Permalink
Raw Message
https://bugs.freedesktop.org/show_bug.cgi?id=102148

--- Comment #2 from Andreas Roth <***@fastprotect.net> ---
(In reply to frank.richter from comment #1)
Created attachment 133534 [details] [review]
Fixes the win32 llvmpipe crash
Fixes the crash with llvmpipe on Win32 by adding another null check (*fence
is expected to be non-null).
I tried your fix and it works. Thank you very much!

Hope this fix will land in the official mesa source tree soon.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2017-08-16 13:20:27 UTC
Permalink
Raw Message
https://bugs.freedesktop.org/show_bug.cgi?id=102148

--- Comment #3 from Brian Paul <***@vmware.com> ---
Thanks for the patch. Looks good to me. I'll just clean up the commit message
before pushing.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2017-08-17 00:34:40 UTC
Permalink
Raw Message
https://bugs.freedesktop.org/show_bug.cgi?id=102148

Brian Paul <***@vmware.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED

--- Comment #4 from Brian Paul <***@vmware.com> ---
Patch pushed as commit 496a691e3544d082670ac1f33059692510a2a86d
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
Loading...