Bug 164116

Summary: Amarok2 doesn't update mp3 tags in its db when editing + crash
Product: [Applications] amarok Reporter: Mikko C. <mikko.cal>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: crash CC: maximilian.kossick
Priority: NOR    
Version: 2.0-SVN   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mikko C. 2008-06-15 09:17:56 UTC
Version:           2.0-SVN (using 4.00.82 (KDE 4.0.82 >= 20080610), Gentoo)
Compiler:          x86_64-pc-linux-gnu-gcc
OS:                Linux (x86_64) release 2.6.26-rc6

In Amarok 2 SVN:
-Right click on a file/album in the Collection browser (doesn't work in the playlist)
-Edit Track Information
-Edit something
-Save & Close

Amarok's tags are NOT updated but the file is.
If you try editing the file again, you will get a crash (see below).
If you close Amarok and re-open it, the new tags will be read correctly.



======== DEBUG INFORMATION  =======
Version:    2.0-SVN                
Build date: Jun 15 2008            
CC version: 4.3.1                  
KDElibs:    4.00.82 (KDE 4.0.82 >= 20080610)
Qt:         4.4.0                           
TagLib:     1.5.0                           
CPU cores:  2                               

==== file `which amarok` =======
/usr/kde/svn/bin/amarok: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), stripped                                                                                                        


==== (gdb) bt =====================
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]            
[New Thread 0x7fa6d084b700 (LWP 19272)]                  
[New Thread 0x4098c950 (LWP 19292)]                      
[New Thread 0x4729b950 (LWP 19290)]                      
[New Thread 0x46a9a950 (LWP 19288)]                      
[New Thread 0x46299950 (LWP 19287)]                      
[New Thread 0x45a98950 (LWP 19286)]                      
[New Thread 0x45297950 (LWP 19285)]                      
[New Thread 0x44a96950 (LWP 19284)]                      
[New Thread 0x44295950 (LWP 19283)]                      
[New Thread 0x43293950 (LWP 19282)]                      
[New Thread 0x43a94950 (LWP 19281)]                      
[New Thread 0x42a92950 (LWP 19278)]                      
[New Thread 0x42291950 (LWP 19277)]                      
[New Thread 0x41a90950 (LWP 19276)]                      
[New Thread 0x4128f950 (LWP 19273)]                      
0x00007fa6d0026f5f in waitpid () from /lib64/libpthread.so.0
#0  0x00007fa6d0026f5f in waitpid () from /lib64/libpthread.so.0
#1  0x00007fa6cead2a75 in Amarok::Crash::crashHandler ()        
    at /var/tmp/paludis/media-sound-amarok-scm/work/amarok/amarok/src/CrashHandler.cpp:254
#2  <signal handler called>                                                               
#3  0x00007fa6ceaf28e0 in ~TagDialog (this=0x3195c50)                                     
    at /var/tmp/paludis/media-sound-amarok-scm/work/amarok/amarok/src/dialogs/TagDialog.cpp:133
#4  0x00007fa6d03968dd in QObject::event (this=0x3195c50, e=0x7fa6c46bb278) at kernel/qobject.cpp:1115
#5  0x00007fa6c6f18f66 in QWidget::event (this=0x4035000000000000, event=0x2d39ad0) at kernel/qwidget.cpp:7310
#6  0x00007fa6c6ec192d in QApplicationPrivate::notify_helper (this=0x1f60ba0, receiver=0x3195c50, e=0x2d39ad0)
    at kernel/qapplication.cpp:3772                                                                           
#7  0x00007fa6c6ec88fe in QApplication::notify (this=0x7fffd888b2a0, receiver=0x3195c50, e=0x2d39ad0)         
    at kernel/qapplication.cpp:3739                                                                           
#8  0x00007fa6ce07738e in KApplication::notify (this=0x7fffd888b2a0, receiver=0x3195c50, event=0x2d39ad0)     
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/kdeui/kernel/kapplication.cpp:311               
#9  0x00007fa6d03865b0 in QCoreApplication::notifyInternal (this=0x7fffd888b2a0, receiver=0x3195c50, event=0x2d39ad0)
    at kernel/qcoreapplication.cpp:587                                                                               
