Dipenduroy / trolly

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

Force close when enter item with apostrophe #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enter a new item with an apostrophe (example: huile d'olives)
2. Press "Add" button
3. force close windows

What is the expected output?
new item in the list
What do you see instead?
A force close windows

What version of the product are you using? On what operating system?
Version 1.4 Android 2.2

Original issue reported on code.google.com by timar...@gmail.com on 15 Apr 2011 at 11:40

GoogleCodeExporter commented 9 years ago
I tried exactly the same item and had the same problem !

Original comment by epydem...@gmail.com on 3 Jul 2012 at 9:57

GoogleCodeExporter commented 9 years ago
There is a SQLiteException...

E/AndroidRuntime(  647): FATAL EXCEPTION: main
E/AndroidRuntime(  647): android.database.sqlite.SQLiteException: near 
"olives": syntax error (code 1): , while compiling: SELECT _id, item, status 
FROM shopping_list WHERE (item='Huile D'olives') ORDER BY item ASC
E/AndroidRuntime(  647):    at 
android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
E/AndroidRuntime(  647):    at 
android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnecti
on.java:882)
E/AndroidRuntime(  647):    at 
android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:493)
E/AndroidRuntime(  647):    at 
android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
E/AndroidRuntime(  647):    at 
android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
E/AndroidRuntime(  647):    at 
android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
E/AndroidRuntime(  647):    at 
android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.
java:44)
E/AndroidRuntime(  647):    at 
android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1
314)
E/AndroidRuntime(  647):    at 
android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:400)
E/AndroidRuntime(  647):    at 
android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:294)
E/AndroidRuntime(  647):    at 
caldwell.ben.trolly.TrollyProvider.query(TrollyProvider.java:128)
E/AndroidRuntime(  647):    at 
android.content.ContentProvider.query(ContentProvider.java:652)
E/AndroidRuntime(  647):    at 
android.content.ContentProvider$Transport.query(ContentProvider.java:189)
E/AndroidRuntime(  647):    at 
android.content.ContentResolver.query(ContentResolver.java:370)
E/AndroidRuntime(  647):    at 
android.content.ContentResolver.query(ContentResolver.java:313)
E/AndroidRuntime(  647):    at 
caldwell.ben.trolly.Trolly$2.onClick(Trolly.java:265)
E/AndroidRuntime(  647):    at android.view.View.performClick(View.java:4084)
E/AndroidRuntime(  647):    at android.view.View$PerformClick.run(View.java:16966)
E/AndroidRuntime(  647):    at android.os.Handler.handleCallback(Handler.java:615)
E/AndroidRuntime(  647):    at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(  647):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(  647):    at 
android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime(  647):    at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime(  647):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(  647):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime(  647):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime(  647):    at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  150):   Force finishing activity caldwell.ben.trolly/.Trolly

Original comment by inkubo3@gmail.com on 8 Apr 2014 at 10:25