<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div>On Fri, Sep 20, 2019, at 14:13, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>I completely disagree. When event registration/deregistration fails, you're almost guaranteed a deadlock or some use after free. Much better to abort asap.<br></div></blockquote><div><br></div><div>In the VLC-IOS case, it was a detach called when no attach was called before. So no possible deadlock or use after-free.<br></div><div>This is the principal cause of crashes on iOS since a long time, the issue had just been fixed on the iOS side but it should also be fixed here. For me, it's like enabling assert in production builds.<br></div><div><br></div><blockquote type="cite" id="qt"><div><br></div><div class="qt-gmail_quote"><div>Le 20 septembre 2019 12:21:37 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><pre class="qt-k9mail"><div>Because you should not abort in production. Developers will still be notified<br></div><div>that they are miss-using the API with the assert.<br></div><div><br></div><div>PS: this abort was happening on iOS via VLCKit, the API miss-use had been fixed<br></div><div>here: <a href="https://code.videolan.org/videolan/VLCKit/merge_requests/19">https://code.videolan.org/videolan/VLCKit/merge_requests/19</a><hr> lib/event.c | 2 +-<br></div><div> 1 file changed, 1 insertion(+), 1 deletion(-)<br></div><div><br></div><div>diff --git a/lib/event.c b/lib/event.c<br></div><div>index 28d3d0c232..4a57029b89 100644<br></div><div>--- a/lib/event.c<br></div><div>+++ b/lib/event.c<br></div><div>@@ -179,5 +179,5 @@ void libvlc_event_detach(libvlc_event_manager_t *em, libvlc_event_type_t type,<br></div><div> return;<br></div><div> }<br></div><div> }<br></div><div>- abort();<br></div><div>+ assert(!"event not found or already detached");<br></div><div> }<br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>