Crash on tapping arrow in top right

Hi all,

Not sure what you call the little arrow in the top right, btw save and settings. But my form will crash when the user taps that.

The form passes validation. It can also be completed in the standard way, swiping right to the next screen until reaching the end. However, when the user taps the arrow, 'Unfortunately, ODK Collect has stopped'. From that point on, if the form is loaded it will try to resume (Unsaved changes recovered from savepoint), and will then immediately crash again. The only way to get out of that loop is to use a file browser on the tabllet, and delete the specific form instance in /sdcard/odk/instances.

I have narrowed the problem down to one field - S1_1. It is a select1 with no label and only 1 option - I use this pattern for items like 'Don't Know + Date' or 'Refuse to Answer + String'. I have this exact same pattern in other forms that do work (and can be 'arrowed').

Code snippet below:

<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa">
<h:head>
<h:title>S_LABORATORY_RESULTS_T20160622</h:title>






<intro_group>




</intro_group>
<S1_readonly/>
<S1_group>

<S1_1/>
</S1_group>








Date of Data Entry





Facility ID


Participant ID





Interviewer Initials





Enter Viral load results as soon as they are available





S1. Date of Specimen Collection


Not available












</h:head>
<h:body>





























99



</h:body>
</h:html>

Stack trace:

E/FormEntryActivity( 8797): Dismiss dialogs
I/SavePointTask( 8797): Savepoint ms: 29 to /mnt/sdcard/odk/.cache/S_LABORATORY_RESULTS_T20160622_2016-06-24_14-15-12.xml.save
D/dalvikvm(29961): GC_CONCURRENT freed 927K, 11% free 9521K/10695K, paused 2ms+4ms
V/TabletStatusBar( 233): setLightsOn(true)
D/AndroidRuntime( 8797): Shutting down VM
W/dalvikvm( 8797): threadid=1: thread exiting with uncaught exception (group=0x40a371f8)
E/AndroidRuntime( 8797): FATAL EXCEPTION: main
E/AndroidRuntime( 8797): java.lang.NullPointerException
E/AndroidRuntime( 8797): at org.odk.collect.android.utilities.TextUtils.markdownToHtml(TextUtils.java:35)
E/AndroidRuntime( 8797): at org.odk.collect.android.utilities.TextUtils.textToHtml(TextUtils.java:108)
E/AndroidRuntime( 8797): at org.odk.collect.android.views.HierarchyElementView.setPrimaryText(HierarchyElementView.java:75)
E/AndroidRuntime( 8797): at org.odk.collect.android.views.HierarchyElementView.(HierarchyElementView.java:50)
E/AndroidRuntime( 8797): at org.odk.collect.android.adapters.HierarchyListAdapter.getView(HierarchyListAdapter.java:61)
E/AndroidRuntime( 8797): at android.widget.AbsListView.obtainView(AbsListView.java:2033)
E/AndroidRuntime( 8797): at android.widget.ListView.makeAndAddView(ListView.java:1772)
E/AndroidRuntime( 8797): at android.widget.ListView.fillDown(ListView.java:672)
E/AndroidRuntime( 8797): at android.widget.ListView.fillFromTop(ListView.java:732)
E/AndroidRuntime( 8797): at android.widget.ListView.layoutChildren(ListView.java:1625)
E/AndroidRuntime( 8797): at android.widget.AbsListView.onLayout(AbsListView.java:1863)
E/AndroidRuntime( 8797): at android.view.View.layout(View.java:11278)
E/AndroidRuntime( 8797): at android.view.ViewGroup.layout(ViewGroup.java:4224)
E/AndroidRuntime( 8797): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:925)
E/AndroidRuntime( 8797): at android.view.View.layout(View.java:11278)
E/AndroidRuntime( 8797): at android.view.ViewGroup.layout(ViewGroup.java:4224)
E/AndroidRuntime( 8797): at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
E/AndroidRuntime( 8797): at android.view.View.layout(View.java:11278)
E/AndroidRuntime( 8797): at android.view.ViewGroup.layout(ViewGroup.java:4224)
E/AndroidRuntime( 8797): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
E/AndroidRuntime( 8797): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
E/AndroidRuntime( 8797): at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
E/AndroidRuntime( 8797): at android.view.View.layout(View.java:11278)
E/AndroidRuntime( 8797): at android.view.ViewGroup.layout(ViewGroup.java:4224)
E/AndroidRuntime( 8797): at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
E/AndroidRuntime( 8797): at android.view.View.layout(View.java:11278)
E/AndroidRuntime( 8797): at android.view.ViewGroup.layout(ViewGroup.java:4224)
E/AndroidRuntime( 8797): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1489)
E/AndroidRuntime( 8797): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
E/AndroidRuntime( 8797): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 8797): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 8797): at android.app.ActivityThread.main(ActivityThread.java:4424)
E/AndroidRuntime( 8797): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 8797): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 8797): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime( 8797): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime( 8797): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 162): Force finishing activity org.odk.collect.android/.activities.FormHierarchyActivity
D/dalvikvm( 162): GC_FOR_ALLOC freed 214K, 26% free 22246K/29767K, paused 140ms
W/ActivityManager( 162): Force finishing activity org.odk.collect.android/.activities.FormEntryActivity
W/ActivityManager( 162): Activity pause timeout for ActivityRecord{41a0cbc8 org.odk.collect.android/.activities.FormHierarchyActivity}
D/GCM (29961): GcmService start Intent { act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 cmp=com.google.android.gms/.gcm.GcmService (has extras) } com.google.android.checkin.CHECKIN_COMPLETE
D/dalvikvm(29961): GC_CONCURRENT freed 942K, 12% free 9513K/10695K, paused 7ms+4ms
D/dalvikvm( 162): GC_EXPLICIT freed 567K, 26% free 22288K/29767K, paused 2ms+7ms
D/GCM (29961): GcmService start Intent { act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 cmp=com.google.android.gms/.gcm.GcmService (has extras) } com.google.android.checkin.CHECKIN_COMPLETE
D/dalvikvm(29961): GC_CONCURRENT freed 903K, 11% free 9520K/10695K, paused 2ms+4ms
I/Process ( 8797): Sending signal. PID: 8797 SIG: 9
I/WindowManager( 162): WIN DEATH: Window{417e25e8 org.odk.collect.android/org.odk.collect.android.activities.MainMenuActivity paused=false}
I/ActivityManager( 162): Process org.odk.collect.android (pid 8797) has died.
I/WindowManager( 162): WIN DEATH: Window{416bf7d8 org.odk.collect.android/org.odk.collect.android.activities.FormEntryActivity paused=true}
I/WindowManager( 162): WIN DEATH: Window{418c6c18 org.odk.collect.android/org.odk.collect.android.activities.FormHierarchyActivity paused=false}
W/ActivityManager( 162): Force removing ActivityRecord{41738bd0 org.odk.collect.android/.activities.MainMenuActivity}: app died, no saved state

