[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] music.load(0,skip_time) crashes



Hello,

I'm using Debian Testig with this pygame version:
ii  python-pygame                       1.7.1release-4.2
SDL bindings for games development in Python

I know that it's not the SVN version, or the last version (so sorry to
send bugs with not the last version) but I would like to comment
something.

pydance program is crashing quite often when the user is browsing the
songs (songselect.py). It looks like a pygame/SDL program, and I can
reproduce the problem (or very similar problem, or another problem)
doing this:
--------------
#!/usr/bin/python

import pygame
import time
import random
from pygame.mixer import music

def play():
    #music.load("/usr/share/games/pydance/songs/20,NOVEMBER (D.D.R. version)/20,
NOVEMBER (D.D.R. version).mp3")
    music.load("Qt4Dance.mp3")
    print "music.load"
    aleatori = random.uniform(0,45)
    music.play(0,aleatori)
    print "music.play"
    time.sleep(1)
    music.stop()
    print "music.stop"


pygame.mixer.init(44100)
i=1
while True:
    print "Iteration:",i
    play()
    i=i+1
--------------

the point is the music.play with some Skipping seconds.

Usually after from 7 to 30 iterations this program crash:
--------
.........
Audio: Skipping 33.684902 seconds...
music.play
music.stop
Iteration: 15
music.load
Audio: Skipping 44.541866 seconds...
music.play
music.stop
Iteration: 16
music.load
Audio: Skipping 42.375805 seconds...
music.play
music.stop
Iteration: 17
music.load
Audio: Skipping 30.574263 seconds...
music.play
music.stop
Iteration: 18
music.load
Audio: Skipping 8.483066 seconds...
--------

Sometimes with a segfault, sometimes with just crashing...

Now it just hang (nothing is playing, but it's not crashed) and if I attach a
gdb to this process:

--------
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7f30c99 in __lll_lock_wait () from /lib/i686/cmov/libpthread.so.0
#2  0xb7f2c0d3 in _L_lock_291 () from /lib/i686/cmov/libpthread.so.0
#3  0xb7f2bb36 in pthread_mutex_lock () from /lib/i686/cmov/libpthread.so.0
#4  0xb7c8a041 in SDL_mutexP () from /usr/lib/libSDL-1.2.so.0
#5  0xb77e5ecb in MPEGstream::copy_data () from /usr/lib/libsmpeg-0.4.so.0
#6  0xb77eabae in MPEGaudio::fillbuffer () from /usr/lib/libsmpeg-0.4.so.0
#7  0xb77fb8bb in MPEGaudio::loadheader () from /usr/lib/libsmpeg-0.4.so.0
#8  0xb77eacc8 in MPEGaudio::Skip () from /usr/lib/libsmpeg-0.4.so.0
#9  0xb77e40b7 in MPEG::Skip () from /usr/lib/libsmpeg-0.4.so.0
#10 0xb77ea196 in SMPEG_skip () from /usr/lib/libsmpeg-0.4.so.0
#11 0xb78827ae in ?? () from /usr/lib/libSDL_mixer-1.2.so.0
#12 0x082b5850 in ?? ()
#13 0x4107baa3 in ?? ()
#14 0xbfeedd98 in ?? ()
#15 0xb77ea4bc in SMPEG_enablevideo () from /usr/lib/libsmpeg-0.4.so.0
#16 0xb788293f in ?? () from /usr/lib/libSDL_mixer-1.2.so.0
#17 0x60000000 in ?? ()
#18 0x4020f754 in ?? ()
#19 0xbfeeddc8 in ?? ()
#20 0xbfeedde8 in ?? ()
#21 0x60000000 in ?? ()
--------

Ok, maybe it's something from SMPEG_skip? could be, of course. But I'm
sure that all of you is more familiarized with these things than me.

My libsdl versions:
carles@pinux:~$ dpkg -l  |grep -i libsdl
ii  libsdl-console                      1.3-5                                console that can be added to any SDL applica
ii  libsdl-gfx1.2-4                     2.0.13-4                             drawing and graphical effects extension for
ii  libsdl-gfx1.2-dev                   2.0.13-4                             development files for SDL_gfx
ii  libsdl-image1.2                     1.2.6-3                              image loading library for Simple DirectMedia
ii  libsdl-image1.2-dev                 1.2.6-3                              development files for SDL 1.2 image loading
ii  libsdl-mixer1.2                     1.2.8-4                              mixer library for Simple DirectMedia Layer 1
ii  libsdl-net1.2                       1.2.7-2                              network library for Simple DirectMedia Layer
ii  libsdl-pango1                       0.1.2-4                              text rendering with Pango in SDL application
ii  libsdl-perl                         1.20.3dfsg-3+b1                      SDL bindings for the Perl language
ii  libsdl-sound1.2                     1.0.3-2                              Decoder of several sound file formats for SD
ii  libsdl-ttf2.0-0                     2.0.9-1                              ttf library for Simple DirectMedia Layer wit
ii  libsdl1.2-dev                       1.2.13-2                             Simple DirectMedia Layer development files
ii  libsdl1.2debian                     1.2.13-2                             Simple DirectMedia Layer
ii  libsdl1.2debian-alsa                1.2.13-2                             Simple DirectMedia Layer (with X11 and ALSA

Have you had this problem in pygame? Is it, as I think, a libsdl problem?
(so I should report there, or even better, test the SVN version?)

Thanks,

-- 
Carles Pina i Estany		GPG id: 0x17756391
	http://pinux.info