joachifm / cl-webkit

A binding to WebKitGTK+ for Common Lisp
MIT License
53 stars 16 forks source link

Errors on the custom URL thread make the whole WebKit process crash #64

Closed aartaka closed 2 years ago

aartaka commented 2 years ago

While all the custom URL handling is happening on a separate thread asynchronously, any condition raised there segfaults the whole process. This should not happen, given that we use handler-case there. Should we also add a case for conditions? How do we ensure stability of erroring callbacks?

Ambrevar commented 2 years ago

Where do we use handler-case? Can you point at the code?

An unhandled condition on a background thread will crash SBCL indeed.

Should we also add a case for conditions?

What do you mean?

Note that ignore-errors and (handler-case ... (error don't catch all conditions. If you want to catch everything, you've got to catch T.

aartaka commented 2 years ago

What I meant was the handler-case in uri-scheme-processed callback in webkit2/webkit.uri-scheme-request.lisp. It was indeed only catching errors, while any raised condition that wasn't an error was crushing it.

Given the brutality of this bug, how about releasing a new version and moving Nyxt to it?

Ambrevar commented 2 years ago

Agreed, and that's right on time for 2.2.4! :)