#10 0x00007fa6d03874db in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1f35780)     
    at kernel/qcoreapplication.h:215                                                                                 
#11 0x00007fa6c6f56c64 in QEventDispatcherX11::processEvents (this=0x1f52be0, flags={i = -662130208})                
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220                                          
#12 0x00007fa6d0385162 in QEventLoop::processEvents (this=<value optimized out>, flags={i = -662130160})             
    at kernel/qeventloop.cpp:149                                                                                     
#13 0x00007fa6d03852ed in QEventLoop::exec (this=0x7fffd888b250, flags={i = -662130080}) at kernel/qeventloop.cpp:200
#14 0x00007fa6d03877ed in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845                               
#15 0x0000000000402e69 in main (argc=1, argv=0x7fffd888c128)                                                         
    at /var/tmp/paludis/media-sound-amarok-scm/work/amarok/amarok/src/main.cpp:125                                   
#16 0x00007fa6c45c81f4 in __libc_start_main () from /lib64/libc.so.6                                                 
#17 0x0000000000401209 in _start ()                                                                                  
==== (gdb) thread apply all bt ====                                                                                  
Thread 15 (Thread 0x4128f950 (LWP 19273)):                                                                           
#0  0x00007fa6d0023b8d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                         
#1  0x00007fa6c0059a8e in metronom_sync_loop () from /usr/lib/libxine.so.1                                           
#2  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                
#3  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                             
#4  0x0000000000000000 in ?? ()                                                                                      
Thread 14 (Thread 0x41a90950 (LWP 19276)):                                                                           
#0  0x00007fa6c4667a66 in poll () from /lib64/libc.so.6                                                              
#1  0x00007fa6bbd62888 in ao_alsa_handle_event_thread () from /usr/lib64/xine/plugins/1.21/xineplug_ao_out_alsa.so   
#2  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                
#3  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                             
#4  0x0000000000000000 in ?? ()                                                                                      
Thread 13 (Thread 0x42291950 (LWP 19277)):                                                                           
#0  0x00007fa6c4667a66 in poll () from /lib64/libc.so.6                                                              
#1  0x00007fa6c2a60d32 in snd1_pcm_wait_nocheck () from /usr/lib/libasound.so.2                                      
#2  0x00007fa6bbd631a9 in ao_alsa_write () from /usr/lib64/xine/plugins/1.21/xineplug_ao_out_alsa.so                 
#3  0x00007fa6c0068e10 in ao_loop () from /usr/lib/libxine.so.1                                                      
#4  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                
#5  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                             
#6  0x0000000000000000 in ?? ()                                                                                      
Thread 12 (Thread 0x42a92950 (LWP 19278)):                                                                           
#0  0x00007fa6c46698f2 in select () from /lib64/libc.so.6                                                            
#1  0x00007fa6d03b1a52 in QEventDispatcherUNIX::select (this=<value optimized out>, nfds=20, readfds=0x217d690,      
    writefds=0x217d928, exceptfds=0x217dbc0, timeout=0x42a91fa0) at kernel/qeventdispatcher_unix.cpp:601             
#2  0x00007fa6d03b2775 in QEventDispatcherUNIXPrivate::doSelect (this=0x217d4e0, flags={i = 1118379952}, timeout=0x42a91fa0)
    at kernel/qeventdispatcher_unix.cpp:172                                                                                 
#3  0x00007fa6d03b36ed in QEventDispatcherUNIX::processEvents (this=0x214e5a0, flags={i = 1118380016})                      
    at kernel/qeventdispatcher_unix.cpp:895                                                                                 
#4  0x00007fa6d0385162 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 1118380064})                    
    at kernel/qeventloop.cpp:149                                                                                            
#5  0x00007fa6d03852ed in QEventLoop::exec (this=0x42a92060, flags={i = 1118380144}) at kernel/qeventloop.cpp:200           
#6  0x00007fa6d028fad8 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:433                              
#7  0x00007fa6c02aeaef in Phonon::Xine::XineThread::run (this=0x2177f60)                                                    
    at /var/tmp/paludis/kde-base-phonon-xine-scm/work/phonon-xine/phonon/xine/xinethread.cpp:111                            
