Bug in QWebEngineProfile::setNotificationPresenter

Phil Thompson phil at riverbankcomputing.com
Fri May 22 09:35:55 BST 2020


On 21/05/2020 10:42, Florian Bruhin wrote:
> Hi,
> 
> When running the attached example and clicking "authorize", then "show" 
> 2-3
> times, either a segfault or an exception like this will happen:
> 
>   TypeError: 'QWebEngineNotification' object is not callable
> 
> As a workaround, show_notification_2 can be used instead, which 
> re-registers
> the callback and makes things work fine.
> 
> Looking at the implementation of setNotificationPresenter in
> qwebengineprofile.sip, it does "Py_DECREF(a0);", inside its wrapper, 
> with a0
> being the passed function. That seems to be wrong, as the function gets 
> called
> multiple times with multiple notifications.
> 
> Compare that to e.g. setCookieFilter in qwebenginecookiestore.sip where 
> the
> callback isn't DECREF'd.

Should be fixed in tonight's snapshot.

Thanks,
Phil


More information about the PyQt mailing list