Does QString has any limitation in Android environment for Qt 5.15.2?
-
Hm yes the number is very interesting indeed, looks like it is no coincidence.
... but I still think the string itself is fine and only in printing it is misrepresented. Otherwise it would be a very, very serious issue in Qt and I imagine it would have been detected earlier.
-
@sierdzio Yes, you are right! The size of temp is correct on both the platforms. Only in case of window the string is printed completely. Perhaps the limitation of
qDebug
in Android environment.
However, my quest to identify the source of crash remains! I am using Qstring to save a large Sqlite query and only in the case on Android, I am getting this crash duringexecSql
.
Anyways, thanks for your inputs!Best Regards,
M -
Hi,
What do you mean by large SQLite query ? How large ? What makes it so large ?
-
@SGaist It is an insert query with 1612 characters. Works perfectly well in windows but fail when cross-compile in Android and perform the same action.
If I replace the query with something smaller, it works in Android. That's why I suspected QString can be an issue here. -
Try running it with debugger attached, should show you where the issue occurs.
-
Just to help narrow things, are you building the whole query string or are you binding values ?
-
I think I identified the problem. The codebase doesn't solely rely on Sqlite plugin of Qt but also on external sqlite Library for certain operations while still using Qt connections to execute the query. Due to this shift in Qt version, maybe the Qt plugin and external lib were incompatible.
Qt 5.12.9 uses sqlite 3.32.1 in the sources while Qt 5.15.9 uses sqlite 3.33.0.
I simply changed to external lib to 3.33.0 (same as what Qt uses) and the query was handled correctly.Anyways, Thank you so much for your help!
-
That was a nasty one. Glad you found out and thanks for sharing !
-