#8  0x00007fa6d0292b55 in QThreadPrivate::start (arg=0x2177f60) at thread/qthread_unix.cpp:190                              
#9  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#10 0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#11 0x0000000000000000 in ?? ()                                                                                             
Thread 11 (Thread 0x43a94950 (LWP 19281)):                                                                                  
#0  0x00007fa6c46698f2 in select () from /lib64/libc.so.6                                                                   
#1  0x00007fa6c007eb84 in xine_usec_sleep () from /usr/lib/libxine.so.1                                                     
#2  0x00007fa6c0065e64 in video_out_loop () from /usr/lib/libxine.so.1                                                      
#3  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#4  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#5  0x0000000000000000 in ?? ()                                                                                             
Thread 10 (Thread 0x43293950 (LWP 19282)):                                                                                  
#0  0x00007fa6d0023909 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                                     
#1  0x00007fa6c005ccdb in fifo_buffer_get () from /usr/lib/libxine.so.1                                                     
#2  0x00007fa6c00623df in video_decoder_loop () from /usr/lib/libxine.so.1                                                  
#3  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#4  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#5  0x0000000000000000 in ?? ()                                                                                             
Thread 9 (Thread 0x44295950 (LWP 19283)):                                                                                   
#0  0x00007fa6d0023b8d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                                
#1  0x00007fa6c0067836 in fifo_peek_int () from /usr/lib/libxine.so.1                                                       
#2  0x00007fa6c0067856 in fifo_remove_int () from /usr/lib/libxine.so.1                                                     
#3  0x00007fa6c006970d in ao_get_buffer () from /usr/lib/libxine.so.1                                                       
#4  0x00007fa6b2e3e07b in mad_decode_data () from /usr/lib64/xine/plugins/1.21/xineplug_decode_mad.so                       
#5  0x00007fa6c0063b34 in audio_decoder_loop () from /usr/lib/libxine.so.1                                                  
#6  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#7  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#8  0x0000000000000000 in ?? ()                                                                                             
Thread 8 (Thread 0x44a96950 (LWP 19284)):                                                                                   
#0  0x00007fa6d0023909 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                                     
#1  0x00007fa6c006b8ab in xine_event_wait () from /usr/lib/libxine.so.1                                                     
#2  0x00007fa6c006b91e in listener_loop () from /usr/lib/libxine.so.1                                                       
#3  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#4  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#5  0x0000000000000000 in ?? ()                                                                                             
Thread 7 (Thread 0x45297950 (LWP 19285)):                                                                                   
#0  0x00007fa6d0023909 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                                     
#1  0x00007fa6d0293e35 in QWaitCondition::wait (this=0x2745630, mutex=0x2745628, time=18446744073709551615)                 
    at thread/qwaitcondition_unix.cpp:88                                                                                    
#2  0x00007fa6cfd87bfc in QHostInfoAgent::run (this=0x2745610) at kernel/qhostinfo.cpp:247                                  
#3  0x00007fa6d0292b55 in QThreadPrivate::start (arg=0x2745610) at thread/qthread_unix.cpp:190                              
#4  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#5  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#6  0x0000000000000000 in ?? ()                                                                                             
Thread 6 (Thread 0x45a98950 (LWP 19286)):                                                                                   
#0  0x00007fa6d0023909 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                                     
#1  0x00007fa6d0293e35 in QWaitCondition::wait (this=0x274a268, mutex=0x27263c0, time=18446744073709551615)                 
    at thread/qwaitcondition_unix.cpp:88                                                                                    
#2  0x00007fa6c6b1e894 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=<value optimized out>,       
    th=0x26b1590) at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/WeaverImpl.cpp:365          
