Amarok fails to start when SQLite database is "corrupted"

Bug #149936 reported by elyon225
24
Affects Status Importance Assigned to Milestone
amarok (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: amarok

Amarok fails to start and issues no errors messages (either in the konsole or in /var/logs/ or /var/crash/)..

At times when running amarok from the terminal, it will issue:

[Loading] Amarok is taking a long time to load. Perhaps something has gone wrong?

This message does not appear every time, however.

Revision history for this message
elyon225 (elyon225-public) wrote :

After killing all amarok-related processes and running amarok in the konsole again, here is the output I receive:

Amarok: [Loader] Starting amarokapp..
Amarok: [Loader] Don't run gdb, valgrind, etc. against this binary! Use amarokapp.
Amarok: [Loader] Amarok is taking a long time to load! Perhaps something has gone wrong?

Revision history for this message
Scott Kitterman (kitterman) wrote :

That's the normal cli startup warnings for amarok. Looks like the process is hanging early in the startup phase.

Revision history for this message
Luke Schlather (luke2760) wrote :

I downloaded and installed the release candidate, and got the same thing, first in fluxbox, then logging out and back in to gnome/compiz.

Revision history for this message
subtrnl (emailchase) wrote :

I have the same problem. Upgraded to 7.10 Gutsy from 7.04 via the Adept Manager.
Problem happens with or without compiz running.

Attempted a apt-get --purge remove amarok and then re-install it to no avail.

Revision history for this message
Luke Schlather (luke2760) wrote :

Mine was just me. Did an
$ rm -R ~/.kde
and that dealt with it.

Revision history for this message
santosh vattam (vattam-santosh) wrote :

I did what luke2760 wrote in the previous message but still it didnt work.
This is the output i got when i started amarok after doing " rm -R ~/.kde":

vattam@vattam-desktop:~$ amarok
Amarok: [Loader] Starting amarokapp..
Amarok: [Loader] Don't run gdb, valgrind, etc. against this binary! Use amarokapp.
kbuildsycoca running...
Reusing existing ksycoca
DCOP Cleaning up dead connections.
kdecore (KAction): WARNING: KAction::insertKAccel( kaccel = 0x8130618 ): KAccel object already contains an action name "play_pause"
QLayout "unnamed" added to QVBox "unnamed", which already has a layout
kdecore (KAction): WARNING: KAction::insertKAccel( kaccel = 0x8130618 ): KAccel object already contains an action name "play_pause"
QLayout: Adding KToolBar/mainToolBar (child of QVBox/unnamed) to layout for PlaylistWindow/PlaylistWindow
QObject::connect: Incompatible sender/receiver arguments
        StarManager::ratingsColorsChanged() --> ContextBrowser::ratingOrScoreOrLabelsChanged(const QString&)
Amarok: [Loader] Amarok is taking a long time to load! Perhaps something has gone wrong?

vattam@vattam-desktop:~$ kio (KIOConnection): ERROR: Header read failed, errno=104
kio (KIOConnection): ERROR: Header has invalid size (-1)
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 7
  Minor opcode: 0
  Resource id: 0x360009a
kio (KIOConnection): ERROR: Header read failed, errno=104
kio (KIOConnection): ERROR: Header has invalid size (-1)
kio (KIOConnection): ERROR: Header read failed, errno=104
kio (KIOConnection): ERROR: Header has invalid size (-1)
kio (KIOConnection): ERROR: Header read failed, errno=104
kio (KIOConnection): ERROR: Header has invalid size (-1)
kio (KIOConnection): ERROR: Header read failed, errno=104
kio (KIOConnection): ERROR: Header has invalid size (-1)

Revision history for this message
Egbert van der Wal (eggie) wrote :

I have the exact same problem on the laptop I just installed Gutsy on... Any fix available?

Revision history for this message
Egbert van der Wal (eggie) wrote :

I don't know if it helps anyone else, but I got it fixed by installing xine-ui. Don't know how and why it's related but it works so I'm happy!

Revision history for this message
santosh vattam (vattam-santosh) wrote : Re: [Bug 149936] Re: Amarok will not start in Kubuntu Gutsy

I couldnt bear it anymore.. So i shifted back to feisty.

Revision history for this message
Evgeny Remizov (ram3ai) wrote : Re: Amarok will not start in Kubuntu Gutsy

For me neither of the methods above worked.
The only output is
Amarok: [Loader] Starting amarokapp..
Amarok: [Loader] Don't run gdb, valgrind, etc. against this binary! Use amarokapp.
Amarok: [Loader] Amarok is taking a long time to load! Perhaps something has gone wrong?

I could try to debug this if someone shows me how.

Revision history for this message
Jithin Emmanuel (jithin1987) wrote :
Download full text (11.9 KiB)

I have this problem when i ran amarok with strace This is what i got before i killed it

.........................................................................
waitpid(6028, 0xbfcbf430, WNOHANG) = 0
ioctl(7, FIONREAD, [0]) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 191369}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 9872}) = 0 (Timeout)
gettimeofday({1202820419, 200940}, NULL) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 201263}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 0}) = 0 (Timeout)
gettimeofday({1202820419, 201589}, NULL) = 0
waitpid(6028, 0xbfcbf430, WNOHANG) = 0
ioctl(7, FIONREAD, [0]) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 202193}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 9048}) = 0 (Timeout)
gettimeofday({1202820419, 249667}, NULL) = 0
waitpid(6028, 0xbfcbf430, WNOHANG) = 0
ioctl(7, FIONREAD, [0]) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 250423}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 9244}) = 0 (Timeout)
gettimeofday({1202820419, 275255}, NULL) = 0
waitpid(6028, 0xbfcbf430, WNOHANG) = 0
ioctl(7, FIONREAD, [0]) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 275387}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 9868}) = 0 (Timeout)
gettimeofday({1202820419, 284882}, NULL) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 285195}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 60}) = 0 (Timeout)
gettimeofday({1202820419, 288838}, NULL) = 0
waitpid(6028, 0xbfcbf430, WNOHANG) = 0
ioctl(7, FIONREAD, [0]) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 289533}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 5722}) = 0 (Timeout)
gettimeofday({1202820419, 297166}, NULL) = 0
waitpid(6028, 0xbfcbf430, WNOHANG) = 0
ioctl(7, FIONREAD, [0]) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 298383}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 6872}) = 0 (Timeout)
gettimeofday({1202820419, 304849}, NULL) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 305161}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 94}) = 0 (Timeout)
gettimeofday({1202820419, 308841}, NULL) = 0
waitpid(6028, 0xbfcbf430, WNOHANG) = 0
ioctl(7, FIONREAD, [0]) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 309524}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 5731}) = 0 (Timeout)
gettimeofday({1202820419, 349352}, NULL) = 0
waitpid(6028, 0xbfcbf430, WNOHANG) = 0
ioctl(7, FIONREAD, [0]) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 349480}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, 9872}) = 0 (Timeout)
gettimeofday({1202820419, 375300}, NULL) = 0
waitpid(6028, 0xbfcbf430, WNOHANG) = 0
ioctl(7, FIONREAD, [0]) = 0
ioctl(5, FIONREAD, [0]) = 0
gettimeofday({1202820419, 376051}, NULL) = 0
select(18, [5 6 7 16 17], [], [], {0, ...

Revision history for this message
tbrier (tbrier) wrote :

You might try this... it worked for me.

Check if you have sqlitebrowser installed-
$which sqlitebrowser

If not, install it.

Kill all instances of amarok or amarokapp-
<Ctrl>+<Esc>
Sort processes by name, select and kill if necessary.

Make a copy of your Amarok database-
$cp $HOME/.kde/share/apps/amarok/collection.db $HOME/.kde/share/apps/amarok/collection.db.bak

Open the database with sqlitebrowser-
$sqlitebrowser $HOME/.kde/share/apps/amarok/collection.db

Click the 'Browse Data' tab, and select the 'Devices' table from the table drop down dialog.

Select the last record by clicking the far left column, then press the ''Delete Record' button until the table is empty.

You may want to select 'Compact Database' from the File menu, but I don't think this is strictly necessary.

Select 'Save Database' from the file menu, then select 'Close Database'.

Amarok now should start normally with all data intact.

-T

Revision history for this message
Harald Sitter (apachelogger) wrote :

Is this report stil valid?

Changed in amarok:
status: New → Incomplete
Revision history for this message
Evgeny Remizov (ram3ai) wrote :

I had to remove amarok package and to rebuild it from source because of this bug.

Revision history for this message
shabbychef (shabbychef) wrote :

was running into problems like this with amarok. did 2 things:
1. as found on another post about amarok gone bad, ran
$ xine-check
this gave a few warnings. In particular, I had been trying to fix the amarok problem and had removed the libxine-dev package. bad. So I reinstalled the suggested packages until xine-check no longer griped too much.
2. I checked what groups I was in! I was only in the admin and [myusernameasagroup] groups. I added myself to the audio group
$ sudo /usr/sbin/usermod -G audio username
$ newgrp audio
$ amarok &
This worked like a charm. Note that I thought of this only b/c I've had some problems of late on my Gentoo box with upgrades to the pam packages and stuff. I am guessing that I did something similar, perhaps, on this kubuntu box.

Just a thought. Works for me.

Revision history for this message
shabbychef (shabbychef) wrote :

ACK! beware the usermod command as given above! ack! it should be,
$ sudo /usr/sbin/usermod -a -G audio username
the -a makes it an append operation. otherwise you will get bounced from whatever groups you had been in! like admin group for example (ouch!) sorry about that. If I could edit the previous post I would...

Revision history for this message
dockes (dockes) wrote :

SOLVED !
Sometimes, basic things are useful :)
In my case, the problem was related to the groups my username belongs to. I added the following groups and Amarok works like a charm:
adm, admin, audio, cdrom, dialout, dip, fax, floppy, fuse, lpadmin, netdev, plugdev, powerdev, scanner, tape, video.

Hope this would help.

Revision history for this message
Namain (namain) wrote :
Revision history for this message
Harald Sitter (apachelogger) wrote :

Since this issue is probably caused by not adding new users to the audio group it is invalid for Amarok.

Changed in amarok:
status: Incomplete → Invalid
Revision history for this message
Jithin Emmanuel (jithin1987) wrote :

Thats definitely not the reason. I was in audio groups. Now i am at hardy beta with kde 4 no problems now.

Revision history for this message
Evgeny Remizov (ram3ai) wrote :

I didn't change any group-related stuff, just recompiled from source. Also, my account is the first one on the system.
So this is not the reason for me as well.

Changed in amarok:
status: Invalid → Incomplete
Revision history for this message
Harald Sitter (apachelogger) wrote :

So apparently this was fixed upstream.

Changed in amarok:
status: Incomplete → Fix Released
Revision history for this message
Evgeny Remizov (ram3ai) wrote :

Just faced the same issue, now in current Hardy. https://bugs.launchpad.net/ubuntu/+source/amarok/+bug/149936/comments/12 helped.

Changed in amarok:
status: Fix Released → Confirmed
Revision history for this message
Evgeny Remizov (ram3ai) wrote :

Here are two collection files: .bak is "corrupted", and another one is a working copy after the Devices table has been purged

Revision history for this message
Tom Schutter (t-schutter) wrote :

Although tbreir's fix (https://bugs.launchpad.net/ubuntu/+source/amarok/+bug/149936/comments/12) worked for me at first, it later stopped working. I had to edit ~/.kde/share/config/amarokrc and remove the [MediaBrowser] section. After the edit, amarok will start without hanging.

This is on Hardy with version 2:1.4.9.1-0ubuntu3 of amarok.

This is what the [MediaBrowser] section looked like:

[MediaBrowser]
/org/freedesktop/Hal/devices/volume_uuid_194C_16D4=ignore
manual|iTouch WiFi|/media/itouch=ipod-mediadevice

And some following sections that may be relavant:

[MediaDevice_manual|iTouch WiFi|/media/itouch]
AutoDeletePodcasts=false
PostDisconnectCommand=ipod-touch-umount
PreConnectCommand=ipod-touch-mount
SyncStats=true
Transcode=false
TranscodeAlways=false
TranscodeRemove=false

[MediaDevice_manual|iTouch WiFi|/mnt/itouch]
AutoDeletePodcasts=false
PostDisconnectCommand=ipod-touch-umount
PreConnectCommand=ipod-touch-mount
SyncStats=true
Transcode=false
TranscodeAlways=false
TranscodeRemove=false

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

This bug is quite likely not a problem with Amarok 2, most of which has been completely rewritten. As such I am closing this bug as fixed. Amarok 2 packages can be found for both Intrepid (See kubuntu.org) as well as for Jaunty, where it will become the default music player for Kubuntu 9.04.

Changed in amarok:
status: Confirmed → Fix Released
Revision history for this message
Evgeny Remizov (ram3ai) wrote :

So you are going to close all bugs related to 1.4 series which the majority of people use (and some will use if they stay, say, on Hardy as LTS release), just because 2.0 is out and you are not even sure whether this bug exists in 2.0 or not? That's really weird.
I understand that the probability of fixing this bug is pretty low, but still it is a bug and it is most probably not fixed.

Revision history for this message
Lydia Pintscher (lydia-pintscher) wrote :

We (as in I and the rest of the Amarok team) no longer work on Amarok 1. We (as in I and the rest of the Kubuntu team) do not have the resources to fix this.
As Amarok 2 will be the only one available in Jaunty there is really no need to keep this open. The probability of this getting fixed is not pretty low it is exactly zero. Sorry :( I hope you will like Amarok 2 when you get to try it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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