No problem. At least you're able to provide examples that makes it easy for me to reproduce the problems for the investigation.
I'll look into this. Hopefully I'll have the fix tonight.
No problem. At least you're able to provide examples that makes it easy for me to reproduce the problems for the investigation.
I'll look into this. Hopefully I'll have the fix tonight.
I believe the problem is actually with virtual property accessors, and not function pointers here.
By manually calling the get functions everything works.
void crashme()
{
if( @this._events_ != null && @this._events_.f != null )
{
// this.events.f( this );
this.get_events().get_f()( this );
}
}
The crash has been fixed in revision 1575.
The memory leak upon the null pointer access exception is still there. I'm still investigating that, but it looks like a problem in the clean up of the callstack after an exception.
Indeed. The memory leak is a bug with the logic for cleaning up the callstack after an exception. The problem happens when attempting to call a class method on a null pointer and the method takes a handle as argument. The cleanup of the callstack doesn't release that handle in this situation, thus causing the leak.
I know what is causing the leak, but I'll have to work on the fix at a later time as it's getting late and this won't be a trivial change with just a couple of lines that needs to change.