Breakpoint causes failure.

View: New views
2 Messages — Rating Filter:   Alert me  

Breakpoint causes failure.

by Jack Bonn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am just getting my feet wet with PortAudio, and am running in a Wince
5.0 x86 environment.

When I run patest_record.c without breakpoints, it runs fine and generates
the expected result.

On the other hand, if I break during audio input, the system seems to get
stuck and the index value is not advanced.

In other words, once I continue from a breakpoint at the printf of "index"
at line 254 of patest_record.c, "recordCallback" is no longer called.
When this occurs, I see that WAIT_TIMEOUT is returned each time the helper
thread calls WaitForMultipleObjects() (in pa_win_wmme.c).

Should I:

1) Get the latest SVN version; I am using the one in the SVN database for
pjsip?

2) Look for a problem with the BSP for the board, a Diamond Systems
Hercules II?  I have no idea if this is as solid as I would like, but
would like to debug the kernel only as needed.

3) Forget about it, it is a known bug?

Thanks in advance.

--
Jack Bonn  <> Software Design Labs, Inc.
jack.bonn@... (847)526-1337

Dyslexics untie.

_______________________________________________
Portaudio mailing list
Portaudio@...
http://techweb.rfa.org/mailman/listinfo/portaudio

Re: Breakpoint causes failure.

by Phil Burk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Jack,

> When I run patest_record.c without breakpoints, it runs fine and
> generates the expected result.
> On the other hand, if I break during audio input, the system seems to
> get stuck and the index value is not advanced.

PortAudio is a real-time system. It cannot function properly when one
thread is halted. It seems reasonable that when one thread is halted for
debugging that another thread would have a WAIT_TIMEOUT occur.

There is a real-time trace logging tool in PortAudio to solve this problem.

http://portaudio.com/docs/v19-doxydocs/pa__trace_8h.html

You can store debug message in real-time then dump them out later in
non-real-time.

Phil Burk
_______________________________________________
Portaudio mailing list
Portaudio@...
http://techweb.rfa.org/mailman/listinfo/portaudio
LightInTheBox - Buy quality products at wholesale price