Closed GoogleCodeExporter closed 9 years ago
The error seems to be here:
02-10 11:58:19.553 I/MyTracks( 1249): Build query: SELECT * FROM tracks WHERE
(_id=(select max(_id) from tracks)) ORDER BY _id
02-10 11:58:19.593 W/MyTracksLib( 1249): Caught an unexpected exception.
02-10 11:58:19.593 W/MyTracksLib( 1249):
android.database.sqlite.SQLiteException: near ")": syntax error: , while
compiling: SELECT * FROM tracks WHERE (_id=(select max(_id) from tracks))) AND
(_id=(select max(_id) from tracks)) ORDER BY _id
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.database.sqlite.SQLiteProgram.native_compile(Native Method)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.database.sqlite.SQLiteProgram.compile(SQLiteProgram.java:110)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:49)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.
java:49)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1
118)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:312)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:262)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
com.google.android.apps.mytracks.content.MyTracksProvider.query(MyTracksProvider
.java:376)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.content.ContentProvider$Transport.query(ContentProvider.java:129)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.content.ContentResolver.query(ContentResolver.java:149)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
com.google.android.apps.mytracks.content.MyTracksProviderUtilsImpl.getLastTrack(
MyTracksProviderUtilsImpl.java:781)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
com.google.android.apps.mytracks.MyTracks.onPrepareOptionsMenu(MyTracks.java:389
)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
android.app.Activity.onPrepareOptionsMenu(Activity.java:2172)
02-10 11:58:19.593 W/MyTracksLib( 1249): at
com.google.android.apps.mytracks.MyTracksMap.onPrepareOptionsMenu(MyTracksMap.ja
va:849)
Original comment by sandordo...@google.com
on 10 Feb 2011 at 5:56
Issue 310 has been merged into this issue.
Original comment by sandordo...@google.com
on 10 Feb 2011 at 6:06
I can duplicate this on Cupcake (1.5), but not on Donut.
Original comment by simmonmt@google.com
on 10 Feb 2011 at 7:58
Sorry simmonmt, but I not sure what your post means?
Original comment by imacke...@gmail.com
on 10 Feb 2011 at 8:07
This appears to be the root cause:
http://code.google.com/p/android/issues/detail?can=2&q=1587&id=1587
We're apparently being punished for trying to code defensively, in that it's
our attempt to dump the query to the log that's screwing up the query builder
-- but only in cupcake.
Original comment by simmonmt@google.com
on 10 Feb 2011 at 8:19
Since I'm cupcake, I guess I'm waiting for a new release in order to get this
resolved then?
Original comment by imacke...@gmail.com
on 10 Feb 2011 at 8:26
You could also, you know, wait for me to finish working on the bug. It may
well be that I have a workaround.
Original comment by simmonmt@google.com
on 10 Feb 2011 at 8:29
Sorry, newbie. I have full faith in you.
Original comment by imacke...@gmail.com
on 10 Feb 2011 at 8:32
There are actually two issues here. The first is the reuse of the
SQLiteQueryBuilder, which triggers Android bug 1587. The second is the
inability to find the icons for the main menu. You can see that in the log
after the SQL exception. The icon problem is being tracked as issue 313.
Original comment by simmonmt@google.com
on 10 Feb 2011 at 8:55
Original comment by simmonmt@google.com
on 10 Feb 2011 at 8:55
A fix for this issue is in simmonmt-staging5
Original comment by simmonmt@google.com
on 10 Feb 2011 at 9:01
Original comment by simmonmt@google.com
on 10 Feb 2011 at 9:34
simmonmt, sorry for being a bother. I went to your simmonmt-statging5 and I
don't see anything. You've created a fix, I'm at loss on how to get it applied
to my phone.
Original comment by imacke...@gmail.com
on 10 Feb 2011 at 10:07
Thanks simmonmt, I think I figured it out. I installed mytracks_1.1.1.apk and
everything seems to be working fine now
Original comment by imacke...@gmail.com
on 11 Feb 2011 at 8:03
I've fixed the SQL bug in
http://code.google.com/r/bartn-mytracks/source/detail?r=cef9c121fa9524b6cd5b6826
679a18924cf93d76 and verified on G1 (1.6).
Original comment by ba...@google.com
on 11 Feb 2011 at 8:10
Fix works and verified on 1.5 and Motorola Dext
Many thanks
Alan
Original comment by alan.m.h...@gmail.com
on 11 Feb 2011 at 9:38
Bart, I don't understand what you've done here.
I fixed the SQL bug in 5fe4ec0213. Then you undid my fix in ddf19ab694.
Then you fixed it again in cef9c121fa.
Matt
Original comment by simmonmt@google.com
on 11 Feb 2011 at 12:14
Issue 309 has been merged into this issue.
Original comment by simmonmt@google.com
on 15 Feb 2011 at 11:38
Original issue reported on code.google.com by
imacke...@gmail.com
on 10 Feb 2011 at 5:32Attachments: