Reputation: 45
I'm part of a team that's using NativeScript and angular and we keep getting errors that look like:
Error: com.tns.NativeScriptException: Attempt to use cleared object reference id=<some-object-id-number>
From some research it's because we use markingMode: none in order to speed up our application. We want to keep using this so we need to find the source of the errors. From the documentation, it comes from creating a native object then wrapping it in a JS method so the garbage collector removes the native object in the method but since it's still being referenced an error is thrown. The documentation also indicated that this most likely stems from using plugins that haven't adapted to markingMode: none. The plugin I believe that's causing this is the nstudio nativescript-checkbox plugin. So I looked through the source code to try to find the native options that fit the criteria and my issues are the following:
If anyone has experienced this markingMode: none issue, specifically with plugins, I would love to hear how you dealt with it and if you had any tips/suggestions moving forward. Here's the documentation detailing this issue: https://docs.nativescript.org/core-concepts/android-runtime/advanced-topics/marking-mode-none
The NativeScript developers said it was fixed in this bug fix with an update, but I haven't noticed a change: https://github.com/NativeScript/NativeScript/issues/7125
UPDATE: I commented out the checkbox plugin and no error, this is definitely being caused by the plugin
Upvotes: 1
Views: 397
Reputation: 45
Removed all instances of the checkbox component and the side navigation bar and made our own custom components for them.
Upvotes: 0