Gustavo Sverzut Barbieri wrote:
>  --- Dirk Meyer <[EMAIL PROTECTED]> escreveu: 
>> Gustavo Sverzut Barbieri wrote:
>> > Hello guys,
>> >
>> > I'm implementing MPAV (MPlayer Audio Visualization,
>> > http://gsbarbieri.sytes.net/mpav/) but I found some issues:
>> >
>> > - childapp.py: Sometimes poll() is called before the child
>> __init__()
>> > is finished, so many times it breaks because there's no t1 or t2
>> > attributes (isAlive()).
>> > I solved this declaring "ready=False" as class attribute and
>> setting it
>> > to True at the end of __init__(). Then isAlive() must check if it's
>> > ready. It's the right solution?
>> 
>> No, I guess we should better find out why this happens. Do you use
>> ChildApp or ChildApp2? For ChildApp2 this shouldn't happen because
>> there is not thread to be a problem at this point.
>
> I'm using ChildApp2. I don't know its internals, just based my usage on
> video/plugins/mplayer.py
>    The problem is that sometimes it breaks in isAlive(), which looks
> for .t1, which is not available. Browsing the code I see it's only
> created in ChildApp, which is inherited by ChildApp2 so the problem
> could just be there... To figure it out I put prints in the begin and
> end of the constructor and one in isAlive, together with a
> traceback.print_stack(). Then I see "Constructor started. isAlive()
> called from poll(). Constructor ended"

Do you start ChildApp2 from a thread? If so, do not do it, it doesn't
work. If not, I can't see the bug. The main threads starts Childapp2,
this one starts ChildApp, this creates the threads. Since poll()
should only be called from the main thread, the main thread can't do
it until the constructor is done and t1 and t2 are there. 

>> > - The second issue is with stop_osd. I need to stop the osd, since
>> my
>> > app uses SDL and can display in framebuffer and dxr3. I'm using
>> > ChildApp2 and leave stop_osd=2, so it must stop the osd when
>> > OSD_STOP_WHEN_PLAYING=1 but instead of just stop the osd, it exits
>> and
>> > leaves mplayer playing!
>> 
>> add some 'print' debug to see why. What do you mean with 'just
>> exits'?
>> Freevo stops?
>
> Yes, freevo stops. Quit. The only 'python' thread left is the one that
> called mplayer.

Strange, maybe it tries to restart the osd and crashes? In
childapp.ChildApp2, add some print statement at the stop and restart
osd functions to see if they are called correct. 

>    NOTE: I don't have LIRC, just the keyboard. Maybe it relies on LIRC
> thread or something?

No


Dischi

-- 
"Gnus gives you all the opportunity you could possibly want for
shooting yourself in the foot." (gnus-info)      


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to