Bug report #20363

QGIS 3.4.1 : CRASH : Settings->Options (OpenCL related)

Added by al piszcz over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:High
Assignee:Alessandro Pasotti
Category:GUI
Affected QGIS version:3.5(master) Regression?:No
Operating System:WINDOWS10/64 / QGIS 3.4.1 Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:28184

Description

User Feedback

MAIN MENU->Settings->Options

Report Details

Crash ID: 452ad6c5c156924baee2fd79612a09da73062e9e

Stack Trace

clGetGLContextInfoKHR :
clGetGLContextInfoKHR :
clGetGLContextInfoKHR :
clGetGLContextInfoKHR :
clGetGLContextInfoKHR :
clGetKernelSubGroupInfoKHR :
clGetKernelSubGroupInfoKHR :
clGetKernelSubGroupInfoKHR :
clGetPlatformIDs :
clEnqueueTask :
clEnqueueWriteBufferRect :
clEnqueueWriteBufferRect :
clWaitForEvents :
RtlRunOnceExecuteOnce :
InitOnceExecuteOnce :
clGetPlatformIDs :
QgsOpenClUtils::errorText :
QgsOpenClUtils::activate :
QgsQtLocationConnection::startSatelliteMonitor :
QgsQtLocationConnection::startSatelliteMonitor :
RtlRunOnceExecuteOnce :
InitOnceExecuteOnce :
_crtInitOnceExecuteOnce :
QgsOpenClUtils::init :
QgsOpenClUtils::available :
QgsOptions::QgsOptions :
QgisApp::createOptionsDialog :
QgisApp::showOptionsDialog :
QgisApp::options :
QMetaObject::activate :
QAction::activate :
QMenu::actionGeometry :
QMenu::actionGeometry :
QMenu::mouseReleaseEvent :
QWidget::event :
QMenu::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.4.1-Madeira
QGIS code revision: 383851c597
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.3.2
Running against GDAL: 2.3.2

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.16299

Report_settings_options_crash.txt Magnifier (1.57 KB) Antonio Viscomi, 2018-11-07 04:21 PM

settings options.avi (2.26 MB) Antonio Viscomi, 2018-11-07 04:21 PM


Related issues

Duplicated by QGIS Application - Bug report #20328: CRASH : Settings->Options Closed 2018-11-02
Duplicated by QGIS Application - Bug report #20330: CRASH : Settings->Options Closed 2018-11-02
Duplicated by QGIS Application - Bug report #20768: QGIS Crashes everytime I click Options under Settings Tab Closed 2018-12-11
Duplicated by QGIS Application - Bug report #20935: QGIS crashes when opening configurations -> options Closed 2019-01-07

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Regression? changed from No to Yes
  • Crashes QGIS or corrupts data changed from No to Yes

#2 Updated by Alessandro Pasotti over 5 years ago

I think that this was fixed in 3.4.1, can you try that version?

#3 Updated by Alessandro Pasotti over 5 years ago

  • Status changed from Open to Feedback

#4 Updated by Alessandro Pasotti over 5 years ago

Nevermind, I thought you was using 3.4, btw I thought this was fixed recently.

#5 Updated by Alessandro Pasotti over 5 years ago

  • Assignee set to Alessandro Pasotti

To help us debug this, please answer the questions below:
- how did you install QGIS 4.3.1?
- what graphic card(s) do you have?
- do you have any graphic cars SDK installed (from Nvidia, ATI or Intel ?)
- please search your system for the following files:
- OpenCL.lib
- OpenCL.dll

#6 Updated by Daria Svidzinska over 5 years ago

Dear Alessandro,

as I am encountering the same problem, please let me comment.

I am using QGIS 3.4.1 64 bit on Windows 7 x86_64

- I installed (updated) QGIS 3.4.1 via OSGeo4W installer
- I have two graphic cards: Intel(R) HD Graphics 3000 and NVIDIA GeForce 610M
- regarding the SDKs I assume the answer is no, but telling the truth I do not know how to check it
- OpenCL.lib is absent
- OpenCL.dll is present in the C:\Windows\System32 directory

Hope this helps

#7 Updated by Antonio Viscomi over 5 years ago

Alessandro Pasotti wrote:

Nevermind, I thought you was using 3.4, btw I thought this was fixed recently.

Hi Alessandro,
this issues it appears again in 3.4.1 and Master 0ea86bf0a5

