Description: CRASH when opening simple document containing multiple shapes with OpenGL enabled Steps to Reproduce: 1. Open the attached file with OpenGL enabled Actual Results: Crash: Gebeurtenisnaam van probleem: BEX Naam van de toepassing: soffice.bin Versie van toepassing: 5.4.0.0 Tijdstempel van toepassing: 591131b2 Naam van foutmodule: StackHash_5861 Versie van foutmodule: 0.0.0.0 Tijdstempel van foutmodule: 00000000 Uitzonderingsmarge: PCH_3F_FROM_ntdll+0x00041318 Uitzonderingscode: c0000005 Uitzonderingsgegevens: 00000008 Expected Results: No crash Reproducible: Always User Profile Reset: No Additional Info: Found in Version: 5.4.0.0.alpha1+ Build ID: 9d320ec4d818f86e58a15fd46248026502b1cc94 CPU threads: 4; OS: Windows 6.2; UI render: GL; TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-05-09_01:27:12 Locale: en-US (nl_NL); Calc: single but not in Versie: 5.3.3.1 Build ID: 46360c72c4823cefeaa85af537fba22bd568da7e CPU Threads: 4; Versie besturingssysteem:Windows 6.2; UI Render: GL; Layout-Engine: nieuw; Locale: nl-NL (nl_NL); Calc: CL DriverVersion: 13.251.0.0 DriverDate: 12-6-2013 DeviceID: PCI\VEN_1002&DEV_683D&SUBSYS_25561458&REV_00 AdapterVendorID: 0x1002 AdapterDeviceID: 0x683d AdapterSubsysID: 0x25561458 DeviceKey: System\CurrentControlSet\Control\Video\{E47C2C57-9564-4982-9151-5BC6501332B9}\0000 DeviceString: AMD Radeon HD 7700 Series User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Created attachment 133200 [details] Example file
Confirmed on Windows 8.1 Ent 64-bit en-US with Version: 5.4.0.0.alpha1+ (x64) Build ID: d33e262a244f351febc9dbe605b05f76cb834eeb CPU threads: 8; OS: Windows 6.29; UI render: GL; TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2017-05-08_01:51:26 Locale: en-US (en_US); Calc: CL Crash report: http://crashreport.libreoffice.org/stats/crash_details/2f118c42-21fd-45bf-aa86-a050927711e7 Drawing opens without issue into Version: 5.3.3.2 (x64) Build ID: 3d9a8b4b4e538a85e0782bd6c2d430bafe583448 CPU Threads: 8; OS Version: Windows 6.29; UI Render: default; Layout Engine: new; Locale: en-US (en_US); Calc: group
Created attachment 133201 [details] WindDbg 64 StackTrace On Windows 8.1 Ent 64-bit en-US with Version: 5.4.0.0.alpha1+ (x64) Build ID: d33e262a244f351febc9dbe605b05f76cb834eeb CPU threads: 8; OS: Windows 6.29; UI render: default; TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2017-05-08_01:51:26 Locale: en-US (en_US); Calc: CL LibreOfficeDev 5.4 - Fatal error "timeout waiting for threadpool tasks" but guess that could be while attached to WinDbg
Created attachment 133203 [details] WinDbg 32 StackTrace with better symbols Crashes on 32-bit Windows builds as well... Version: 5.4.0.0.alpha1+ Build ID: 9d320ec4d818f86e58a15fd46248026502b1cc94 CPU threads: 8; OS: Windows 6.29; UI render: GL; TinderBox: Win-x86@39, Branch:master, Time: 2017-05-09_00:07:01 Locale: en-US (en_US); Calc: CL WinDbg StackTrace with better TB39 symbols attached. !analyze -v says it is an epoxy issue with wgl and vcllo WinOpenGLContext
# 10 Id: 1140.1570 Suspend: 1 Teb: 7f48c000 Unfrozen "thread-pool" ChildEBP RetAddr WARNING: Frame IP not in any known module. Following frames may be wrong. 1f22ec3c 5565a640 0x0 1f22ec44 58810b18 epoxy!epoxy_wglGetCurrentContext_dispatch_table_thunk(void)+0x10 [c:\cygwin\home\tinderbox\master\workdir\unpackedtarball\epoxy\src\wgl_generated_dispatch.c @ 1482] 1f22ec68 58810cf8 vcllo!WinOpenGLContext::isCurrent(void)+0x58 [c:\cygwin\home\tinderbox\master\vcl\opengl\win\gdiimpl.cxx @ 81] 1f22ed40 587f7d1f vcllo!WinOpenGLContext::makeCurrent(void)+0x38 [c:\cygwin\home\tinderbox\master\vcl\opengl\win\gdiimpl.cxx @ 92] odd; any ideas Caolan / Tomaz ?
The wgl dispatch table thing on windows is sort of demand loaded IIRC and doesn't exist until at the first wglMakeCurrent (or something like that) is called. There's a "g_bAnyCurrent" variable on that line 81 to short circuit the case that the dispatch table hasn't been created so nothing could be current. I guess its thread specific or something and this thread hasn't had wglMakeCurrent called but a previous one has and so g_bAnyCurrent is true. Maybe a std::thread_local could be used to test this theory
with whatever buildfixes are required perhaps https://gerrit.libreoffice.org/#/c/41927/ would do something useful here
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=4cc634327a752d633ea341252d8f4845157f887b Resolves: tdf#107730 ensure per-thread epoxy_handle_external_wglMakeCurrent It will be available in 6.0.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.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=45cfa386e312bf70c84fb971a9f7d541353b4809&h=libreoffice-5-4 Resolves: tdf#107730 ensure per-thread epoxy_handle_external_wglMakeCurrent It will be available in 5.4.2. 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.
(In reply to Commit Notification from comment #8) > > http://cgit.freedesktop.org/libreoffice/core/commit/ > ?id=4cc634327a752d633ea341252d8f4845157f887b > > Resolves: tdf#107730 ensure per-thread epoxy_handle_external_wglMakeCurrent > Sorry missed this. Attachment 133200 [details] opens cleanly now with the commit present. On Windows 10 Ent 64-bit en-US with Version: 6.0.0.0.alpha0+ Build ID: dccd1633a111ba124f9868a4a51579c95200d745 CPU threads: 8; OS: Windows 6.19; UI render: GL; TinderBox: Win-x86@39, Branch:master, Time: 2017-09-06_06:44:26 Locale: en-US (en_US); Calc: CL