jjreyes92 / pyo

Automatically exported from code.google.com/p/pyo
GNU General Public License v3.0
0 stars 0 forks source link

Pyo 0.5.1 segfaults on Ubuntu Lucid #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Build with --use-jack.

~/src/pyo/examples$ libtool --mode=execute gdb /usr/bin/python
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) run chorus.py
Starting program: /usr/bin/python chorus.py
[Thread debugging using libthread_db enabled]
pyo version 0.5.1 (uses single precision)
[New Thread 0xb70abb70 (LWP 16321)]
PortMidi warning: Something wrong with midi device!
Portmidi closed

Program received signal SIGSEGV, Segmentation fault.
0xb7fbaa62 in pthread_join () from /lib/tls/i686/cmov/libpthread.so.0
(gdb) bt
#0  0xb7fbaa62 in pthread_join () from /lib/tls/i686/cmov/libpthread.so.0
#1  0xb786980f in Pt_Stop () from /usr/lib/libporttime.so.0
#2  0xb7a26531 in Server_pm_init (self=0x8d4de80) at 
src/engine/servermodule.c:1665
#3  0xb7a27f8a in Server_boot (self=0x8d4de80) at src/engine/servermodule.c:1691
#4  0x080e0f9c in PyEval_EvalFrameEx ()
#5  0x080e1bb0 in PyEval_EvalFrameEx ()
#6  0x080e2807 in PyEval_EvalCodeEx ()
#7  0x080e2907 in PyEval_EvalCode ()
#8  0x081005ad in PyRun_FileExFlags ()
#9  0x08100812 in PyRun_SimpleFileExFlags ()
#10 0x0805de5c in Py_Main ()
#11 0x0805d03b in main ()

Original issue reported on code.google.com by que...@gmail.com on 21 Nov 2011 at 6:46

GoogleCodeExporter commented 9 years ago
pyo version 0.5.0 works.

Original comment by que...@gmail.com on 21 Nov 2011 at 6:57

GoogleCodeExporter commented 9 years ago
Ok, I added porttime (timer for portmidi) some time ago and it seems to be 
faulty in Pt_Stop()... I didn't really use it so I will simply removed it for 
now...

Original comment by belan...@gmail.com on 21 Nov 2011 at 11:11

GoogleCodeExporter commented 9 years ago
I removed everything about Porttime from sources... Can you check if that fixes 
the segfault?

Original comment by belan...@gmail.com on 22 Nov 2011 at 3:48

GoogleCodeExporter commented 9 years ago

It seems I have the same issue with Windows Seven, Python 2.7.2 (32bits) and 
pyo 0.5/0.6 (tried both)

Here is what I get : 

Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on 
win32
>>> from pyo import *
pyo version 0.5.0 (uses single precision)
>>> s = Server().boot()
PortMidi warning: Something wrong with midi device!
Portmidi closed

Then interpreter craches.

I don't know much about audio and so on, but looking at other posts I tried to 
list my devices:

>>> pa_list_devices()
0: OUT, name: Microsoft Sound Mapper - Output, host api index: 0, default sr: 
44100 Hz, latency: 0.200000 s
1: OUT, name: Speakers (Realtek High Definiti, host api index: 0, default sr: 
44100 Hz, latency: 0.200000 s
2: OUT, name: Primary Sound Driver, host api index: 1, default sr: 44100 Hz, 
latency: 0.000000 s
3: OUT, name: Speakers (Realtek High Definition Audio), host api index: 1, 
default sr: 44100 Hz, latency: 0.000000 s

and my default device:
>>> pa_get_default_output()
1: OUT, name: Speakers (Realtek High Definiti, default sr: 44100 Hz, latency: 
0.200000 s
1

Then I tryied to set all devices as output device :
>>> s = Server()
>>> s.setOutputDevice(0)
>>> s.boot()
etc.

I also tried with another PC, same thing. Any idea ?

Thanks.

Fabrice

Original comment by fabrice....@gmail.com on 26 Jan 2012 at 3:24

GoogleCodeExporter commented 9 years ago
You don't seem to have any audio input configured, so first thing is to try pyo 
without looking for audio input. You can do it by setting the Server's duplex 
argument to 0.

s = Server(duplex=0).boot()

On Windows, you should install the ASIO4ALL driver to have low latency audio 
inputs/outputs...

Olivier

p.s.: And reinstall 0.6.0, much more stable!

Original comment by belan...@gmail.com on 26 Jan 2012 at 6:34

GoogleCodeExporter commented 9 years ago
Thanks for your fast replay.

Indeed I have no input device plugged in my computer, so Windows don't seem to 
"start" the input devices and I can't see them using pa_list_devices(). However 
with ASIO4ALL driver, I can see one.

>>> from pyo import *
pyo version 0.6.0 (uses single precision)
>>> pa_list_devices()
AUDIO devices:
0: OUT, name: Microsoft Sound Mapper - Output, host api index: 0, default sr: 
44100 Hz, latency: 0.200000 s
1: OUT, name: Speakers (Realtek High Definiti, host api index: 0, default sr: 
44100 Hz, latency: 0.200000 s
2: OUT, name: Primary Sound Driver, host api index: 1, default sr: 44100 Hz, 
latency: 0.000000 s
3: OUT, name: Speakers (Realtek High Definition Audio), host api index: 1, 
default sr: 44100 Hz, latency: 0.000000 s
4: IN, name: ASIO4ALL v2, host api index: 2, default sr: 44100 Hz, latency: 
0.011610 s
4: OUT, name: ASIO4ALL v2, host api index: 2, default sr: 44100 Hz, latency: 
0.011610 s

>>> pa_get_default_output()
1: OUT, name: Speakers (Realtek High Definiti, default sr: 44100 Hz, latency: 
0.200000 s
1

>>> pm_list_devices()
MIDI devices:
0: OUT, name: Microsoft MIDI Mapper, interface: MMSystem
1: OUT, name: Microsoft GS Wavetable Synth, interface: MMSystem
>>> pm_get_default_output()
0: OUT, name: Microsoft MIDI Mapper, interface: MMSystem
0

Thank to your solution, I can now start the server without crashing the 
interpreter but I still have the midi issue. However I can here some sounds so, 
it's fine to me.
Maybe I now have the same issue as above ? (segfaults on Ubuntu Lucid)

>>> s=Server(duplex=0).boot()
PortMidi warning: Something wrong with midi device!
Portmidi closed
>>> s.start()
<pyolib.server.Server object at 0x022F0350>
>>> a=Sine(mul=0.01).out()
>>> s.stop()

Same using ASIO4ALL

>>> s=Server()
>>> s.setInOutDevice(4)
>>> s.boot()
PortMidi warning: Something wrong with midi device!
Portmidi closed
<pyolib.server.Server object at 0x021B0350>
>>> s.start()
<pyolib.server.Server object at 0x021B0350>
>>> a=Sine(mul=0.01).out()
>>> s.stop()

Fabrice

Original comment by fabrice....@gmail.com on 27 Jan 2012 at 9:42