Crash on Android

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Crash on Android

Jeff Archer-5
Hi All,
Any thoughts on this will be greatly appreciated.

I am having an issue only on a specific tablet when it is running Android
4.2.2.  When Android is upgraded to 4.4.2 problems appears to be gone.  I
still want to understand root cause to know if problem is really gone.

My environment is a little unusual.  I am running SQLite amalgamation
wrapped by JDBC driver.  I was running 3.13.0 when issue was initially
found but have updated to 3.17.0 and no change.

Problem always occurs while doing same operation but unable to predict when
it will occur.  Problem occurs while reading in a specific table and a call
to sqlite3_column_text16() results in the following error being logged:
A/libc(5225): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=128), thread
5225 (saltillo.chatpc)
and of course kills the process.

Also, I find that attaching a debugger or writing too many log messages
seems to make the problems disappear also.

Thanks,
Jeff
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Crash on Android

Daniel Anderson
looks like a race condition!

but it could also be uninitialized variable, but this is rarer these day as
most compiler flag uninitialized var.
unless your uninitialized var happen to be in a struct, this is why
constructor are so important for struct/class






2017-02-27 11:28 GMT-05:00 Jeff Archer <[hidden email]>:

> Hi All,
> Any thoughts on this will be greatly appreciated.
>
> I am having an issue only on a specific tablet when it is running Android
> 4.2.2.  When Android is upgraded to 4.4.2 problems appears to be gone.  I
> still want to understand root cause to know if problem is really gone.
>
> My environment is a little unusual.  I am running SQLite amalgamation
> wrapped by JDBC driver.  I was running 3.13.0 when issue was initially
> found but have updated to 3.17.0 and no change.
>
> Problem always occurs while doing same operation but unable to predict when
> it will occur.  Problem occurs while reading in a specific table and a call
> to sqlite3_column_text16() results in the following error being logged:
> A/libc(5225): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=128), thread
> 5225 (saltillo.chatpc)
> and of course kills the process.
>
> Also, I find that attaching a debugger or writing too many log messages
> seems to make the problems disappear also.
>
> Thanks,
> Jeff
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>



--
Daniel
*L'action accède à la perfection quand, bien que vivant, vous êtes déjà
mort*
*Bunan*
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Crash on Android

Hick Gunter
In reply to this post by Jeff Archer-5
Looks like attempting to dereference a NULL pointer. Without a backtrace of the call stack this is not of much use. Most commonly this is caused by an uninitialized variable on the stack, accessing a structure that has been freed/garbage collected or memory being clobbered by a rogue write operation (too long, wrong place e.g. dangling pointer).

Attaching a debugger and/or adding log messages may change the stack layout in a way that makes the problem appear to have gone away (it is just affecting "something else", which may or may not mind).

In the context of sqlite3_column_text16(), make sure that the last call to sqlite3_step() returned SQLITE_ROW and that sqlite3_step(), sqlite3_finalize) or sqlite3_reset() are not called on the statement (even from another thread) and that you are not using an object returned from sqlite3_column_value() or using pointers returned from prior sqlite3_column functions and calling an sqlite3_column function that requires a conversion to take place.

-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:[hidden email]] Im Auftrag von Jeff Archer
Gesendet: Montag, 27. Februar 2017 17:28
An: SQLite mailing list <[hidden email]>
Betreff: [sqlite] Crash on Android

Hi All,
Any thoughts on this will be greatly appreciated.

I am having an issue only on a specific tablet when it is running Android 4.2.2.  When Android is upgraded to 4.4.2 problems appears to be gone.  I still want to understand root cause to know if problem is really gone.

My environment is a little unusual.  I am running SQLite amalgamation wrapped by JDBC driver.  I was running 3.13.0 when issue was initially found but have updated to 3.17.0 and no change.

Problem always occurs while doing same operation but unable to predict when it will occur.  Problem occurs while reading in a specific table and a call to sqlite3_column_text16() results in the following error being logged:
A/libc(5225): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=128), thread
5225 (saltillo.chatpc)
and of course kills the process.

Also, I find that attaching a debugger or writing too many log messages seems to make the problems disappear also.

Thanks,
Jeff
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: [hidden email]

This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users