Mono.Data.SqliteClient.SqliteCommand.LastInsertRowID() always returns 0 on PowerPC

Bug #35604 reported by Joshua Lock
8
Affects Status Importance Assigned to Milestone
mono
Unknown
Unknown
mono (Ubuntu)
Fix Released
Medium
Sebastian Dröge

Bug Description

I am using Banshee 0.10.8 on PPC Dapper.
Everytime I create a playlist (by selecting songs and right clicking add to playlist->new playlist) the playlist exists and functions as expected but after closing Banshee the next time I load Banshee the play list(s) have dissapeared and I am left with an empty New Playlist for each list created.
This was also happening with 0.10.7

I'm willing to help obtain any more info you might need.

Revision history for this message
Sebastian Dröge (slomo) wrote :

Please run banshee from a console (gnome-terminal for example) and paste the complete output of two banshee runs here

Changed in banshee:
assignee: nobody → slomo
status: Unconfirmed → Needs Info
Revision history for this message
Joshua Lock (incandescant) wrote :

As requested. First run (initial creation of playlist):

josh@darknight:~$ banshee
Warning: [20/03/2006 00:17:58] (Cannot connect to NetworkManager) - An available, working network connection will be assumed
Debug: [20/03/2006 00:17:59] (Default player engine) - GStreamer 0.10
Debug: [20/03/2006 00:17:59] (Audio CD Core Initialised) -
Audioscrobbler starting protocol engine
Warning: [20/03/2006 00:18:00] (Could not initialize plugin `Daap') - Daemon not running

(Banshee:8139): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.

(Banshee:8139): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.
Scanning library for tracks to update
Done scanning library
Processing track queue for pending queries
Done processing track queue
Audioscrobbler stopping protocol engine

Second run:

josh@darknight:~$ banshee
Warning: [20/03/2006 00:17:58] (Cannot connect to NetworkManager) - An available, working network connection will be assumed
Debug: [20/03/2006 00:17:59] (Default player engine) - GStreamer 0.10
Debug: [20/03/2006 00:17:59] (Audio CD Core Initialised) -
Audioscrobbler starting protocol engine
Warning: [20/03/2006 00:18:00] (Could not initialize plugin `Daap') - Daemon not running

(Banshee:8139): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.

(Banshee:8139): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.
Scanning library for tracks to update
Done scanning library
Processing track queue for pending queries
Done processing track queue
Audioscrobbler stopping protocol engine

I hope these help...

Revision history for this message
Sebastian Dröge (slomo) wrote :

Do you have a ~/.gnome2/banshee/banshee.db file?

Could you install sqlite3 and do the following on that file:

sqlite3 ~/.gnome2/banshee/banshee.db
SELECT * FROM Tracks
SELECT * FROM Playlists
SELECT * FROM PlaylistEntries

and paste the complete output here or better put it in a textfile and attach it

Revision history for this message
Joshua Lock (incandescant) wrote :

Hi Sebastian,

I'm attaching a tar.gz archive with the following in.
I ran the select statements before starting banshee, the output is in before-launch.txt.
I then ran the statements while banshee was running but after createing the playlist, output in while-running.txt.
Finally I closed banshee and ran the commands again, output in after-close.txt

Just FYI the commands I ran where of the format:

sqlite3 .gnome2/banshee/banshee.db "SELECT * FROM Playlists; SELECT * FROM Tracks; SELECT * FROM PlaylistEntries;" > after-close.txt

I hope these help.

Revision history for this message
Joshua Lock (incandescant) wrote : Files as above

Files as above post. Didn't realise I could comment on attached files.

Best

Revision history for this message
Sebastian Dröge (slomo) wrote : Re: Playlists do not persist after closing

Ok, thanks... for some reasons your playlist gets ID 1 but the corresponding entries are set to be in playlist with ID 0. weird.
I'll test it later on my PPC, too as I can't reproduce this problem on x86.

Could you also try to reproduce this with a new database? Just move your old one to another file before starting banshee

Revision history for this message
Joshua Lock (incandescant) wrote :

Sebastian,

I am seeing the same weird behaviour after moving the old db and creating a new one.
Strange...

Possibly an upstream bug?

Revision history for this message
Sebastian Dröge (slomo) wrote :

Most probably yes

Sebastian Dröge (slomo)
Changed in banshee:
status: Needs Info → Confirmed
Revision history for this message
Sebastian Dröge (slomo) wrote :

Ah, I should've written that I have the same problem on PPC ;)

Revision history for this message
Sebastian Dröge (slomo) wrote :

Ok, the bug is that sqlite3_last_insert_rowid() ALWAYS returns 0 on PPC where it returns the correct ID on other platforms after inserting a row. But the ID in the database itself is correct...

I'll try to get a small C testcase for this bug ready soon...

Revision history for this message
Sebastian Dröge (slomo) wrote :

Ok, let's move this away from sqlite3... it's actually a bug in the mono bindings :/

Revision history for this message
Sebastian Dröge (slomo) wrote : test.cs

testcase in C#...

output on x86:
1
2
3

output on ppc:
0
0
0

Revision history for this message
Sebastian Dröge (slomo) wrote : test.c

testcase doing exactly the same in C

output on x86 and ppc:
1
2
3

Revision history for this message
Joshua Lock (incandescant) wrote : Re: Playlists do not persist after closing

Good work!
Just to confirm, on my iBook:

./a.out atest.db
1
2

mono test.exe btest.db
0
0

Revision history for this message
Sebastian Dröge (slomo) wrote :

should be fixed with mono 1.1.13.6-0ubuntu3

Changed in mono:
status: Confirmed → Fix Released
Changed in mono:
status: Unknown → Rejected
Changed in mono:
status: Invalid → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.