wxSQLite3 minimum sample output errors

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
PJSJP
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon Nov 21, 2011 4:33 pm

wxSQLite3 minimum sample output errors

Post by PJSJP » Sat Feb 08, 2020 10:34 am

I am new to SQLite and have eventually managed to run the wxSQLite3 sample 'minimum'. The output looks fine until it gets to 'Start testing ciphers'. I am using Ubuntu 16.04, wxWidgets 3.0.3 (GTK3) and wxSQLite3 4.5.1 compiled as a library. (I have been looking for a way to post the output in some sort of scrolled text box, but can't see how to do it so I'll just paste the end of the file.) Here is the end of the output:
Start testing ciphers

Open database 'sqlcipher-1.1.8-testkey.db'
Cipher salt: E3127F8FC1B6722B64645D576696ACF9
1:SQL logic error[1]: no such table: t1

Open database 'sqlcipher-2.0-beta-testkey.db'
Cipher salt: 01B3BD3D250C565FF0FBCCD6BD1F610E
1:SQL logic error[1]: no such table: t1

Open database 'sqlcipher-2.0-be-testkey.db'
Cipher salt: 4E47A2E843C99F62CF3E39232679E08A
1:SQL logic error[1]: no such table: t1

Open database 'sqlcipher-2.0-le-testkey.db'
Cipher salt: D4AD12CC7B77D780007508FC5BC20198
1:SQL logic error[1]: no such table: t1

Open database 'sqlcipher-3.0-testkey.db'
Cipher salt: 19F9F0604FA7EDBDB20628748E6FB8FA
1:SQL logic error[1]: no such table: t1

Open database 'sqlcipher-4.0-testkey.db'
Cipher salt: EF83D4928F096BD2222FEF19B8C38DCF
1:SQL logic error[1]: no such table: t1

Finish testing ciphers

End of tests
Press q then enter to quit: q

(process:14657): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(process:14657): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:14657): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(process:14657): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

The database files do all appear to be present, but those shown above are zero in size. Please could someone let me know what is going on or if I'm using a bad combination of libraries.

utelle
Moderator
Moderator
Posts: 927
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSQLite3 minimum sample output errors

Post by utelle » Sat Feb 08, 2020 6:52 pm

PJSJP wrote:
Sat Feb 08, 2020 10:34 am
I am new to SQLite and have eventually managed to run the wxSQLite3 sample 'minimum'. The output looks fine until it gets to 'Start testing ciphers'. I am using Ubuntu 16.04, wxWidgets 3.0.3 (GTK3) and wxSQLite3 4.5.1 compiled as a library.
Did you compile wxSQLite3 yourself? And if so, how? In principle, the build process should set up the test environment in such a way that the minimal sample could be run without problems. How did you start the minimal sample? From which directory?
PJSJP wrote:
Sat Feb 08, 2020 10:34 am
Here is the end of the output:
Start testing ciphers

Open database 'sqlcipher-1.1.8-testkey.db'
Cipher salt: E3127F8FC1B6722B64645D576696ACF9
1:SQL logic error[1]: no such table: t1

Open database 'sqlcipher-2.0-beta-testkey.db'
Cipher salt: 01B3BD3D250C565FF0FBCCD6BD1F610E
1:SQL logic error[1]: no such table: t1

Open database 'sqlcipher-2.0-be-testkey.db'
Cipher salt: 4E47A2E843C99F62CF3E39232679E08A
1:SQL logic error[1]: no such table: t1

Open database 'sqlcipher-2.0-le-testkey.db'
Cipher salt: D4AD12CC7B77D780007508FC5BC20198
1:SQL logic error[1]: no such table: t1

Open database 'sqlcipher-3.0-testkey.db'
Cipher salt: 19F9F0604FA7EDBDB20628748E6FB8FA
1:SQL logic error[1]: no such table: t1

Open database 'sqlcipher-4.0-testkey.db'
Cipher salt: EF83D4928F096BD2222FEF19B8C38DCF
1:SQL logic error[1]: no such table: t1

Finish testing ciphers