#3  0x00007fa6c6b22308 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2724c20, th=0x26b1590)                       
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/WorkingHardState.cpp:71                   
#4  0x00007fa6c6b20ae9 in ThreadWeaver::ThreadRunHelper::run (this=0x45a980d0, parent=0x274a240, th=0x26b1590)              
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/Thread.cpp:87                             
#5  0x00007fa6c6b20bde in ThreadWeaver::Thread::run (this=0x26b1590)                                                        
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/Thread.cpp:142                            
#6  0x00007fa6d0292b55 in QThreadPrivate::start (arg=0x26b1590) at thread/qthread_unix.cpp:190                              
#7  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#8  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#9  0x0000000000000000 in ?? ()                                                                                             
Thread 5 (Thread 0x46299950 (LWP 19287)):                                                                                   
#0  0x00007fa6d0023909 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                                     
#1  0x00007fa6d0293e35 in QWaitCondition::wait (this=0x274a268, mutex=0x27263c0, time=18446744073709551615)                 
    at thread/qwaitcondition_unix.cpp:88                                                                                    
#2  0x00007fa6c6b1e894 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=<value optimized out>,       
    th=0x2624fc0) at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/WeaverImpl.cpp:365          
#3  0x00007fa6c6b22308 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2724c20, th=0x2624fc0)                       
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/WorkingHardState.cpp:71                   
#4  0x00007fa6c6b20ae9 in ThreadWeaver::ThreadRunHelper::run (this=0x462990d0, parent=0x274a240, th=0x2624fc0)              
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/Thread.cpp:87                             
#5  0x00007fa6c6b20bde in ThreadWeaver::Thread::run (this=0x2624fc0)                                                        
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/Thread.cpp:142                            
#6  0x00007fa6d0292b55 in QThreadPrivate::start (arg=0x2624fc0) at thread/qthread_unix.cpp:190                              
#7  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#8  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#9  0x0000000000000000 in ?? ()                                                                                             
Thread 4 (Thread 0x46a9a950 (LWP 19288)):                                                                                   
#0  0x00007fa6d0023909 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                                     
#1  0x00007fa6c005cbf3 in buffer_pool_alloc () from /usr/lib/libxine.so.1                                                   
#2  0x00007fa6b5180a57 in demux_mpgaudio_next () from /usr/lib64/xine/plugins/1.21/xineplug_dmx_audio.so                    
#3  0x00007fa6b518134d in demux_mpgaudio_send_chunk () from /usr/lib64/xine/plugins/1.21/xineplug_dmx_audio.so              
#4  0x00007fa6c0070479 in demux_loop () from /usr/lib/libxine.so.1                                                          
#5  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#6  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#7  0x0000000000000000 in ?? ()                                                                                             
Thread 3 (Thread 0x4729b950 (LWP 19290)):                                                                                   
#0  0x00007fa6d0023909 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                                     
#1  0x00007fa6d0293e35 in QWaitCondition::wait (this=0x274a268, mutex=0x27263c0, time=18446744073709551615)                 
    at thread/qwaitcondition_unix.cpp:88                                                                                    
#2  0x00007fa6c6b1e894 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=<value optimized out>,       
    th=0x2e9ef20) at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/WeaverImpl.cpp:365          
#3  0x00007fa6c6b22308 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2724c20, th=0x2e9ef20)                       
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/WorkingHardState.cpp:71                   
#4  0x00007fa6c6b20ae9 in ThreadWeaver::ThreadRunHelper::run (this=0x4729b0d0, parent=0x274a240, th=0x2e9ef20)              
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/Thread.cpp:87                             
#5  0x00007fa6c6b20bde in ThreadWeaver::Thread::run (this=0x2e9ef20)                                                        
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/Thread.cpp:142                            
#6  0x00007fa6d0292b55 in QThreadPrivate::start (arg=0x2e9ef20) at thread/qthread_unix.cpp:190                              
#7  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#8  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#9  0x0000000000000000 in ?? ()                                                                                             
Thread 2 (Thread 0x4098c950 (LWP 19292)):                                                                                   
#0  0x00007fa6d0023909 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                                     
#1  0x00007fa6d0293e35 in QWaitCondition::wait (this=0x274a268, mutex=0x27263c0, time=18446744073709551615)                 
    at thread/qwaitcondition_unix.cpp:88                                                                                    
#2  0x00007fa6c6b1e894 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=<value optimized out>,       
    th=0x3127e30) at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/WeaverImpl.cpp:365          