Hi,

I just had a user encounter this same problem. You're right about the
question and the problem is that the question doesn't have a label. If you
change your question to look like this, it should work around the problem:

  <select1 ref="/data/S1_group/S1_1"> 
   * <label></label>*
    <item> 
      <label ref="jr:itext('/data/S1_group/S1_1:option0')"/> 
      <value>99</value> 
    </item> 
  </select1> 

The problem is that TextUtils.markdownToHtml isn't null safe and is passed
null for questions without labels. This behavior changed between versions
of 1.4.7 and 1.4.10 of Collect.

Brent

··· On Friday, June 24, 2016 at 2:30:17 PM UTC-4, colind...@gmail.com wrote: > > Hi all, > > Not sure what you call the little arrow in the top right, btw save and > settings. But my form will crash when the user taps that. > > The form passes validation. It can also be completed in the standard way, > swiping right to the next screen until reaching the end. However, when the > user taps the arrow, 'Unfortunately, ODK Collect has stopped'. From that > point on, if the form is loaded it will try to resume (Unsaved changes > recovered from savepoint), and will then immediately crash again. The only > way to get out of that loop is to use a file browser on the tabllet, and > delete the specific form instance in /sdcard/odk/instances. > > I have narrowed the problem down to one field - S1_1. It is a select1 with > no label and only 1 option - I use this pattern for items like 'Don't Know > + Date' or 'Refuse to Answer + String'. I have this exact same pattern in > other forms that do work (and can be 'arrowed'). > > > > Code snippet below: > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr=" > http://openrosa.org/javarosa"> > > S_LABORATORY_RESULTS_T20160622 > > > > > > > > > > > > > > > > > > > > > > > > > > Date of Data Entry > > > > > > Facility ID > > > Participant ID > > > > > > Interviewer Initials > > > > > > Enter Viral load results as soon as they are > available > > > > > > S1. Date of Specimen Collection > > > Not available > > > > readonly="true()" calculate="concat('uuid:', uuid())"/> > constraint="date(.) >= date('2016-05-10') and date(.) <= > date(today())" jr:constraintMsg="Date must be between May 10 and today"/> > required="true()" constraint=". >= 1 and . <= 16" > jr:constraintMsg="Facility Code must be between 1 and 16"/> > constraint=". >= 1 and . <= 60" jr:constraintMsg="Participant ID must > be between 1 and 60"/> > required="true()"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 99 > > > > > > > > > > Stack trace: > > E/FormEntryActivity( 8797): Dismiss dialogs > I/SavePointTask( 8797): Savepoint ms: 29 to > /mnt/sdcard/odk/.cache/S_LABORATORY_RESULTS_T20160622_2016-06-24_14-15-12.xml.save > > D/dalvikvm(29961): GC_CONCURRENT freed 927K, 11% free 9521K/10695K, paused > 2ms+4ms > V/TabletStatusBar( 233): setLightsOn(true) > D/AndroidRuntime( 8797): Shutting down VM > W/dalvikvm( 8797): threadid=1: thread exiting with uncaught exception > (group=0x40a371f8) > E/AndroidRuntime( 8797): FATAL EXCEPTION: main > E/AndroidRuntime( 8797): java.lang.NullPointerException > E/AndroidRuntime( 8797): at > org.odk.collect.android.utilities.TextUtils.markdownToHtml(TextUtils.java:35) > > E/AndroidRuntime( 8797): at > org.odk.collect.android.utilities.TextUtils.textToHtml(TextUtils.java:108) > E/AndroidRuntime( 8797): at > org.odk.collect.android.views.HierarchyElementView.setPrimaryText(HierarchyElementView.java:75) > > E/AndroidRuntime( 8797): at > org.odk.collect.android.views.HierarchyElementView.(HierarchyElementView.java:50) > > E/AndroidRuntime( 8797): at > org.odk.collect.android.adapters.HierarchyListAdapter.getView(HierarchyListAdapter.java:61) > > E/AndroidRuntime( 8797): at > android.widget.AbsListView.obtainView(AbsListView.java:2033) > E/AndroidRuntime( 8797): at > android.widget.ListView.makeAndAddView(ListView.java:1772) > E/AndroidRuntime( 8797): at > android.widget.ListView.fillDown(ListView.java:672) > E/AndroidRuntime( 8797): at > android.widget.ListView.fillFromTop(ListView.java:732) > E/AndroidRuntime( 8797): at > android.widget.ListView.layoutChildren(ListView.java:1625) > E/AndroidRuntime( 8797): at > android.widget.AbsListView.onLayout(AbsListView.java:1863) > E/AndroidRuntime( 8797): at > android.view.View.layout(View.java:11278) > E/AndroidRuntime( 8797): at > android.view.ViewGroup.layout(ViewGroup.java:4224) > E/AndroidRuntime( 8797): at > android.widget.RelativeLayout.onLayout(RelativeLayout.java:925) > E/AndroidRuntime( 8797): at > android.view.View.layout(View.java:11278) > E/AndroidRuntime( 8797): at > android.view.ViewGroup.layout(ViewGroup.java:4224) > E/AndroidRuntime( 8797): at > android.widget.FrameLayout.onLayout(FrameLayout.java:431) > E/AndroidRuntime( 8797): at > android.view.View.layout(View.java:11278) > E/AndroidRuntime( 8797): at > android.view.ViewGroup.layout(ViewGroup.java:4224) > E/AndroidRuntime( 8797): at > android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628) > E/AndroidRuntime( 8797): at > android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486) > E/AndroidRuntime( 8797): at > android.widget.LinearLayout.onLayout(LinearLayout.java:1399) > E/AndroidRuntime( 8797): at > android.view.View.layout(View.java:11278) > E/AndroidRuntime( 8797): at > android.view.ViewGroup.layout(ViewGroup.java:4224) > E/AndroidRuntime( 8797): at > android.widget.FrameLayout.onLayout(FrameLayout.java:431) > E/AndroidRuntime( 8797): at > android.view.View.layout(View.java:11278) > E/AndroidRuntime( 8797): at > android.view.ViewGroup.layout(ViewGroup.java:4224) > E/AndroidRuntime( 8797): at > android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1489) > E/AndroidRuntime( 8797): at > android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442) > E/AndroidRuntime( 8797): at > android.os.Handler.dispatchMessage(Handler.java:99) > E/AndroidRuntime( 8797): at > android.os.Looper.loop(Looper.java:137) > E/AndroidRuntime( 8797): at > android.app.ActivityThread.main(ActivityThread.java:4424) > E/AndroidRuntime( 8797): at > java.lang.reflect.Method.invokeNative(Native Method) > E/AndroidRuntime( 8797): at > java.lang.reflect.Method.invoke(Method.java:511) > E/AndroidRuntime( 8797): at > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) > > E/AndroidRuntime( 8797): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) > E/AndroidRuntime( 8797): at dalvik.system.NativeStart.main(Native > Method) > W/ActivityManager( 162): Force finishing activity > org.odk.collect.android/.activities.FormHierarchyActivity > D/dalvikvm( 162): GC_FOR_ALLOC freed 214K, 26% free 22246K/29767K, paused > 140ms > W/ActivityManager( 162): Force finishing activity > org.odk.collect.android/.activities.FormEntryActivity > W/ActivityManager( 162): Activity pause timeout for > ActivityRecord{41a0cbc8 > org.odk.collect.android/.activities.FormHierarchyActivity} > D/GCM (29961): GcmService start Intent { > act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 > cmp=com.google.android.gms/.gcm.GcmService (has extras) } > com.google.android.checkin.CHECKIN_COMPLETE > D/dalvikvm(29961): GC_CONCURRENT freed 942K, 12% free 9513K/10695K, paused > 7ms+4ms > D/dalvikvm( 162): GC_EXPLICIT freed 567K, 26% free 22288K/29767K, paused > 2ms+7ms > D/GCM (29961): GcmService start Intent { > act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 > cmp=com.google.android.gms/.gcm.GcmService (has extras) } > com.google.android.checkin.CHECKIN_COMPLETE > D/dalvikvm(29961): GC_CONCURRENT freed 903K, 11% free 9520K/10695K, paused > 2ms+4ms > I/Process ( 8797): Sending signal. PID: 8797 SIG: 9 > I/WindowManager( 162): WIN DEATH: Window{417e25e8 > org.odk.collect.android/org.odk.collect.android.activities.MainMenuActivity > paused=false} > I/ActivityManager( 162): Process org.odk.collect.android (pid 8797) has > died. > I/WindowManager( 162): WIN DEATH: Window{416bf7d8 > org.odk.collect.android/org.odk.collect.android.activities.FormEntryActivity > paused=true} > I/WindowManager( 162): WIN DEATH: Window{418c6c18 > org.odk.collect.android/org.odk.collect.android.activities.FormHierarchyActivity > paused=false} > W/ActivityManager( 162): Force removing ActivityRecord{41738bd0 > org.odk.collect.android/.activities.MainMenuActivity}: app died, no saved > state >

Hi again,

In case you're interested, I reported this issue, but it appears to have
been identified and fixed already in development. However, it appears that
it hasn't been released yet.

For your reference the issue I filed (and subsequently closed once I
realized it was fixed):

Brent

··· On Monday, June 27, 2016 at 12:39:32 PM UTC-4, Brent Atkinson wrote: > > Hi, > > I just had a user encounter this same problem. You're right about the > question and the problem is that the question doesn't have a label. If you > change your question to look like this, it should work around the problem: > > >> > * * > > > 99 > > > > The problem is that TextUtils.markdownToHtml isn't null safe and is passed > null for questions without labels. This behavior changed between versions > of 1.4.7 and 1.4.10 of Collect. > > Brent > > On Friday, June 24, 2016 at 2:30:17 PM UTC-4, colind...@gmail.com wrote: >> >> Hi all, >> >> Not sure what you call the little arrow in the top right, btw save and >> settings. But my form will crash when the user taps that. >> >> The form passes validation. It can also be completed in the standard way, >> swiping right to the next screen until reaching the end. However, when the >> user taps the arrow, 'Unfortunately, ODK Collect has stopped'. From that >> point on, if the form is loaded it will try to resume (Unsaved changes >> recovered from savepoint), and will then immediately crash again. The only >> way to get out of that loop is to use a file browser on the tabllet, and >> delete the specific form instance in /sdcard/odk/instances. >> >> I have narrowed the problem down to one field - S1_1. It is a select1 >> with no label and only 1 option - I use this pattern for items like 'Don't >> Know + Date' or 'Refuse to Answer + String'. I have this exact same pattern >> in other forms that do work (and can be 'arrowed'). >> >> >> >> Code snippet below: >> >> > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr=" >> http://openrosa.org/javarosa"> >> >> S_LABORATORY_RESULTS_T20160622 >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Date of Data Entry >> >> >> >> >> >> Facility ID >> >> >> Participant ID >> >> >> >> >> >> Interviewer Initials >> >> >> >> >> >> Enter Viral load results as soon as they are >> available >> >> >> >> >> >> S1. Date of Specimen Collection >> >> >> Not available >> >> >> >> > readonly="true()" calculate="concat('uuid:', uuid())"/> >> > required="true()" constraint="date(.) >= date('2016-05-10') and date(.) >> <= date(today())" jr:constraintMsg="Date must be between May 10 and >> today"/> >> > required="true()" constraint=". >= 1 and . <= 16" >> jr:constraintMsg="Facility Code must be between 1 and 16"/> >> > constraint=". >= 1 and . <= 60" jr:constraintMsg="Participant ID must >> be between 1 and 60"/> >> > required="true()"/> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> 99 >> >> >> >> >> >> >> >> >> >> Stack trace: >> >> E/FormEntryActivity( 8797): Dismiss dialogs >> I/SavePointTask( 8797): Savepoint ms: 29 to >> /mnt/sdcard/odk/.cache/S_LABORATORY_RESULTS_T20160622_2016-06-24_14-15-12.xml.save >> >> D/dalvikvm(29961): GC_CONCURRENT freed 927K, 11% free 9521K/10695K, >> paused 2ms+4ms >> V/TabletStatusBar( 233): setLightsOn(true) >> D/AndroidRuntime( 8797): Shutting down VM >> W/dalvikvm( 8797): threadid=1: thread exiting with uncaught exception >> (group=0x40a371f8) >> E/AndroidRuntime( 8797): FATAL EXCEPTION: main >> E/AndroidRuntime( 8797): java.lang.NullPointerException >> E/AndroidRuntime( 8797): at >> org.odk.collect.android.utilities.TextUtils.markdownToHtml(TextUtils.java:35) >> >> E/AndroidRuntime( 8797): at >> org.odk.collect.android.utilities.TextUtils.textToHtml(TextUtils.java:108) >> E/AndroidRuntime( 8797): at >> org.odk.collect.android.views.HierarchyElementView.setPrimaryText(HierarchyElementView.java:75) >> >> E/AndroidRuntime( 8797): at >> org.odk.collect.android.views.HierarchyElementView.(HierarchyElementView.java:50) >> >> E/AndroidRuntime( 8797): at >> org.odk.collect.android.adapters.HierarchyListAdapter.getView(HierarchyListAdapter.java:61) >> >> E/AndroidRuntime( 8797): at >> android.widget.AbsListView.obtainView(AbsListView.java:2033) >> E/AndroidRuntime( 8797): at >> android.widget.ListView.makeAndAddView(ListView.java:1772) >> E/AndroidRuntime( 8797): at >> android.widget.ListView.fillDown(ListView.java:672) >> E/AndroidRuntime( 8797): at >> android.widget.ListView.fillFromTop(ListView.java:732) >> E/AndroidRuntime( 8797): at >> android.widget.ListView.layoutChildren(ListView.java:1625) >> E/AndroidRuntime( 8797): at >> android.widget.AbsListView.onLayout(AbsListView.java:1863) >> E/AndroidRuntime( 8797): at >> android.view.View.layout(View.java:11278) >> E/AndroidRuntime( 8797): at >> android.view.ViewGroup.layout(ViewGroup.java:4224) >> E/AndroidRuntime( 8797): at >> android.widget.RelativeLayout.onLayout(RelativeLayout.java:925) >> E/AndroidRuntime( 8797): at >> android.view.View.layout(View.java:11278) >> E/AndroidRuntime( 8797): at >> android.view.ViewGroup.layout(ViewGroup.java:4224) >> E/AndroidRuntime( 8797): at >> android.widget.FrameLayout.onLayout(FrameLayout.java:431) >> E/AndroidRuntime( 8797): at >> android.view.View.layout(View.java:11278) >> E/AndroidRuntime( 8797): at >> android.view.ViewGroup.layout(ViewGroup.java:4224) >> E/AndroidRuntime( 8797): at >> android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628) >> E/AndroidRuntime( 8797): at >> android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486) >> E/AndroidRuntime( 8797): at >> android.widget.LinearLayout.onLayout(LinearLayout.java:1399) >> E/AndroidRuntime( 8797): at >> android.view.View.layout(View.java:11278) >> E/AndroidRuntime( 8797): at >> android.view.ViewGroup.layout(ViewGroup.java:4224) >> E/AndroidRuntime( 8797): at >> android.widget.FrameLayout.onLayout(FrameLayout.java:431) >> E/AndroidRuntime( 8797): at >> android.view.View.layout(View.java:11278) >> E/AndroidRuntime( 8797): at >> android.view.ViewGroup.layout(ViewGroup.java:4224) >> E/AndroidRuntime( 8797): at >> android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1489) >> E/AndroidRuntime( 8797): at >> android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442) >> E/AndroidRuntime( 8797): at >> android.os.Handler.dispatchMessage(Handler.java:99) >> E/AndroidRuntime( 8797): at >> android.os.Looper.loop(Looper.java:137) >> E/AndroidRuntime( 8797): at >> android.app.ActivityThread.main(ActivityThread.java:4424) >> E/AndroidRuntime( 8797): at >> java.lang.reflect.Method.invokeNative(Native Method) >> E/AndroidRuntime( 8797): at >> java.lang.reflect.Method.invoke(Method.java:511) >> E/AndroidRuntime( 8797): at >> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) >> >> E/AndroidRuntime( 8797): at >> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) >> E/AndroidRuntime( 8797): at dalvik.system.NativeStart.main(Native >> Method) >> W/ActivityManager( 162): Force finishing activity >> org.odk.collect.android/.activities.FormHierarchyActivity >> D/dalvikvm( 162): GC_FOR_ALLOC freed 214K, 26% free 22246K/29767K, >> paused 140ms >> W/ActivityManager( 162): Force finishing activity >> org.odk.collect.android/.activities.FormEntryActivity >> W/ActivityManager( 162): Activity pause timeout for >> ActivityRecord{41a0cbc8 >> org.odk.collect.android/.activities.FormHierarchyActivity} >> D/GCM (29961): GcmService start Intent { >> act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 >> cmp=com.google.android.gms/.gcm.GcmService (has extras) } >> com.google.android.checkin.CHECKIN_COMPLETE >> D/dalvikvm(29961): GC_CONCURRENT freed 942K, 12% free 9513K/10695K, >> paused 7ms+4ms >> D/dalvikvm( 162): GC_EXPLICIT freed 567K, 26% free 22288K/29767K, paused >> 2ms+7ms >> D/GCM (29961): GcmService start Intent { >> act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 >> cmp=com.google.android.gms/.gcm.GcmService (has extras) } >> com.google.android.checkin.CHECKIN_COMPLETE >> D/dalvikvm(29961): GC_CONCURRENT freed 903K, 11% free 9520K/10695K, >> paused 2ms+4ms >> I/Process ( 8797): Sending signal. PID: 8797 SIG: 9 >> I/WindowManager( 162): WIN DEATH: Window{417e25e8 >> org.odk.collect.android/org.odk.collect.android.activities.MainMenuActivity >> paused=false} >> I/ActivityManager( 162): Process org.odk.collect.android (pid 8797) has >> died. >> I/WindowManager( 162): WIN DEATH: Window{416bf7d8 >> org.odk.collect.android/org.odk.collect.android.activities.FormEntryActivity >> paused=true} >> I/WindowManager( 162): WIN DEATH: Window{418c6c18 >> org.odk.collect.android/org.odk.collect.android.activities.FormHierarchyActivity >> paused=false} >> W/ActivityManager( 162): Force removing ActivityRecord{41738bd0 >> org.odk.collect.android/.activities.MainMenuActivity}: app died, no saved >> state >> >

