Description: LibO crashes when trying to drag text with OpenGL enabled Steps to Reproduce: 1. Open Writer 2. Add a line of text: for example 'ABC' 3. Select the text and try to drag it Actual Results: Crash Expected Results: No crash Reproducible: Always User Profile Reset: No Additional Info: Found in Version: 5.4.0.0.alpha0+ Build ID: 92a1ad1f36b6d3cc13135a8c0805508933011577 CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-01-06_23:42:59 Locale: nl-NL (nl_NL); Calc: CL but not in Version: 5.3.0.0.alpha1+ Build ID: 43b5ca69aa545cf93eded55258d92d651917815f CPU Threads: 4; OS Version: Windows 6.2; UI Render: GL; Layout Engine: new; TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-11-18_05:27:05 Locale: nl-NL (nl_NL); Calc: CL User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Created attachment 130375 [details] Backtrace with WinDbg Confirmed. Version: 5.4.0.0.alpha0+ Build ID: db4badfc971b9cc60809c3408f579bae04a77c34 CPU Threads: 4; OS Version: Windows 6.1; UI Render: GL; TinderBox: Win-x86@42, Branch:master, Time: 2017-01-10_23:25:07 Locale: hu-HU (hu_HU); Calc: CL
@Aron, is it possible to bisect this one?
Not reproducible in 5.3.0.2 / Windows 7, so the change hasn't been backported (yet). For the better I guess.
Buovjaga, Xisco, could either of you check if this occurs in Linux, or it's Windows-only? It's still reproducible with the below daily build. Version: 5.4.0.0.alpha0+ Build ID: bbf40e3b5d06bd1437b097ed2703179026d1e871 CPU Threads: 4; OS Version: Windows 6.1; UI Render: GL; TinderBox: Win-x86@42, Branch:master, Time: 2017-01-19_01:45:05 Locale: hu-HU (hu_HU); Calc: CL
OpenGL doesn't work for me on Linux.
Tomaz tested in Linux with a recent master build, no crash. Setting OS to Windows.
Caolán, since the crash is in epoxy, do you think it could be related to the glew -> epoxy change? If so, could you please take a look? (it's a Windows-only crash, which might be less convenient) Bibisect pointed to a huge range of ~850 commits (builds failed inside that range): https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=aabc5aab5af27e929a81a6036d2f470ab1f5ac4d..3e973760b788c49396c7a18404bffa0505e65a04
Here is a stack trace from a bit of debugging: > 00000000() Unknown [Frames below may be incorrect and/or missing] epoxy.dll!epoxy_wglMakeCurrent_unwrapped_dispatch_table_thunk(HDC__ * hDc, HGLRC__ * newContext) Line 1520 C epoxy.dll!epoxy_wglMakeCurrent_wrapped(HDC__ * hdc, HGLRC__ * hglrc) Line 147 C vcllo.dll!WinOpenGLContext::makeCurrent() Line 100 C++ vcllo.dll!OpenGLContext::getVCLContext(bool bMakeIfNecessary) Line 522 C++ vcllo.dll!OpenGLSalGraphicsImpl::AcquireContext(bool bForceCreate) Line 116 C++ vcllo.dll!OpenGLSalGraphicsImpl::InitializePreDrawState(OpenGLSalGraphicsImpl::XOROption eOpt) Line 213 C++ vcllo.dll!OpenGLSalGraphicsImpl::PreDraw(OpenGLSalGraphicsImpl::XOROption eOpt) Line 205 C++ vcllo.dll!OpenGLSalGraphicsImpl::invert(long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) Line 1773 C++ vcllo.dll!WinSalGraphics::invert(long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) Line 231 C++ vcllo.dll!SalGraphics::Invert(long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice * pOutDev) Line 621 C++ vcllo.dll!OutputDevice::Invert(const tools::Rectangle & rRect, InvertFlags nFlags) Line 165 C++ vcllo.dll!ImplCursorInvert(ImplCursorData * pData) Line 124 C++ vcllo.dll!vcl::Cursor::ImplRestore() Line 160 C++ vcllo.dll!vcl::Cursor::ImplDoHide(bool bSuspend) Line 217 C++ vcllo.dll!vcl::Cursor::ImplHide() Line 234 C++ vcllo.dll!vcl::Cursor::Hide() Line 330 C++ swlo.dll!SwVisibleCursor::Hide() Line 112 C++ swlo.dll!SwCursorShell::UnSetVisibleCursor() Line 909 C++ swlo.dll!SwEditWin::DropCleanup() Line 167 C++ swlo.dll!SwEditWin::DragFinished() Line 147 C++ swlo.dll!SwTransferable::DragFinished(char nAction) Line 3213 C++ svtlo.dll!TransferableHelper::dragDropEnd(const com::sun::star::datatransfer::dnd::DragSourceDropEvent & rDSDE) Line 453 C++ dnd.dll!SourceContext::fire_dragDropEnd(bool success, char effect) Line 101 C++ dnd.dll!DndOleSTAFunc(void * pParams) Line 352 C++ [External Code] This is in a separate DnD thread, so possibly the dispatch_table thread-local variable stuff in epoxy is not set up properly for that thread or something? Won't do any more debugging for now.
Created attachment 132320 [details] Patch that needs more work Actually, just after writing that, I had an idea what might fix it, and it worked. The patch needs some more work, though; presumably we can't call epoxy_handle_external_wglMakeCurrent() unconditionally like that, but need to do it only if we are actually using OpenGL.
Tor Lillqvist committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f1e2c030b09d25a285d6a206297f0ef7526ccc4a tdf#105162: Need to call epoxy_handle_external_wglMakeCurrent() It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Tor Lillqvist committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a29f494326b3ed8eba809131b799b649e88b9b85 Revert "tdf#105162: Need to call epoxy_handle_external_wglMakeCurrent()" It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Tor Lillqvist committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d226cfacfd66d5c81d37f707b95f318efe32e5ba tdf#105162: Need to call epoxy_handle_external_wglMakeCurrent() It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I can confirm crash is gone with 5.4 master build (5f282c101a644ffc3615c3dc43ddb99febecae16).
Great; thanks for the fix Tor =)