Summary:ASTERISK-03438: Pressing keys during playback of ControlPlayback causes Asterisk to crash and burn.
Reporter:Jared Smith (jsmith)Labels:
Date Opened:2005-02-05 17:49:57.000-0600Date Closed:2008-01-15 15:24:37.000-0600
Versions:Frequency of
Environment:Attachments:( 0) bt-full.txt
( 1) file.patch.txt
Description:The ControlPlayback() application doesn't like it if you press other keys during the playback.  For example, I've put the following in my dialplan:

exten => 123,1,ControlPlayback(tt-monkeys,3000)

If I press the 0 or 1 keys during the playback, Asterisk crashes.  Pressing * or # don't crash it, as they're the default fast-forward and rewind keys.  I'm assuming that any other keys (2-9) will crash it as well, but I haven't tried it.

****** STEPS TO REPRODUCE ******

Call the ControlPlayback() application
Press the 0 key during playback


Here's the backtrace:

#0  0x00179f33 in strchr () from /lib/i686/libc.so.6
#1  0x0806877e in ast_waitstream_fr (c=0x9b1f258, breakon=0x0, forward=0x38ef4f "#", rewind=0x38ef51 "*", ms=0) at file.c:1027
#2  0x080942ad in ast_control_streamfile (chan=0x9b1f258, file=0x61e7864 "tt-monkeys", fwd=0x38ef4f "#", rev=0x38ef51 "*", stop=0x0, pause=0x0, skipms=3000)
   at app.c:446
#3  0x0038ec33 in controlplayback_exec (chan=0x9b1f258, data=0x0) at app_controlplayback.c:107
#4  0x08085186 in pbx_extension_helper (c=0x9b1f258, con=0x0, context=0x9b1f3a0 "incoming", exten=0x9b1f494 "123", priority=1, label=0x0,
   callerid=0x9b29740 "101", action=0) at pbx.c:482
ASTERISK-1  0x08086310 in ast_pbx_run (c=0x9b1f258) at pbx.c:1847
ASTERISK-2  0x08087c91 in pbx_thread (data=0x0) at pbx.c:2092
ASTERISK-3  0x004aace1 in pthread_start_thread () from /lib/i686/libpthread.so.0
ASTERISK-4  0x001d713a in clone () from /lib/i686/libc.so.6
Comments:By: Jared Smith (jsmith) 2005-02-05 17:56:42.000-0600

I've attached bt-full.txt, which is a full backtrace of the same crash as the backtrace I posted above.  I thought the full backtrace might be more helpful.

By: nick (nick) 2005-02-05 20:03:52.000-0600

I've got a patch for this forthcoming...

By: nick (nick) 2005-02-05 20:07:25.000-0600

...and here it is.

My D is on F.


By: Jared Smith (jsmith) 2005-02-05 21:37:54.000-0600

Nick's patch applies cleanly to CVS HEAD and fixed the problem.  Can we get this fix added to CVS?

By: twisted (twisted) 2005-02-06 00:42:54.000-0600

Fixed in CVS Head with minor formatting adjustments. Thanks!

By: Russell Bryant (russell) 2005-02-06 22:41:11.000-0600

fixed in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:24:29.000-0600

Repository: asterisk
Revision: 4970

U   trunk/file.c

r4970 | twisted | 2008-01-15 15:24:28 -0600 (Tue, 15 Jan 2008) | 2 lines

Don't crash when pause/stop keys aren't defined on the command line (Bug ASTERISK-3438)



By: Digium Subversion (svnbot) 2008-01-15 15:24:37.000-0600

Repository: asterisk
Revision: 4979

U   branches/v1-0/file.c

r4979 | russell | 2008-01-15 15:24:37 -0600 (Tue, 15 Jan 2008) | 2 lines

don't crash on undefined keys (bug ASTERISK-3438)