Crash in finalizer when init method fails

Hi, i`m getting crash 100% when init or initWithSomething: returns nil

The way to reproduce is very simple:

  private void crashInFinalizer() {
    for (int i = 0; i < 10000; i++) {
      if (NSMyClass.alloc().init() != null) {
        System.out.println("alloc != null");
      }
    }
  }

It does not matter if my own class fails or system class
I`m attaching a sample class which can not initialize.src.zip (1.1 KB)

Hi,

we have a fix for this, we will release a hotfix soon.

Best Regards,
Gergely

We have released Moe SDK 1.3.6 which includes a NatJ fix for this issue.