#3  0x00007fa6c6b22308 in ThreadWeaver::WorkingHardState::applyForWork (this=0x2724c20, th=0x3127e30)                       
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/WorkingHardState.cpp:71                   
#4  0x00007fa6c6b20ae9 in ThreadWeaver::ThreadRunHelper::run (this=0x4098c0d0, parent=0x274a240, th=0x3127e30)              
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/Thread.cpp:87                             
#5  0x00007fa6c6b20bde in ThreadWeaver::Thread::run (this=0x3127e30)                                                        
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/threadweaver/Weaver/Thread.cpp:142                            
#6  0x00007fa6d0292b55 in QThreadPrivate::start (arg=0x3127e30) at thread/qthread_unix.cpp:190                              
#7  0x00007fa6d001f067 in start_thread () from /lib64/libpthread.so.0                                                       
#8  0x00007fa6c466fbdd in clone () from /lib64/libc.so.6                                                                    
#9  0x0000000000000000 in ?? ()                                                                                             
Thread 1 (Thread 0x7fa6d084b700 (LWP 19272)):                                                                               
#0  0x00007fa6d0026f5f in waitpid () from /lib64/libpthread.so.0                                                            
#1  0x00007fa6cead2a75 in Amarok::Crash::crashHandler ()                                                                    
    at /var/tmp/paludis/media-sound-amarok-scm/work/amarok/amarok/src/CrashHandler.cpp:254                                  
#2  <signal handler called>                                                                                                 
#3  0x00007fa6ceaf28e0 in ~TagDialog (this=0x3195c50)
    at /var/tmp/paludis/media-sound-amarok-scm/work/amarok/amarok/src/dialogs/TagDialog.cpp:133
#4  0x00007fa6d03968dd in QObject::event (this=0x3195c50, e=0x7fa6c46bb278) at kernel/qobject.cpp:1115
#5  0x00007fa6c6f18f66 in QWidget::event (this=0x4035000000000000, event=0x2d39ad0) at kernel/qwidget.cpp:7310
#6  0x00007fa6c6ec192d in QApplicationPrivate::notify_helper (this=0x1f60ba0, receiver=0x3195c50, e=0x2d39ad0)
    at kernel/qapplication.cpp:3772
#7  0x00007fa6c6ec88fe in QApplication::notify (this=0x7fffd888b2a0, receiver=0x3195c50, e=0x2d39ad0)
    at kernel/qapplication.cpp:3739
#8  0x00007fa6ce07738e in KApplication::notify (this=0x7fffd888b2a0, receiver=0x3195c50, event=0x2d39ad0)
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/kdeui/kernel/kapplication.cpp:311
#9  0x00007fa6d03865b0 in QCoreApplication::notifyInternal (this=0x7fffd888b2a0, receiver=0x3195c50, event=0x2d39ad0)
    at kernel/qcoreapplication.cpp:587
#10 0x00007fa6d03874db in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1f35780)
    at kernel/qcoreapplication.h:215
#11 0x00007fa6c6f56c64 in QEventDispatcherX11::processEvents (this=0x1f52be0, flags={i = -662130208})
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#12 0x00007fa6d0385162 in QEventLoop::processEvents (this=<value optimized out>, flags={i = -662130160})
    at kernel/qeventloop.cpp:149
#13 0x00007fa6d03852ed in QEventLoop::exec (this=0x7fffd888b250, flags={i = -662130080}) at kernel/qeventloop.cpp:200
#14 0x00007fa6d03877ed in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#15 0x0000000000402e69 in main (argc=1, argv=0x7fffd888c128)
    at /var/tmp/paludis/media-sound-amarok-scm/work/amarok/amarok/src/main.cpp:125
#16 0x00007fa6c45c81f4 in __libc_start_main () from /lib64/libc.so.6
#17 0x0000000000401209 in _start ()
#0  0x00007fa6d0026f5f in waitpid () from /lib64/libpthread.so.0
Comment 1 Mikko C. 2008-07-10 18:59:31 UTC
still happening with today's SVN
Comment 2 Alejandro Wainzinger 2008-07-11 09:42:42 UTC
Confirmed by me too.  For some reason the SqlCollection (Local Collection)'s TreeView isn't getting updated, and I think that when you try to edit again, the TagDialog starts to get constructed, looks for the unchanged tag still in the TreeView, fails to find it, calls the TagDialog destructor, and crashes on a double-delete.  Not sure of this yet though.