I attach a screencast and the essor message here

I hope this can help you

(as soon as I started QGIS 3.4.1 this morning the Font was set to 4 points size)

regards

#8 Updated by Antonio Viscomi over 5 years ago

Antonio Viscomi wrote:

Alessandro Pasotti wrote:

Nevermind, I thought you was using 3.4, btw I thought this was fixed recently.

Hi Alessandro,
this issues it appears again in 3.4.1 and Master 0ea86bf0a5

I attach a screencast and the essor message here

I hope this can help you

(as soon as I started QGIS 3.4.1 this morning the Font was set to 4 points size)

regards

this appear o windows 7 x64

#9 Updated by Alessandro Pasotti over 5 years ago

@Antonio: your problem has nothing to do with this issue, the error comes from a python plugin.

#10 Updated by Alessandro Pasotti over 5 years ago

  • Subject changed from QGIS 3.4.1 : CRASH : Settings->Options to QGIS 3.4.1 : CRASH : Settings->Options (OpenCL related)

#11 Updated by Antonio Viscomi over 5 years ago

Alessandro Pasotti wrote:

@Antonio: your problem has nothing to do with this issue, the error comes from a python plugin.

Sorry Alessandro,
the old subject of ticket he took me out of the way
regards

#12 Updated by Antonio Viscomi over 5 years ago

Alessandro Pasotti wrote:

@Antonio: your problem has nothing to do with this issue, the error comes from a python plugin.

With Nvidia quadro k2000 opencl there is not crash

#13 Updated by Jürgen Fischer over 5 years ago

#14 Updated by Jürgen Fischer over 5 years ago

#15 Updated by Alessandro Pasotti over 5 years ago

@Daria Svidzinska sorry for the delay, I'm not a windows developer so I'm a bit in the dark here, what I understood is that the OpenCL.dll library is installed by QGIS and copied to C:\Windows\System32 directory if it's not there, what I suspect is going on here is that QGIS is picking up the wrong library, so I would suggest you to try to rename/copy your C:\Windows\System32\OpenCL.dll somewhere, and try to reinstall QGIS, then check if a new C:\Windows\System32\OpenCL.dll was installed and see if that solves the issue.

#16 Updated by Jürgen Fischer over 5 years ago

Alessandro Pasotti wrote:

what I understood is that the OpenCL.dll library is installed by QGIS and copied to C:\Windows\System32 directory if it's not there,

It's copied there if it exists there and the existing copy is older (by version number within the DLL) than the copy included in QGIS (see dllupdate.cpp - committed just yet there. source also included in msvcrt-1.0.3-1)

#17 Updated by Daria Svidzinska over 5 years ago

@Alessandro Pasotti, I did what you had suggested, but it didn't help.

I temporarily moved OpenCL.dll to another folder and reinstalled QGIS via OSGeo4W. The new OpenCL.dll was not created in the C:\Windows\System32\, and QGIS still crashes when I try to open Settings > Options.

I also tried to reinstall QGIS without moving OpenCL.dll hoping that it will be updated during the installation, but still no luck.

#18 Updated by Alessandro Pasotti over 5 years ago

Ok, I cannot reproduce this issue and I'm not a windows developer, so if we want to try to fix it I need someone to volunteer for some interactive debugging (testing builds and report if they work or not), if you are interested/available please to contact me: elpaso at itopen dot it.

#19 Updated by Alessandro Pasotti over 5 years ago

Do you have the GPS information panel open? If yes, can you try to close it (Settings -> Panels -> uncheck the GPS info panel), restart QGIS and open the Options again?

#20 Updated by stefano nardone over 5 years ago

I'm having this problem with 3.4.2 and also with 3.4.1 before. Reinstalled and removed plugins and configs.

Alessandro Pasotti wrote:

To help us debug this, please answer the questions below:
- how did you install QGIS 4.3.1?
- what graphic card(s) do you have?
- do you have any graphic cars SDK installed (from Nvidia, ATI or Intel ?)
- please search your system for the following files:
- OpenCL.lib
- OpenCL.dll

- Install was via OsGeo4W installer, new system, hadn't installed QGIS before, installed togheter with also 2.18 LTR
- Notebook has integratred Intel UHD 630 + Nvidia GTX1050 Ti
- no sdk installed (not consciously at least)
- OpenCL.DLL in c:\windows\system32 + opencl.dll in C:\windows\SysWOW64 + opencl.dll in c:\OSGeo4W64\bin
openCL.lib in c:\OSGeo4W64\lib

