matthewn4444/onscripter-plus-android

org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:57 in java.io.InputStreamReader@41af91f0)

Opened this issue · 2 comments

org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:57 in java.io.InputStreamReader@41af91f0) 
at org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:2035)
at com.onscripter.plus.VNPreferences.load(VNPreferences.java:68)
at com.onscripter.plus.VNPreferences.ensureLoaded(VNPreferences.java:245)
at com.onscripter.plus.VNPreferences.getFloat(VNPreferences.java:217)
at com.onscripter.plus.ONScripter.onLoadVNPref(ONScripter.java:387)
at com.onscripter.plus.VNPreferences.ensureLoaded(VNPreferences.java:248)
at com.onscripter.plus.VNPreferences.getFloat(VNPreferences.java:217)
at com.onscripter.plus.ONScripter.onLoadVNPref(ONScripter.java:387)
at com.onscripter.plus.VNPreferences$LoadSaveSettingsTask.onPostExecute(VNPreferences.java:428)
at com.onscripter.plus.VNPreferences$LoadSaveSettingsTask.onPostExecute(VNPreferences.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4827)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:57 in java.io.InputStreamReader@41af91f0) 
at org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:2035)
at com.onscripter.plus.VNPreferences.load(VNPreferences.java:68)
at com.onscripter.plus.VNPreferences.ensureLoaded(VNPreferences.java:245)
at com.onscripter.plus.VNPreferences.getFloat(VNPreferences.java:217)
at com.onscripter.plus.ONScripter.onLoadVNPref(ONScripter.java:387)
at com.onscripter.plus.VNPreferences.ensureLoaded(VNPreferences.java:248)
at com.onscripter.plus.VNPreferences.getFloat(VNPreferences.java:217)
at com.onscripter.plus.ONScripter.onLoadVNPref(ONScripter.java:387)
at com.onscripter.plus.VNPreferences$LoadSaveSettingsTask.onPostExecute(VNPreferences.java:428)
at com.onscripter.plus.VNPreferences$LoadSaveSettingsTask.onPostExecute(VNPreferences.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4827)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)

Any solution to this

If this is still happening, just delete the preference file, seems to be corrupted. For now I am building a new version of ONScripter that doesn't use this file model anymore.