pejic / Summation

A simple Android app with list of items with a total at the end.
GNU General Public License v3.0
3 stars 1 forks source link

SQLiteException when you try to add a Item without you insert the values #3

Open slumdroid opened 10 years ago

slumdroid commented 10 years ago

Application does not crash, but there is a SQLiteException with the following stack trace when the next sequence of events is fired: starting by main activity click on ActionBarItem [the image on the right, the addition symbol (+)] press the back button or click on ActionBarHome (App's logo)

E/SQLiteLog( 697): (1) near "null": syntax error E/SQLiteDatabase( 697): Error inserting E/SQLiteDatabase( 697): android.database.sqlite.SQLiteException: near "null": syntax error (code 1): , while compiling: INSERT INTO sheet_0(null) VALUES (NULL) E/SQLiteDatabase( 697): at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) E/SQLiteDatabase( 697): at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:882) E/SQLiteDatabase( 697): at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:493) E/SQLiteDatabase( 697): at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588) E/SQLiteDatabase( 697): at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:58) E/SQLiteDatabase( 697): at android.database.sqlite.SQLiteStatement.(SQLiteStatement.java:31) E/SQLiteDatabase( 697): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1467) E/SQLiteDatabase( 697): at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1339) E/SQLiteDatabase( 697): at net.pejici.summation.model.Model.addItem(Model.java:86) E/SQLiteDatabase( 697): at net.pejici.summation.ItemActivity.onPause(ItemActivity.java:148) E/SQLiteDatabase( 697): at android.app.Activity.performPause(Activity.java:5106) E/SQLiteDatabase( 697): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1225) E/SQLiteDatabase( 697): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2825) E/SQLiteDatabase( 697): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2794) E/SQLiteDatabase( 697): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2772) E/SQLiteDatabase( 697): at android.app.ActivityThread.access$800(ActivityThread.java:130) E/SQLiteDatabase( 697): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212) E/SQLiteDatabase( 697): at android.os.Handler.dispatchMessage(Handler.java:99) E/SQLiteDatabase( 697): at android.os.Looper.loop(Looper.java:137) E/SQLiteDatabase( 697): at android.app.ActivityThread.main(ActivityThread.java:4745) E/SQLiteDatabase( 697): at java.lang.reflect.Method.invokeNative(Native Method) E/SQLiteDatabase( 697): at java.lang.reflect.Method.invoke(Method.java:511) E/SQLiteDatabase( 697): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) E/SQLiteDatabase( 697): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/SQLiteDatabase( 697): at dalvik.system.NativeStart.main(Native Method)

pejic commented 10 years ago

Thanks for reporting this and the other issues.