Bug 49947 - infinite loop in randomize mode
Summary: infinite loop in randomize mode
Status: RESOLVED FIXED
Alias: None
Product: noatun
Classification: Miscellaneous
Component: hayes (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Neil Stevens
URL:
Keywords:
: 51384 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-10-30 21:04 UTC by Carsten Pfeiffer
Modified: 2003-01-16 15:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Pfeiffer 2002-10-30 21:04:13 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:          Linux

Hayes sometimes starts to loop infinitely in randomize mode. Maybe kapp->random() keeps returning the same value, which is used as absolute value to specify the next playlist item.

Maybe it should calculate the next item by combining the current and last random number, i.e. multiplying them or something like that.

#2  0x418b37db in random () from /lib/libc.so.6
#3  0x418b3c08 in rand () from /lib/libc.so.6
#4  0x40b1621b in KApplication::random () from /opt/kde3.1/lib/libkdecore.so.4
#5  0x44697220 in Hayes::Playlist::getNextItem () from /opt/kde3.1/lib/kde3/noatun_hayes.so
#6  0x4469696d in Hayes::Playlist::next () from /opt/kde3.1/lib/kde3/noatun_hayes.so
#7  0x4005c299 in Player::posTimeout () from /opt/kde3.1/lib/libnoatun.so.0
#8  0x4005d3c9 in Player::qt_invoke () from /opt/kde3.1/lib/libnoatun.so.0
#9  0x40eee354 in QObject::activate_signal () from /home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3
#10 0x40eee28e in QObject::activate_signal () from /home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3
#11 0x411474c9 in QTimer::timeout () from /home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3
#12 0x40f089cf in QTimer::event () from /home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3
#13 0x40ea33d6 in QApplication::internalNotify () from /home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3
#14 0x40ea31d4 in QApplication::notify () from /home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3
Comment 1 Neil Stevens 2002-10-31 12:47:46 UTC
First off, I'm sorry shuffle is working out so badly for you, and I'm glad   
you're giving me good reports about it.   
   
Can you try something for me?  Compile Hayes with --enable-debug=full, and  
send me two or tree bts from within the infinite loop.  At the very least,  
this better tell me what's in the loop.  
  
Oh, also useful, what is the directory structure of your playlist?  one flat  
directory of files, or multiple layers?  Do you have symlinks in there, or  
maybe some network file systems in there?  This would help me try to reproduce 
it myself. 
 
If all this is too much to send in a bug reply, just mail it all to me. 
 
thanks,  
Comment 2 Carsten Pfeiffer 2002-10-31 13:32:25 UTC
Subject: Re:  infinite loop in randomize mode

On Thursday 31 October 2002 12:47, you wrote:

> First off, I'm sorry shuffle is working out so badly for you,
> and I'm glad you're giving me good reports about it.

:)

> Can you try something for me?  Compile Hayes with --enable-debug=full, and
> send me two or tree bts from within the infinite loop.  At the very least,
> this better tell me what's in the loop.

Ok, did this. Waiting for the next time to happen.

> Oh, also useful, what is the directory structure of your playlist?  one
> flat directory of files, or multiple layers?  Do you have symlinks in
> there, or maybe some network file systems in there?  This would help me try
> to reproduce it myself.

This is one toplevel directory with files and subdirectories. In those 
subdirectories are again files and/or subdirectories, so it's some kind of 
tree-structure.

> If all this is too much to send in a bug reply, just mail it all to me.

No problem.

Cheers
Carsten Pfeiffer
-----BEGIN PGP SIGNATURE-----

iQEVAwUBPcEimaWgYMJuwmZtAQHGkAf8CrVu56nMplYmCLuNrt4LV+FWpF/Eb7SP
AenknxhoqrwIDVsv7tUqgU9ze7xvjmCvtOAhJO5Ef8QqLk5c+dH4+4kMAdIgpsRn
50Gc9lDWzkeoAOnojvdeNMLaxArxbBDqBDvslQSzrnqJ6E0tcifEmLhOXaSrp9Cg
vj9+88sas5PERjHueDtRmwdnwPb07ANUV336LxmaaNDgM7xWJEA5lKTF75+ppYm3
UnZAQkckacvwqZHf/jKjwWZIYRAeg9abw/XpcC/QC13iSf+R4AWlZCWOmSJ0+V7R
jz+/xRuxE5RgE04zSUEDEvlrxmd9Ax5NmC2GGhmj/f0pBT9LiLv2zg==
=rkdy
-----END PGP SIGNATURE-----

Comment 3 Carsten Pfeiffer 2002-11-07 14:57:28 UTC
Subject: Re:  infinite loop in randomize mode

On Thursday 31 October 2002 12:47, you wrote:

Hiya,

> Can you try something for me?  Compile Hayes with --enable-debug=full, and
> send me two or tree bts from within the infinite loop.  At the very least,
> this better tell me what's in the loop.

