cancel
Showing results for 
Search instead for 
Did you mean: 

Error com.tns.NativeScriptException: Attempt to use cleared object reference id=XXXXX

Angelo_Ab
Participant
0 Kudos
165

Hi,

sometime during an OData call i got in the actionresult of Failure Action the error:

com.tns.NativeScriptException: Attempt to use cleared object reference id=XXXXX

To solve that error I simply need to close and open again the app.

Seems like I got this message, in most cases, after a while of inactivity on the app.

Ex.: OData Call of Media Entity

Angelo_Ab_0-1734085232665.png

Ex.: OData Call of Create Entity

Angelo_Ab_1-1734085461221.png

Why this happens and what I can check ?

Can I do somethings to avoid or limitate this issue ?

Thanks.

 

 

View Entire Topic
bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

I have not seen that error before.  What MDK version / platform are you using?

What is the flow like when it occurs?  Could it be a timing issue where a page is being closed but there is an action that is trying to reference something on the page that was just closed?

Angelo_Ab
Participant
0 Kudos

Hi Bill, this happens in all MDK the versions, even the latest 24.11.2.

The platform is Android.

I don't understand what the flow is to replicate the error since it happens sometimes when I try to call the backend with an OData operation after some inactivity on the app.

Theoretically I understand what the problem is but it's really hard to find the cause.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos
Is this an online connection or an offline odata connection?
Angelo_Ab
Participant
0 Kudos
Online connection. The app is offline but for some specific functions, like calculation of price condition, I call backend to retrieve the needed data.