Skip to content

ANR on org.appcelerator.titanium.TiProperties.removeProperty (ANR triggered by slow IO operations) #13942

@jordanbisato

Description

@jordanbisato

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

In my last version of app i update to SDK 12.2.1.GA.
So after upload it to production some ANRs start to appears in Crashlytics describing some slow IO problems with TiProperties.

I can't reproduce the problem and i don't know how it happens, because it happened in different screens of application.

For now it's only an Android problem (11, 12 and 13 versions).

The main log:

main (runnable):tid=1 systid=25422 
       at com.android.internal.util.FastXmlSerializer.append(FastXmlSerializer.java:102)
       at com.android.internal.util.FastXmlSerializer.append(FastXmlSerializer.java:140)
       at com.android.internal.util.FastXmlSerializer.escapeAndAppendString(FastXmlSerializer.java:164)
       at com.android.internal.util.FastXmlSerializer.text(FastXmlSerializer.java:414)
       at com.android.internal.util.XmlUtils.writeValueXml(XmlUtils.java:655)
       at com.android.internal.util.XmlUtils.writeMapXml(XmlUtils.java:309)
       at com.android.internal.util.XmlUtils.writeMapXml(XmlUtils.java:278)
       at com.android.internal.util.XmlUtils.writeMapXml(XmlUtils.java:244)
       at com.android.internal.util.XmlUtils.writeMapXml(XmlUtils.java:201)
       at android.app.SharedPreferencesImpl.writeToFile(SharedPreferencesImpl.java:803)
       at android.app.SharedPreferencesImpl.access$900(SharedPreferencesImpl.java:59)
       at android.app.SharedPreferencesImpl$2.run(SharedPreferencesImpl.java:672)
       at android.app.SharedPreferencesImpl.enqueueDiskWrite(SharedPreferencesImpl.java:691)
       at android.app.SharedPreferencesImpl.access$100(SharedPreferencesImpl.java:59)
       at android.app.SharedPreferencesImpl$EditorImpl.commit(SharedPreferencesImpl.java:604)
       at org.appcelerator.titanium.TiProperties.removeProperty(TiProperties.java:380)
       at ti.modules.titanium.app.properties.PropertiesModule.removeProperty(PropertiesModule.java:70)
       at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native method)
       at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)
       at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:985)
       at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1219)
       at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:257)
       at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:482)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:246)
       at android.app.ActivityThread.main(ActivityThread.java:8653)
       at java.lang.reflect.Method.invoke(Native method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

I upload the stack trace file too.
br.com.cvpb_issue_f62af080feb962976598e07bfe2ccda9_ANR_session_6546622A019B0001662D92DF595B2BD4_DNE_0_v2_stacktrace.txt

Expected Behavior

Working without ANR

Actual behavior

ANR triggered by slow IO operations

Reproducible sample

I got it on Firebase Crashlytics so i can't reproduce the problem.

Steps to reproduce

I got it on Firebase Crashlytics so i can't reproduce the problem.

Platform

Android

SDK version you are using

12.2.1.GA

Alloy version you are using

2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidbugneeds triageThis issue hasn't been reviewed by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions