wsharba / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 1 forks source link

blank columns in csv cause crash #1060

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If the itemsets.csv has empty columns, Collect 1.4.4 will crash.

# input
list_name,name,label,AI01,AI02,AS02,AI05,,,
Dept,5,Artibonite,,,,,,,

# crash
I/ItemsetDbAdapter(24131): create string: create table 
itemset_5be3cb0929c796b242a63eef884f6340 (_id integer primary key autoincrement 
 , "list_name" text  , "name" text  , "label" text  , "AI01" text  , "AI02" 
text  , "AS02" text  , "AI05" text  , "" text  , "" text  , "" text );
E/SQLiteLog(24131): (1) duplicate column name: 
W/dalvikvm(24131): threadid=12: thread exiting with uncaught exception 
(group=0x415acba8)
E/AndroidRuntime(24131): FATAL EXCEPTION: AsyncTask #2
E/AndroidRuntime(24131): Process: org.odk.collect.android, PID: 24131
E/AndroidRuntime(24131): java.lang.RuntimeException: An error occured while 
executing doInBackground()
E/AndroidRuntime(24131):    at android.os.AsyncTask$3.done(AsyncTask.java:300)

Original issue reported on code.google.com by yano...@nafundi.com on 9 Sep 2014 at 4:42

Attachments: