ID 455085 - Nuke crashes when using QWebEngineView.setHtml(), after installing a global event filter (macOS and Linux)

Follow

Problem summary
Nuke crashes when using QWebEngineView.setHtml(), after installing a global event filter.
This issue appears to only occur on macOS and Linux, but not on Windows.

Customer reported version
Nuke 12.2v2

Customer reported platform
macOS 10.14 (Mojave)

Steps to reproduce

1) Open Nuke and run the following code in the Script Editor:


import nukefrom PySide2 import QtCore, QtWidgets, QtGuiclass GlobalEventFilter(QtWidgets.QWidget):       def __init__(self):        super(GlobalEventFilter, self).__init__()        self.myApp = QtWidgets.QApplication.instance()        self.myApp.installEventFilter(self)    def eventFilter(self, widget, event):        if event.type() == QtCore.QEvent.Wheel:            print ('running custom event filter')        return super(GlobalEventFilter, self).eventFilter(widget, event)event_filter = GlobalEventFilter()

You should notice that Nuke will now print to the Script Editor, when you use the scroll wheel in Nuke's GUI.

2) Next, run the following code in the Script Editor:


from PySide2 import QtWebEngineWidgetsweb_view = QtWebEngineWidgets.QWebEngineView()web_view.setHtml('<h1>Hello World!</h1>')web_view.show()


Expected behaviour
A window, like the following, should be created. Nuke should also continue printing to the terminal when using the scroll wheel (in both Nuke's GUI and the custom window):

 

Actual behaviour

On CentOS 7 and macOS, Nuke crashes when using QWebEngineView.setHtml(), after installing a global event filter.

 

Reproduced by support
This bug has been reproduced in:
Nuke 12.2v3 - Linux CentOS 7 - macOS 10.14 (Mojave)
Nuke 12.0v1 - Linux CentOS 7 - macOS 10.14 (Mojave)
Nuke 11.1v2 - Linux CentOS 7

Unable to reproduce bug in:
Nuke 12.2v3 - Windows 10

Earliest version tested
Nuke 11.1v2 - CentOS 7
- Unable to test against Nuke 11.1v1, or earlier, as the QtWebEngine module is missing from these releases:
ID 270776 - [VFX Platform] Linux Qt 5.6.1 build is missing QtWebEngine

 

Nuke 12.0v1 - macOS 10.14
- Unable to test against Nuke 11.3v6, or earlier, as the QtWebEngine module is missing from these releases:
ID 332302 - [VFX Platform] Mac OSX Qt 5.6.1 build is missing QtWebEngine

    We're sorry to hear that

    Please tell us why