Thread: Avisynth+
View Single Post
Old 28th March 2018, 09:35   #4012  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Quote:
Originally Posted by `Orum View Post
I noticed something similar with ThrowError() and a lot of text, where AvsPmod (and not AviSynth+ I think--I'll have to test in another app when I have time) would essentially turn into this:
Code:
for(;;)
    malloc(1000000);
In any case I would never assume leaks or bugs are in AviSynth+ by testing with only AvsPmod, considering how insanely buggy AvsPmod alone is.
If AvsPmod attempts to catch an exception thrown from inside Avisynth (for example, if a plugin raises an error using Avisynth's ThrowError), then yes, it'll most likely leak the exception object (if the catch actually works at all, which isn't certain either). Attempting to catch an exception from across a DLL boundary should in general never be done. It is only safe if both sides are built with the exact same compiler and linked with exactly the same runtime, but even then, just don't. Avisynth API calls should never be wrapped in try/catch blocks. See this article on the wiki.
TheFluff is offline