Migrate to Smart Playlists; System.NullReferenceException

Bug #330281 reported by Daniël van Eeden
6
Affects Status Importance Assigned to Milestone
banshee (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: banshee

Ubuntu 8.10, Banshee 1.2.1-3ubuntu1

To reproduce:
1. Start banshee from a terminal window
2. Close banshee

$ banshee
[Info 22:30:30.775] Running Banshee 1.2.1
[Error 22:30:32.385] Unable to Migrate Smart Playlists - Please file a bug with this error: System.NullReferenceException: Object reference not set to an instance of an object
  at Banshee.SmartPlaylist.Migrator.ParseCondition (System.String value) [0x00000]
  at Banshee.SmartPlaylist.Migrator.Migrate (Int32 dbid, System.String Name, System.String Condition, System.String OrderBy, System.String LimitNumber, System.String LimitCriterion) [0x00000]
  at Banshee.SmartPlaylist.Migrator.MigrateAll () [0x00000]
[Info 22:30:32.675] All services are started 1.706839s
[Info 22:30:34.283] nereid Client Started
[Warn 22:30:43.482] Caught an exception - Invalid arguments (in `System')
  at System.Net.Sockets.Socket.Accept () [0x00000]
  at Banshee.Daap.DaapProxyWebServer.ServerLoop () [0x00000]

Revision history for this message
Andrew Conkling (andrewski) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 330278 (another one you reported, actually, looks like the same cause), so it is being marked as such. Any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

Revision history for this message
Daniël van Eeden (dveeden) wrote :

I've upgraded to the Intrepid PPA version. (from 1.2.1-3ubuntu1 to1.4.2-1~intrepid1)

Problem 1 (LP #330278):
  Fixed. Disconnecting a N73 in "Media Player" mode no longer crashes Banshee
  Please backport this fix to Ubuntu 8.10 (and other impacted releases which are still in supported state)

Problem 2 (LP #330281):
  Smart Playlist System.NullReferenceException still exists.

LP #330281 is marked as a duplicate of LP #330278 which it isn't.

Revision history for this message
Daniël van Eeden (dveeden) wrote :

Reproduced with 1.4.2-1~intrepid1:
$ banshee
[Info 09:09:00.176] Running Banshee 1.4.2: [Ubuntu 8.10 (linux-gnu, i486) @ 2009-01-22 07:54:13 UTC]
[Error 09:09:01.750] Unable to Migrate Smart Playlists - Please file a bug with this error: System.NullReferenceException: Object reference not set to an instance of an object
  at Banshee.SmartPlaylist.Migrator.ParseCondition (System.String value) [0x00000]
  at Banshee.SmartPlaylist.Migrator.Migrate (Int32 dbid, System.String Name, System.String Condition, System.String OrderBy, System.String LimitNumber, System.String LimitCriterion) [0x00000]
  at Banshee.SmartPlaylist.Migrator.MigrateAll () [0x00000]
[Info 09:09:02.168] All services are started 1.781299s
[Info 09:09:03.835] nereid Client Started

Revision history for this message
Andrew Conkling (andrewski) wrote :

Can you attach the output of `banshee-1 --debug` and `banshee-1 --debug-sql` (separately)? I'm going to push this bug upstream so the developers know about it, but those details would be very helpful. Thanks!

Changed in banshee:
status: New → Incomplete
Revision history for this message
Daniël van Eeden (dveeden) wrote :
Revision history for this message
Daniël van Eeden (dveeden) wrote :
Revision history for this message
Daniël van Eeden (dveeden) wrote :

This is where the error occurs:

[Debug 22:32:37.577] Executed in 0ms BEGIN
[Debug 22:32:37.580] Executed in 0ms SELECT SmartPlaylistID, Name, Condition, OrderBy, LimitNumber, LimitCriterion FROM CoreSmartPlaylists
[Debug 22:32:37.609] Executed in 0ms
                UPDATE CoreSmartPlaylists
                    SET Name = 'Unheard',
                        Condition = '<request><query banshee-version="1"><equals><field name="playcount" /><int>0</int></equals></query></request>',
                        OrderBy = NULL,
                        LimitNumber = NULL,
                        LimitCriterion = 'songs'
                    WHERE SmartPlaylistID = 1
[Debug 22:32:37.610] Migrated Smart Playlist Unheard
[Debug 22:32:37.611] Executed in 0ms
                UPDATE CoreSmartPlaylists
                    SET Name = 'High Rating',
                        Condition = '<request><query banshee-version="1"><greaterThan><field name="rating" /><int>3</int></greaterThan></query></request>',
                        OrderBy = NULL,
                        LimitNumber = NULL,
                        LimitCriterion = 'songs'
                    WHERE SmartPlaylistID = 2
[Debug 22:32:37.611] Migrated Smart Playlist High Rating
[Debug 22:32:37.618] Executed in 1ms ROLLBACK
[Error 22:32:37.621] Unable to Migrate Smart Playlists - Please file a bug with this error: System.NullReferenceException: Object reference not set to an instance of an object
  at Banshee.SmartPlaylist.Migrator.ParseCondition (System.String value) [0x00000]
  at Banshee.SmartPlaylist.Migrator.Migrate (Int32 dbid, System.String Name, System.String Condition, System.String OrderBy, System.String LimitNumber, System.String LimitCriterion) [0x00000]
  at Banshee.SmartPlaylist.Migrator.MigrateAll () [0x00000]

Revision history for this message
Daniël van Eeden (dveeden) wrote :

A dump from the table which is having the issues:

$ sqlite3 .config/banshee-1/banshee.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> .dump CoreSmartPlaylists
BEGIN TRANSACTION;
CREATE TABLE CoreSmartPlaylists (
                    PrimarySourceID INTEGER,
                    SmartPlaylistID INTEGER PRIMARY KEY,
                    Name TEXT NOT NULL,
                    Condition TEXT,
                    OrderBy TEXT,
                    LimitNumber TEXT,
                    LimitCriterion TEXT,
                    CachedCount INTEGER
                , IsTemporary INTEGER DEFAULT 0);
INSERT INTO "CoreSmartPlaylists" VALUES(1,1,'Unheard',' (NumberOfPlays = 0) ',NULL,NULL,NULL,6729,0);
INSERT INTO "CoreSmartPlaylists" VALUES(1,2,'High Rating',' (Rating > 3) ',NULL,NULL,NULL,6729,0);
INSERT INTO "CoreSmartPlaylists" VALUES(1,3,'Songs from the 90''s',' (Year BETWEEN 1990 AND 1999) AND (lower(Title) LIKE ''%%'') AND (lower(AlbumTitle) LIKE ''%%'') AND (lower(Genre) LIKE ''%%'') ',NULL,NULL,NULL,6729,0);
INSERT INTO "CoreSmartPlaylists" VALUES(1,4,'Songs from the 80''s',' (Year BETWEEN 1980 AND 1989) ',NULL,NULL,NULL,6729,0);
INSERT INTO "CoreSmartPlaylists" VALUES(3,5,'Favorites','<request><query banshee-version="1"><greaterThanEquals><field name="rating" /><int>4</int></greaterThanEquals></query></request>',NULL,NULL,NULL,0,0);
INSERT INTO "CoreSmartPlaylists" VALUES(3,6,'Unwatched','<request><query banshee-version="1"><equals><field name="playcount" /><int>0</int></equals></query></request>',NULL,NULL,NULL,1,0);
COMMIT;
sqlite> .quit

Revision history for this message
Daniël van Eeden (dveeden) wrote :

A Replay of the SQL statements:

$ sqlite3 .config/banshee-1/banshee.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> BEGIN;
sqlite> SELECT SmartPlaylistID, Name, Condition, OrderBy, LimitNumber, LimitCriterion FROM CoreSmartPlaylists;
1|Unheard| (NumberOfPlays = 0) |||
2|High Rating| (Rating > 3) |||
3|Songs from the 90's| (Year BETWEEN 1990 AND 1999) AND (lower(Title) LIKE '%%') AND (lower(AlbumTitle) LIKE '%%') AND (lower(Genre) LIKE '%%') |||
4|Songs from the 80's| (Year BETWEEN 1980 AND 1989) |||
5|Favorites|<request><query banshee-version="1"><greaterThanEquals><field name="rating" /><int>4</int></greaterThanEquals></query></request>|||
6|Unwatched|<request><query banshee-version="1"><equals><field name="playcount" /><int>0</int></equals></query></request>|||
sqlite> UPDATE CoreSmartPlaylists
   ...> SET Name = 'Unheard',
   ...> Condition = '<request><query banshee-version="1"><equals><field
   ...> name="playcount" /><int>0</int></equals></query></request>',
   ...> OrderBy = NULL,
   ...> LimitNumber = NULL,
   ...> LimitCriterion = 'songs'
   ...> WHERE SmartPlaylistID = 1;
sqlite> UPDATE CoreSmartPlaylists
   ...> SET Name = 'High Rating',
   ...> Condition = '<request><query banshee-version="1"><greaterThan><field name="rating" /><int>3</int></greaterThan></query></request>',
   ...> OrderBy = NULL,
   ...> LimitNumber = NULL,
   ...> LimitCriterion = 'songs'
   ...> WHERE SmartPlaylistID = 2;
sqlite> SELECT * FROM CoreSmartPlaylists;
1|1|Unheard|<request><query banshee-version="1"><equals><field
name="playcount" /><int>0</int></equals></query></request>|||songs|6729|0
1|2|High Rating|<request><query banshee-version="1"><greaterThan><field name="rating" /><int>3</int></greaterThan></query></request>|||songs|6729|0
1|3|Songs from the 90's| (Year BETWEEN 1990 AND 1999) AND (lower(Title) LIKE '%%') AND (lower(AlbumTitle) LIKE '%%') AND (lower(Genre) LIKE '%%') ||||6729|0
1|4|Songs from the 80's| (Year BETWEEN 1980 AND 1989) ||||6729|0
3|5|Favorites|<request><query banshee-version="1"><greaterThanEquals><field name="rating" /><int>4</int></greaterThanEquals></query></request>||||0|0
3|6|Unwatched|<request><query banshee-version="1"><equals><field name="playcount" /><int>0</int></equals></query></request>||||1|0
sqlite> ROLLBACK;
sqlite> SELECT * FROM CoreSmartPlaylists;
1|1|Unheard| (NumberOfPlays = 0) ||||6729|0
1|2|High Rating| (Rating > 3) ||||6729|0
1|3|Songs from the 90's| (Year BETWEEN 1990 AND 1999) AND (lower(Title) LIKE '%%') AND (lower(AlbumTitle) LIKE '%%') AND (lower(Genre) LIKE '%%') ||||6729|0
1|4|Songs from the 80's| (Year BETWEEN 1980 AND 1989) ||||6729|0
3|5|Favorites|<request><query banshee-version="1"><greaterThanEquals><field name="rating" /><int>4</int></greaterThanEquals></query></request>||||0|0
3|6|Unwatched|<request><query banshee-version="1"><equals><field name="playcount" /><int>0</int></equals></query></request>||||1|0

Revision history for this message
Pedro Villavicencio (pedro) wrote :

could you please test the same with the banshee version from the ppa? https://launchpad.net/~banshee-unstable-team/+archive

Changed in banshee (Ubuntu):
importance: Undecided → Low
Revision history for this message
Monkey (monkey-libre) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in banshee (Ubuntu):
status: Incomplete → Invalid
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.