The important thing to note here is that the TreeView isn't being updated.  This is a bug by itself, and could be a cause of this bug.
Comment 3 Alejandro Wainzinger 2008-07-11 10:22:45 UTC
OK, I've temporarily stopped the double-delete which avoids the crash, but something is seriously wrong here, as the TreeView should be getting updated.  Will investigate further.
Comment 4 Dan Meltzer 2008-07-12 00:24:24 UTC
Not sure if this is an issue with sqlcollection not updating, or if its an issue with the view not updating, Do you know anything Max?
Comment 5 Maximilian Kossick 2008-07-12 08:27:04 UTC
We'd need some kind of 2PC here to make sure that the database and the file are in sync under all circumstances, which we won't implement. The actual reason for that crash was fixed a few days ago. The logic which updates the database on some changes is not quite correct, but that's another bug...
Comment 6 Mikko C. 2008-07-12 09:17:25 UTC
Yea, the crash is fixed, but the tags aren't updated correctly until Amarok is restarted.
Comment 7 Maximilian Kossick 2008-07-12 09:26:05 UTC
That is not quite correct. Some tags are correctly updated (e.g. try to change the track title), some are not, for example the album (well, they are updated, but not correctly)
Comment 8 Mikko C. 2008-07-12 09:30:53 UTC
You're right, editing the title works, but not more than once..
Ok, i won't bother you anymore since it seems you guys know where is the problem :)
thanks
Comment 9 Alejandro Wainzinger 2008-07-12 10:46:07 UTC
I'm able to edit a title more than once from both the collection view and the playlist.  The issue with editing Artist that I mentioned before is still present and the problem seems evident: the treeview isn't being updated.  Question is, how to inform the treeview to update itself on tagchange.
Comment 10 Maximilian Kossick 2008-07-12 17:15:46 UTC
tell the collection to emit the updated signal, or change the
collection browser filter. both will trigger a new query (the former
way is obviously the correct one). Unfortunately it looks like there's
still some logic missing to handle corner cases when changing track
attributes that require SqlCollection to update foreign keys.


On Sat, Jul 12, 2008 at 10:46 AM, Alejandro Wainzinger
<aikawarazuni@gmail.com> wrote:
[bugs.kde.org quoted mail]
Comment 11 Alejandro Wainzinger 2008-07-15 17:58:15 UTC
For IpodTrack, after editing many tracks using TagDialog, if you use the updated signal at the end of the metadata update, it creates a race condition with the next tracks to be updated, such that TreeItemModel's update method gets called an arbitrarily large amount of times, so this solution does not seem to work, or I am implementing it wrong.

I see that Playlist::Model is making use of observers to deal with this problem, and I think that TreeItemModel could do the same, but I'm not familiar enough with the code to implement it.

A temporary hackish fix could be to have the TagDialog emit the collection whose tracks are being edited's updated signal, but this is far from optimal I think.
Comment 12 Alejandro Wainzinger 2008-07-15 20:11:17 UTC
I just did that "hackish" fix but by means of a new UpdateCapability.  Basically, whenever editing data gets done, the collections implementing this update themselves.  I'm going to see if I can fix the update to preserve the state of collapsed/restored and where in scrolling the user was before the update, but no promises.  See SVN commit 832869 for details.
Comment 13 Mikko C. 2008-07-17 09:56:14 UTC
Is it just me, or now Amarok does update tags in its database correctly, but doesn't actually change the file's tag? Is this wanted?
Comment 14 Alejandro Wainzinger 2008-07-17 10:12:15 UTC
I hadn't noticed that.  Well, the Sql stuff needs some good looking
into, but I'll leave that to the Sql Foo black belts =)

On Thu, Jul 17, 2008 at 12:56 AM, Mikko C. <mikko.cal@gmail.com> wrote:
[bugs.kde.org quoted mail]