I was able to reproduce the problem. I have attached a XML file that can be used to reproduce. The last question that is displayed before the crash happens is “How many direct relatives are abroad? (related to the respondent)”, so it’s definitely something inside the following repeat that leads to the crash. To reproduce, fill the survey with minimum data to get it completed and into the instances.db of KoboCollect, by answering e.g.
When you save the survey, it will create a folder with a XML file inside on your device, e.g.
Replace this XML with the one I have attached to reproduce the crash, by renaming it to the name of the XML file on your device, and then placing it into the folder, e.g.
If you now edit the saved survey, it will use the replaced XML and will crash at the repeat.
E/InputEventReceiver(25442): Exception dispatching input event.
D/AndroidRuntime(25442): Shutting down VM
E/AndroidRuntime(25442): FATAL EXCEPTION: main
E/AndroidRuntime(25442): Process: org.koboc.collect.android, PID: 25442
E/AndroidRuntime(25442): java.lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.String java.lang.String.replaceAll(java.lang.String, java.lang.String)’ on a null object reference
E/AndroidRuntime(25442): at org.koboc.collect.android.utilities.TextUtils.markdownToHtml(TextUtils.java:35)
E/AndroidRuntime(25442): at org.koboc.collect.android.utilities.TextUtils.textToHtml(TextUtils.java:108)
E/AndroidRuntime(25442): at org.koboc.collect.android.views.HierarchyElementView.setPrimaryText(HierarchyElementView.java:75)
E/AndroidRuntime(25442): at org.koboc.collect.android.adapters.HierarchyListAdapter.getView(HierarchyListAdapter.java:64)
E/AndroidRuntime(25442): at android.widget.AbsListView.obtainView(AbsListView.java:2349)
E/AndroidRuntime(25442): at android.widget.ListView.makeAndAddView(ListView.java:1864)
E/AndroidRuntime(25442): at android.widget.ListView.fillDown(ListView.java:698)
E/AndroidRuntime(25442): at android.widget.ListView.fillGap(ListView.java:662)
E/AndroidRuntime(25442): at android.widget.AbsListView.trackMotionScroll(AbsListView.java:5007)
E/AndroidRuntime(25442): at android.widget.AbsListView.scrollIfNeeded(AbsListView.java:3424)
E/AndroidRuntime(25442): at android.widget.AbsListView.onTouchMove(AbsListView.java:3807)
E/AndroidRuntime(25442): at android.widget.AbsListView.onTouchEvent(AbsListView.java:3638)
E/AndroidRuntime(25442): at android.view.View.dispatchTouchEvent(View.java:8480)
E/AndroidRuntime(25442): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
E/AndroidRuntime(25442): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2093)
E/AndroidRuntime(25442): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
E/AndroidRuntime(25442): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
E/AndroidRuntime(25442): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
E/AndroidRuntime(25442): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
E/AndroidRuntime(25442): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
E/AndroidRuntime(25442): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
E/AndroidRuntime(25442): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
E/AndroidRuntime(25442): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
E/AndroidRuntime(25442): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2625)
E/AndroidRuntime(25442): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1770)
E/AndroidRuntime(25442): at android.app.Activity.dispatchTouchEvent(Activity.java:2742)
E/AndroidRuntime(25442): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2586)
E/AndroidRuntime(25442): at android.view.View.dispatchPointerEvent(View.java:8675)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4129)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3995)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3550)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3603)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3569)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3686)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3577)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3743)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3550)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3603)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3569)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3577)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3550)
E/AndroidRuntime(25442): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5813)
E/AndroidRuntime(25442): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5787)
E/AndroidRuntime(25442): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5758)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5903)
E/AndroidRuntime(25442): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
E/AndroidRuntime(25442): at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
E/AndroidRuntime(25442): at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
E/AndroidRuntime(25442): at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:5874)
E/AndroidRuntime(25442): at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java
W/ActivityManager( 2163): Force finishing activity 1 org.koboc.collect.android/.activities.FormHierarchyActivity
So it looks like the app encounters a string that doesn’t exist when it tries to replace something. Unfortunately I don’t have time to look into this further right now.
My hunch is that it may be related to the ${NAME} variable sometimes existing in the default language, but not in Arabic and vice versa, e.g. “Current educational attainment:” and “Did ${NAME} work for wage (cash or in-kind) even for one hour during last week?”.
I would try to make sure that ${NAME} is used equally in both languages, maybe that already fixes the form.
You received this message because you are subscribed to the Google Groups “Kobo Users” group.