it finally happened again, this time when I used the global shortcut to skip 
to the next track:

#0  0x40f327f4 in random () from /lib/libc.so.6
#1  0x40f32c08 in rand () from /lib/libc.so.6
#2  0x405741eb in KApplication::random () from /opt/kde3.1/lib/libkdecore.so.4
#3  0x4473e926 in Hayes::Playlist::getNextItem (this=0x81aade8, 
item=0x8391400, honorCheckBox=true, honorShuffle=true)
    at playlist.cpp:388
#4  0x4473df19 in Hayes::Playlist::next (this=0x81aade8) at playlist.cpp:242
#5  0x41213f9a in Player::forward () from /opt/kde3.1/lib/libnoatun.so.0
#6  0x41215361 in Player::qt_invoke () from /opt/kde3.1/lib/libnoatun.so.0
#7  0x40933a64 in QObject::activate_signal () from 
/home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3


#0  0x40e648bf in __pthread_alt_unlock () from /lib/libpthread.so.0
#1  0x40e61173 in pthread_mutex_unlock () from /lib/libpthread.so.0
#2  0x40f3280c in random () from /lib/libc.so.6
#3  0x40f32c08 in rand () from /lib/libc.so.6
#4  0x405741eb in KApplication::random () from /opt/kde3.1/lib/libkdecore.so.4
#5  0x4473e926 in Hayes::Playlist::getNextItem (this=0x81aade8, 
item=0x8391400, honorCheckBox=true, honorShuffle=true)
    at playlist.cpp:388
#6  0x4473df19 in Hayes::Playlist::next (this=0x81aade8) at playlist.cpp:242
#7  0x41213f9a in Player::forward () from /opt/kde3.1/lib/libnoatun.so.0
#8  0x41215361 in Player::qt_invoke () from /opt/kde3.1/lib/libnoatun.so.0
#9  0x40933a64 in QObject::activate_signal () from 
/home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3


#0  0x409d5538 in QListViewItem::enforceSortOrder () from 
/home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3
#1  0x409db3a6 in QListViewItem::firstChild () from 
/home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3
#2  0x4473e90c in Hayes::Playlist::getNextItem (this=0x81aade8, 
item=0x8391400, honorCheckBox=true, honorShuffle=true)
    at playlist.cpp:385
#3  0x4473df19 in Hayes::Playlist::next (this=0x81aade8) at playlist.cpp:242
#4  0x41213f9a in Player::forward () from /opt/kde3.1/lib/libnoatun.so.0
#5  0x41215361 in Player::qt_invoke () from /opt/kde3.1/lib/libnoatun.so.0
#6  0x40933a64 in QObject::activate_signal () from 
/home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3


#0  0x409db3a4 in QListViewItem::firstChild () from 
/home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3
#1  0x4473e90c in Hayes::Playlist::getNextItem (this=0x81aade8, 
item=0x8391400, honorCheckBox=true, honorShuffle=true)
    at playlist.cpp:385
#2  0x4473df19 in Hayes::Playlist::next (this=0x81aade8) at playlist.cpp:242
#3  0x41213f9a in Player::forward () from /opt/kde3.1/lib/libnoatun.so.0
#4  0x41215361 in Player::qt_invoke () from /opt/kde3.1/lib/libnoatun.so.0
#5  0x40933a64 in QObject::activate_signal () from 
/home/gis/src/kde/qt-copy3.1/lib/libqt-mt.so.3


HTH,
Carsten Pfeiffer
-----BEGIN PGP SIGNATURE-----

iQEVAwUBPcpxCqWgYMJuwmZtAQF2tAf/dbd0e4i24NB9SqxY54Ngi37mxcAwt5qB
C50sKH64/j8EG5kSjNlqgE8EkZQ0G5OhIy3fetYyTaohuF02HSsz/EEdFQ7DZ5Wb
Z3wlAOHXDthYZboeXFW6kb6rpx2EGevDfvwsxRHbd7kIOAZQq7IylTe0WFOqvsv5
bTxXY/VObaSx40yNePSegYoZ9eT699GK2A/ZOFyzf0ZTUIFYBTTNgnZ7scg3D+rX
zA8jNJgos0DvxrEqi1ayj2v+P/9HfFytcLAbvTqAzFCfSvcKxJexMVCo5aAlK0Rz
St3lyP+BEXmvXAcUy1gbN/g7FkmGaEmQYwhGXvZr7YJdIUdnWl3p2Q==
=jI76
-----END PGP SIGNATURE-----

Comment 4 Neil Stevens 2002-12-27 09:30:04 UTC
*** Bug 51384 has been marked as a duplicate of this bug. ***
Comment 5 Neil Stevens 2003-01-16 15:40:48 UTC
Shuffle rewritten in Hayes 1.2.