Skip to content

Commit fbe0cd5

Browse files
committed
A hack that prevents segfault with Nvidia on Linux
The chosen approach was seen in https://github.com/spyder-ide/spyder/pull/7029/files
1 parent 3f4b423 commit fbe0cd5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Orange/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,14 @@
3232

3333
AnyQt.importhooks.install_backport_hook('pyqt4')
3434
del AnyQt
35+
36+
37+
# A hack that prevents segmentation fault with Nvidia drives on Linux if Qt's browser window
38+
# is shown (seen in https://github.com/spyder-ide/spyder/pull/7029/files)
39+
try:
40+
import ctypes
41+
ctypes.CDLL("libGL.so.1", mode=ctypes.RTLD_GLOBAL)
42+
except: # pylint: disable=bare-except
43+
pass
44+
finally:
45+
del ctypes

0 commit comments

Comments
 (0)