Hi Brent, and thanks for the response.

It looks like you were right! I added (blank) labels to each question and can no longer get it to crash on arrow tap.

I had been further confused by this issue, as there were other forms with the same structure that would not crash on arrow tap. However, on further inspection, it looks like it will crash once I scroll down in that overview (I guess it doesn't load until after the lazy scroll).

Thanks again for the assistance here. Hopefully the new version of ODK is released soon...

··· On Monday, June 27, 2016 at 1:16:34 PM UTC-4, Brent Atkinson wrote: > Hi again, > > > In case you're interested, I reported this issue, but it appears to have been identified and fixed already in development. However, it appears that it hasn't been released yet. > > > > For your reference the issue I filed (and subsequently closed once I realized it was fixed): https://github.com/opendatakit/opendatakit/issues/1232 > > > Brent > > On Monday, June 27, 2016 at 12:39:32 PM UTC-4, Brent Atkinson wrote: > Hi, > > > I just had a user encounter this same problem. You're right about the question and the problem is that the question doesn't have a label. If you change your question to look like this, it should work around the problem: > > > > > > > 99 > > > > > The problem is that TextUtils.markdownToHtml isn't null safe and is passed null for questions without labels. This behavior changed between versions of 1.4.7 and 1.4.10 of Collect. > > > Brent > > On Friday, June 24, 2016 at 2:30:17 PM UTC-4, colind...@gmail.com wrote:Hi all, > > > > Not sure what you call the little arrow in the top right, btw save and settings. But my form will crash when the user taps that. > > > > The form passes validation. It can also be completed in the standard way, swiping right to the next screen until reaching the end. However, when the user taps the arrow, 'Unfortunately, ODK Collect has stopped'. From that point on, if the form is loaded it will try to resume (Unsaved changes recovered from savepoint), and will then immediately crash again. The only way to get out of that loop is to use a file browser on the tabllet, and delete the specific form instance in /sdcard/odk/instances. > > > > I have narrowed the problem down to one field - S1_1. It is a select1 with no label and only 1 option - I use this pattern for items like 'Don't Know + Date' or 'Refuse to Answer + String'. I have this exact same pattern in other forms that do work (and can be 'arrowed'). > > > > > > > > Code snippet below: > > > > > > > > S_LABORATORY_RESULTS_T20160622 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Date of Data Entry > > > > > > > > > > > > Facility ID > > > > > > Participant ID > > > > > > > > > > > > Interviewer Initials > > > > > > > > > > > > Enter Viral load results as soon as they are available > > > > > > > > > > > > S1. Date of Specimen Collection > > > > > > Not available > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 99 > > > > > > > > > > > > > > > > > > > > Stack trace: > > > > E/FormEntryActivity( 8797): Dismiss dialogs > > I/SavePointTask( 8797): Savepoint ms: 29 to /mnt/sdcard/odk/.cache/S_LABORATORY_RESULTS_T20160622_2016-06-24_14-15-12.xml.save > > D/dalvikvm(29961): GC_CONCURRENT freed 927K, 11% free 9521K/10695K, paused 2ms+4ms > > V/TabletStatusBar( 233): setLightsOn(true) > > D/AndroidRuntime( 8797): Shutting down VM > > W/dalvikvm( 8797): threadid=1: thread exiting with uncaught exception (group=0x40a371f8) > > E/AndroidRuntime( 8797): FATAL EXCEPTION: main > > E/AndroidRuntime( 8797): java.lang.NullPointerException > > E/AndroidRuntime( 8797): at org.odk.collect.android.utilities.TextUtils.markdownToHtml(TextUtils.java:35) > > E/AndroidRuntime( 8797): at org.odk.collect.android.utilities.TextUtils.textToHtml(TextUtils.java:108) > > E/AndroidRuntime( 8797): at org.odk.collect.android.views.HierarchyElementView.setPrimaryText(HierarchyElementView.java:75) > > E/AndroidRuntime( 8797): at org.odk.collect.android.views.HierarchyElementView.(HierarchyElementView.java:50) > > E/AndroidRuntime( 8797): at org.odk.collect.android.adapters.HierarchyListAdapter.getView(HierarchyListAdapter.java:61) > > E/AndroidRuntime( 8797): at android.widget.AbsListView.obtainView(AbsListView.java:2033) > > E/AndroidRuntime( 8797): at android.widget.ListView.makeAndAddView(ListView.java:1772) > > E/AndroidRuntime( 8797): at android.widget.ListView.fillDown(ListView.java:672) > > E/AndroidRuntime( 8797): at android.widget.ListView.fillFromTop(ListView.java:732) > > E/AndroidRuntime( 8797): at android.widget.ListView.layoutChildren(ListView.java:1625) > > E/AndroidRuntime( 8797): at android.widget.AbsListView.onLayout(AbsListView.java:1863) > > E/AndroidRuntime( 8797): at android.view.View.layout(View.java:11278) > > E/AndroidRuntime( 8797): at android.view.ViewGroup.layout(ViewGroup.java:4224) > > E/AndroidRuntime( 8797): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:925) > > E/AndroidRuntime( 8797): at android.view.View.layout(View.java:11278) > > E/AndroidRuntime( 8797): at android.view.ViewGroup.layout(ViewGroup.java:4224) > > E/AndroidRuntime( 8797): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) > > E/AndroidRuntime( 8797): at android.view.View.layout(View.java:11278) > > E/AndroidRuntime( 8797): at android.view.ViewGroup.layout(ViewGroup.java:4224) > > E/AndroidRuntime( 8797): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628) > > E/AndroidRuntime( 8797): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486) > > E/AndroidRuntime( 8797): at android.widget.LinearLayout.onLayout(LinearLayout.java:1399) > > E/AndroidRuntime( 8797): at android.view.View.layout(View.java:11278) > > E/AndroidRuntime( 8797): at android.view.ViewGroup.layout(ViewGroup.java:4224) > > E/AndroidRuntime( 8797): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) > > E/AndroidRuntime( 8797): at android.view.View.layout(View.java:11278) > > E/AndroidRuntime( 8797): at android.view.ViewGroup.layout(ViewGroup.java:4224) > > E/AndroidRuntime( 8797): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1489) > > E/AndroidRuntime( 8797): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442) > > E/AndroidRuntime( 8797): at android.os.Handler.dispatchMessage(Handler.java:99) > > E/AndroidRuntime( 8797): at android.os.Looper.loop(Looper.java:137) > > E/AndroidRuntime( 8797): at android.app.ActivityThread.main(ActivityThread.java:4424) > > E/AndroidRuntime( 8797): at java.lang.reflect.Method.invokeNative(Native Method) > > E/AndroidRuntime( 8797): at java.lang.reflect.Method.invoke(Method.java:511) > > E/AndroidRuntime( 8797): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) > > E/AndroidRuntime( 8797): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) > > E/AndroidRuntime( 8797): at dalvik.system.NativeStart.main(Native Method) > > W/ActivityManager( 162): Force finishing activity org.odk.collect.android/.activities.FormHierarchyActivity > > D/dalvikvm( 162): GC_FOR_ALLOC freed 214K, 26% free 22246K/29767K, paused 140ms > > W/ActivityManager( 162): Force finishing activity org.odk.collect.android/.activities.FormEntryActivity > > W/ActivityManager( 162): Activity pause timeout for ActivityRecord{41a0cbc8 org.odk.collect.android/.activities.FormHierarchyActivity} > > D/GCM (29961): GcmService start Intent { act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 cmp=com.google.android.gms/.gcm.GcmService (has extras) } com.google.android.checkin.CHECKIN_COMPLETE > > D/dalvikvm(29961): GC_CONCURRENT freed 942K, 12% free 9513K/10695K, paused 7ms+4ms > > D/dalvikvm( 162): GC_EXPLICIT freed 567K, 26% free 22288K/29767K, paused 2ms+7ms > > D/GCM (29961): GcmService start Intent { act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 cmp=com.google.android.gms/.gcm.GcmService (has extras) } com.google.android.checkin.CHECKIN_COMPLETE > > D/dalvikvm(29961): GC_CONCURRENT freed 903K, 11% free 9520K/10695K, paused 2ms+4ms > > I/Process ( 8797): Sending signal. PID: 8797 SIG: 9 > > I/WindowManager( 162): WIN DEATH: Window{417e25e8 org.odk.collect.android/org.odk.collect.android.activities.MainMenuActivity paused=false} > > I/ActivityManager( 162): Process org.odk.collect.android (pid 8797) has died. > > I/WindowManager( 162): WIN DEATH: Window{416bf7d8 org.odk.collect.android/org.odk.collect.android.activities.FormEntryActivity paused=true} > > I/WindowManager( 162): WIN DEATH: Window{418c6c18 org.odk.collect.android/org.odk.collect.android.activities.FormHierarchyActivity paused=false} > > W/ActivityManager( 162): Force removing ActivityRecord{41738bd0 org.odk.collect.android/.activities.MainMenuActivity}: app died, no saved state