Revert "* workaround: idea debugger doesn't stop in Inner classes that extends from ObjCObject" #815
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #754
Reasons to revert:
While these changes allowed to work-around breakpoints that were not worked, this introduces another major issue that breaks class initialisation and cause
java.lang.NoClassDefFoundError: Could not initialize class.Another moment to revert: Jetbrains has fixed https://youtrack.jetbrains.com/issue/IDEA-332794 and delivered fix in 2025.2. (bad moment -- it fixes big Java case but there is still issue with Robo)
these changes were applied only to NSObject subclasses but any inner Java classes affected.
While 1 is important that becomes sometimes as blocker its better to roll back and look into debugger issues separately (It looks like Jetbrains changes things in debugger and parts there were working stopped working now).
Minimal code to reproduce:
Workaround for existing/release versions
add following code at early iOS initialization code:
Root case:
Class marked as
Brokendue to exception happens during class initialisation:and alloc fails as
allocproperty of NSObject is null:this is happens as NSObject didn't finish own class initialization as called for super
ObjCObject.<clinit>.it started - preloading collected classes (funcionality of #754) and
com/example/mobile/ios/Foo.<clinit>was creatingNSString()that touched not-initializedNSObject.allocproperty causing NPE and markingFooas corrupted.Workaround
Class.forName("org.robovm.objc.ObjCObject")makesObjCClassbeing initialised outside of any other code that might cause cyclical dependency.