Can try to do testing for your request.

#21 Updated by Alessandro Pasotti over 5 years ago

@Stefano, first I need to make sure that when QGIS crashes you have a similar stack trace (last line contains clGetGLContextInfoKHR).
If yes, please try the latest nightlies builds of QGIS master (the "dev" builds on OSGEO4W), I've made some changes that might have solved the issue.

If the issue persists, please contact me via email and I'll send you a custom build to test.

#22 Updated by Alessandro Pasotti over 5 years ago

  • Related to Bug report #20768: QGIS Crashes everytime I click Options under Settings Tab added

#23 Updated by Alessandro Pasotti over 5 years ago

  • Related to deleted (Bug report #20768: QGIS Crashes everytime I click Options under Settings Tab)

#24 Updated by Alessandro Pasotti over 5 years ago

  • Duplicated by Bug report #20768: QGIS Crashes everytime I click Options under Settings Tab added

#25 Updated by Alessandro Pasotti over 5 years ago

  • Pull Request or Patch supplied changed from No to Yes

PR: https://github.com/qgis/QGIS/pull/8647

Note: this is not a solution for the underlying issue (that I've never be able to reproduce), but at least will not crash QGIS until/unless the user click on the checkbox to enable OpenCL.

In case of a crash, the option is not stored, so that after QGIS restarts it won't crash either.

#26 Updated by Alessandro Pasotti over 5 years ago

When merged, I'll appreciate some feedback from the users that are affected by this issue.

#27 Updated by Alessandro Pasotti over 5 years ago

Any feedback? Can I close this issue?

#28 Updated by Alessandro Pasotti over 5 years ago

  • Duplicated by Bug report #20935: QGIS crashes when opening configurations -> options added

#29 Updated by al piszcz over 5 years ago

Alessandro Pasotti wrote:

Any feedback? Can I close this issue?

Yes, close, 3.4.3 has not crashed after a week or so of use.
Thank you.

#30 Updated by Nyall Dawson over 5 years ago

  • Resolution set to fixed/implemented
  • Status changed from Feedback to Closed

#31 Updated by Nicolas Cadieux over 5 years ago

User Feedback

QGIS Crashes when trying to enable OpenCL acceleration
Graphic card (old GTX260 with latest drivers (342.01) (OpenCL 1.0 and cuda 1.0). Intel runtime OpenCl 18.1 installed for Intel Core i7 6800k cpu)
Windows 10_64

Report Details

Crash ID: 9fa2938d17404e66df87e46cb77d2653005168a1

Stack Trace

QgsQtLocationConnection::startSatelliteMonitor :
QgsQtLocationConnection::startSatelliteMonitor :
QgsQtLocationConnection::startSatelliteMonitor :
QgsOpenClUtils::init :
QgsQtLocationConnection::startSatelliteMonitor :
RtlRunOnceExecuteOnce :
InitOnceExecuteOnce :
_crtInitOnceExecuteOnce :
QgsOpenClUtils::errorText :
QgsOpenClUtils::activeDevice :
QgsOpenClUtils::activate :
QgsQtLocationConnection::startSatelliteMonitor :
QgsQtLocationConnection::startSatelliteMonitor :
RtlRunOnceExecuteOnce :
InitOnceExecuteOnce :
_crtInitOnceExecuteOnce :
QgsOpenClUtils::init :
QgsOpenClUtils::available :
QgsOptions::~QgsOptions :
QMetaObject::activate :
QAbstractButton::clicked :
QAbstractButton::setChecked :
QCheckBox::nextCheckState :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
QgisApp::showOptionsDialog :
QgisApp::options :
QMetaObject::activate :
QAction::activate :
QMenu::actionGeometry :
QMenu::actionGeometry :
QMenu::mouseReleaseEvent :
QWidget::event :
QMenu::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.4.3-Madeira
QGIS code revision: 2f64a3c4e7
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.4.0
Running against GDAL: 2.4.0

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17134

#32 Updated by Nicolas Cadieux over 5 years ago

So far, this is what I did with no success.

reinstalled with latest nvidia drivers (clean install of drivers): no difference.
uninstall opencl runtine 18 for CPU.
Window safe boot (no opencl device was found) (but no crash) (OpenCL Runtime for CPU, when installed without video driver) does not
seem to be identified by Qgis as a valid OpenCL device). (A Python script (Anaconda Python) indicates that OpenCL for CPU is
recognized by the Python environment (as well as the video card when drivers are present)
Renamed "C:\Windows\System32\OpenCL.dll" version 2.1.0.0
Renamed "C:\Windows\SysWOW64\OpenCL.dll" version 2.1.0.0
RENAMED :"C:\Program Files\NVIDIA Corporation\OpenCL\OpenCL.dll" version 1.0.0.0
RENAMED: "C:\Program Files\NVIDIA Corporation\OpenCL\OpenCL64.dll" version 1.0.0.0
File were renamed one at a time with reboot every test. Problem does not seem to come from those OpenCL.dll.
Could not rename the following files.  I don't believe these files are used by Windows unless it's try to find a driver or trying to roll back an update.
NOT RENAMED "C:\Windows\WinSxS\amd64_dual_rdvgwddmdx11.inf_31bf3856ad364e35_10.0.17134.1_none_eaa56d98f154c735\opencl.dll": 
version 1.2.11.0
NOT RENAMED "C:\Windows\WinSxS\amd64_dual_rdvgwddmdx11.inf_31bf3856ad364e35_10.0.17134.407_none_e6fc760ade1adc75\opencl.dll"
version 1.2.11.0
NOT RENAMED "C:\Windows\WinSxS\wow64_microsoft-windows-r..xwddmdriver-wow64-
c_31bf3856ad364e35_10.0.17134.1_none_96a8f94a15644edb\opencl.dll"
NOT RENAMED "C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_e2ba695c42c94535\OpenCL64.dll" FILE VERSION
1.0.0.0
NOT RENAMED "C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_e2ba695c42c94535\OpenCL32.dll" FILE VERSION
1.0.0.0
NOT RENAMED "C:\Windows\System32\DriverStore\FileRepository\rdvgwddmdx11.inf_amd64_d1a06e7271daf491\opencl.dll" file version
1.2.11
NOT RENAMED"C:\Windows\System32\DriverStore\FileRepository\rdvgwddmdx11.inf_amd64_f7a06db79192db6e\opencl.dll" file version

Finally, I renamed C:\Windows\System32\OpenCL.dll" (version 2.1.0.0) to opencl.dll and copied that file to C:\OSGeo4W64\bin\opencl.dll. This resulted in the following error:

Entry Point Not found, The procedure entry point clReleaseDevice could not be located in the dynamic link library c:\OSGEO4W\app\qgis\bin\qgis_app.dll

Entry Point Not found, The procedure entry point clReleaseDevice could not be located in the dynamic link library c:\OSGEO4W\app\qgis\bin\qgis_core.dll

Error loading QGIS, Oops, looks like an error loading Qgis, Details Could not load qgis_app.dll. Window Erro: The specified procedure could not be found. Help: Check c:\OS.. qgis-bin.env for correct environmental paths.

The crash is perhaps related to my Old Video Card, a NVIDIA GTX260. Drivers are the latest (342.01) on DirectX 11.0 but this is not probably too old to really be truly maintained by NVIDIA. I should be able to test with a new RX580 in the next few weeks. Please tell me if you want me to test something else.

Nicolas

Windows 10_64
Intel i7
MSI NVIDIA GTX 260
Testing with QGIS 3.5 Nightly built and curent version of 3.4.

#33 Updated by Nicolas Cadieux over 5 years ago

Hi,
I would change the status as OPEN as this is still not resolved. Will be happy to help out.
Nicolas

#34 Updated by Giovanni Manghi over 5 years ago

  • Regression? changed from Yes to No
  • Status changed from Closed to Open
  • Affected QGIS version changed from 3.4.0 to 3.5(master)
  • Resolution deleted (fixed/implemented)

#35 Updated by Alessandro Pasotti over 5 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed/implemented

I believe that to test the rename/removal thoroughly you should clean reinstall QGIS: if I'm not mistaken, the windows installation procedure will take care of verifying if OpenCL.dll is installed in the system and copy the dll shipped with QGIS in the right location if a system OpenCL.dll was not found.

Btw, this issue is closed because QGIS does not crash when you open the settings, it crashes when the user click on the enable OpenCL checkbox (and there is a big warning about that possibility).

Also available in: Atom PDF