End of tests
Press q then enter to quit: q
At Travis CI you can check how the output of the minimal sample should look like, if you go down to the section "Testing" and unfold it.
PJSJP wrote:
Sat Feb 08, 2020 10:34 am
(process:14657): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(process:14657): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:14657): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(process:14657): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
No idea, what's causing the above Glib warnings and errors.
PJSJP wrote:
Sat Feb 08, 2020 10:34 am
The database files do all appear to be present, but those shown above are zero in size. Please could someone let me know what is going on or if I'm using a bad combination of libraries.
All SQLCipher sample databases reside in subdirectory samples. If the minimal sample was built via configure, the build directory should have symbolic links to those database files. You say that the database files all have size zero. This indicates that they were created anew instead of accessing the existing database files. Either make the samples directory the current working directory and start the minimal sample from there, or add the commandline option -s samples_directory (replace samples_directory by the path to the samples directory) on starting the minimal sample, so that the application can set the working directory correctly. Then the minimal sample should work as expected.

PJSJP
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon Nov 21, 2011 4:33 pm

Re: wxSQLite3 minimum sample output errors

Post by PJSJP » Sun Feb 09, 2020 3:49 pm

Thanks. I compiled the wxSQLite3 library following the instructions here https://github.com/utelle/wxsqlite3 I was originally trying to compile the minimal sample from within CodeBlocks by including the wxSqlite3 code in with the minimal project. When I eventually decided to try compiling the wxSqlite3 library, I remained within CodeBlocks to compile minimal and then ran it from within the directory I had compiled it to (without the databases). I have now run the version which got compiled in the sample directory and that no longer has the database problems, but still gives me the same 4 messages at the end.

utelle
Moderator
Moderator
Posts: 927
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSQLite3 minimum sample output errors

Post by utelle » Sun Feb 09, 2020 6:42 pm

PJSJP wrote:
Sun Feb 09, 2020 3:49 pm
Thanks. I compiled the wxSQLite3 library following the instructions here https://github.com/utelle/wxsqlite3 I was originally trying to compile the minimal sample from within CodeBlocks by including the wxSqlite3 code in with the minimal project. When I eventually decided to try compiling the wxSqlite3 library, I remained within CodeBlocks to compile minimal and then ran it from within the directory I had compiled it to (without the databases).
I have now run the version which got compiled in the sample directory and that no longer has the database problems,
That's good news.
PJSJP wrote:
Sun Feb 09, 2020 3:49 pm
but still gives me the same 4 messages at the end.
Unfortunately, I can't help with those Glib messages, because I haven't observed such issues neither in my local test environment nor in the Travis CI environment. Maybe it's an issue in Code::Blocks ... but this is only a wild guess.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3896
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxSQLite3 minimum sample output errors

Post by ONEEYEMAN » Mon Feb 10, 2020 4:18 pm

Hi,
What OS/version are you using?
What version of the compiler and glibc do you have?

Thank you.

PJSJP
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon Nov 21, 2011 4:33 pm

Re: wxSQLite3 minimum sample output errors

Post by PJSJP » Tue Feb 11, 2020 11:14 am

I am using Ubuntu 16.04, gcc 5.4.0 and GLIBC 2.23

utelle
Moderator
Moderator
Posts: 927
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSQLite3 minimum sample output errors

Post by utelle » Thu Feb 13, 2020 2:26 pm

PJSJP wrote:
Tue Feb 11, 2020 11:14 am
I am using Ubuntu 16.04, gcc 5.4.0 and GLIBC 2.23
All components are rather old. However, this might not be the reason for seeing the Glib messages. I found this post in the wxWidgets forum reporting similar problems - the post is very old (about 14 years) and affects a different, much older wxWidgets version. Nevertheless, I get the impression that the problem is caused by the wxWidgets library itself, not my wxSQLite3 component. Maybe there is some sort of library version mismatch between various system components causing those issues.

Maybe you should consider to upgrade to a newer version of wxWidgets (version 3.0.4 or even 3.1.3) and also to a newer compiler version, if feasible.

PJSJP
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon Nov 21, 2011 4:33 pm

Re: wxSQLite3 minimum sample output errors

Post by PJSJP » Sat Feb 15, 2020 1:18 pm

Thanks. I am aware it's time to upgrade - hopefully this will make me actually get round to doing it!

Post Reply