From: Steve S. <st...@sw...> - 2013-10-10 17:07:41
|
I've been out of the loop for a couple days, but I have integrated the audrey code into the PAobj.pm and pa_control.pl files. However, as soon as I added the web_callback hook (which is an array), I'm seeing the same error. I'm a little weak with perl objects and refs in various scopes. Could it REALLY be this simple?? I was attempting a Data::Dumper call to see if I could get something to read in, but an anonymous empty sub is created, and we lose the reference to the real sub. Best regards, Steve Switzer --- Get world-class business I.T. services and a phone system with awesome features that won't challenge your budget! http://www.SwitzerBusinessSolutions.com On 10/10/2013 12:32 AM, Kevin Robert Keegan wrote: > I would try changing that to: > > &run_after_delay($sc_delay, "speak(".$parmstxt.")"); > > > > On Wed, Oct 9, 2013 at 9:27 PM, H Plato <hp...@gm... > <mailto:hp...@gm...>> wrote: > > I don't think so, still running 5.8.8 which I used when I first > installed MH. > > And I was mistaken about my organizer code having an issue. I have > MH announce the time each hour, this this organizer event clashed > with the time announcement. So it is this line in speech_clash: > > &run_after_delay($sc_delay, "speak($parmstxt)"); > > that causes the error as $parmstxt has an array item in it from > the audreyspeak.pl <http://audreyspeak.pl> &pre_speak_to_audrey hook. > > > On 2013-10-09, at 9:41 PM, Kevin Robert Keegan <ke...@kr... > <mailto:ke...@kr...>> wrote: > >> Is it possible this is as a result in an upgrade in perl? I agree >> the code that you have identified hasn't changed in years. >> >> >> On Wed, Oct 9, 2013 at 8:36 PM, H Plato <hp...@gm... >> <mailto:hp...@gm...>> wrote: >> >> Audreyspeak.pl hooks into the speech code and creates an >> array of rooms inside the speak text: >> >> # okay, process the speech and add to the process array >> $parms_ref->{web_file} = "web_file"; >> push(@{$parms_ref->{audreySpeakRooms}},@rooms); >> push @{$parms_ref->{web_hook}},\&file_ready_for_audrey; >> >> This results in the speak string containing an array, which >> the timer function now chokes on. This can be seen in the >> speech_clash.pl <http://speech_clash.pl/> code (as it creates >> an event a few seconds in the future), and I'm puzzled why >> this seems to have shown up in the organizer code that Gregg >> and I put together a few years back as it just does an if >> statement and then a speak command: >> >> if (time_now '10/9/2013 7 pm') {speak ('app=organizer >> Calendar notice. Today: Something.'); display >> ('app=organizer Calendar notice. Today: Something.');}; >> >> I'm also puzzled why this seems to have happened all of a >> sudden. Looking at git, there hasn't been changes to >> audreyspeak.pl <http://audreyspeak.pl/> or timer.pm >> <http://timer.pm/> in a long time. Any other Audrey users on git? >> >> >> On 2013-10-09, at 9:28 PM, Kevin Robert Keegan >> <ke...@kr... <mailto:ke...@kr...>> wrote: >> >>> I don't use speech yet, so I am not much help in the >>> debugging. From what I can see in the error message you >>> provided, this is the issue: >>> >>> Can't use string ("ARRAY(0xbbe50c8)") as an ARRAY ref >>> >>> The timer function basically evaluates a text string after a >>> period of time. It looks to me, like whatever is setting >>> that timer is doing something like this >>> $timer->set("function to be evald @array"). And when perl >>> is translating that into a string it is expanding @array >>> into its string representation rather than leaving it as >>> @array. Escaping with \ or using single quotes ' ' may >>> solve it. >>> >>> I have no idea where that is happening, or why anything in >>> our recent changes would have affected this. >>> >>> That is my two cents. >>> >>> >>> On Sat, Oct 5, 2013 at 12:17 PM, H Plato <hp...@gm... >>> <mailto:hp...@gm...>> wrote: >>> >>> Thanks steve. I think it is speech_clash that has an >>> issue as i only see this error when two speech events >>> are fired at the same time. I was going to put some >>> debug statements in speech_class to find out more. >>> >>> Sent from my mobile device. >>> >>> On Oct 5, 2013, at 1:10 PM, Steve Switzer >>> <st...@sw... <mailto:st...@sw...>> wrote: >>> >>>> I'm not sure what is causing this without digging >>>> further into your code and such. Maybe someone else can >>>> decipher this more quickly. >>>> >>>> However, have you tried including speech_clash.pl >>>> <http://speech_clash.pl/> from common? This adds a >>>> delay if speech events are too close. >>>> >>>> Best regards, >>>> Steve Switzer >>>> >>>> --- >>>> Get world-class business I.T. services and a phone system with awesome features that won't challenge your budget! >>>> http://www.SwitzerBusinessSolutions.com <http://www.switzerbusinesssolutions.com/> >>>> On 10/05/2013 01:15 PM, H Plato wrote: >>>>> I've noticed with the MH3 upgrade, that speech items >>>>> that are very close together, seem to generate a >>>>> timer.pm <http://timer.pm/> issue? Has anyone else >>>>> seen this? I'm using speech_clash.pl >>>>> <http://speech_clash.pl/> and audreyspeak.pl >>>>> <http://audreyspeak.pl/> >>>>> >>>>> Error: >>>>> >>>>> Error in running timer action: >>>>> action=speak(audreySpeakRooms => q(ARRAY(0xbbe50c8)), >>>>> volume => q(), async => q(0), web_hook => >>>>> q(ARRAY(0xbd09158)), mode => q(), web_file => >>>>> q(web_file), compression => q(), voice => q(), rooms >>>>> => q(all), length => q(500), engine => q(), text => >>>>> q(Primary Phone line is now offline), nolog => q(1), >>>>> to_file => q(), raw_text => q(Primary Phone line is >>>>> now offline)) >>>>> error: Can't use string ("ARRAY(0xbbe50c8)") as an >>>>> ARRAY ref while "strict refs" in use at (eval 16748) >>>>> line 2472. >>>>> at mh line 31 >>>>> main::__ANON__('Can\'t use string ("ARRAY(0xbbe50c8)") >>>>> as an ARRAY ref while ...') called at (eval 16748) >>>>> line 2472 >>>>> main::pre_speak_to_audrey('HASH(0xa042c44)') called at >>>>> mh line 1386 >>>>> main::run_hooks_('Speak_parms', 'HASH(0xa042c44)') >>>>> called at (eval 334) line 5 >>>>> main::Speak_parms_hooks('HASH(0xa042c44)') called at >>>>> mh line 6197 >>>>> main::speak('audreySpeakRooms', 'ARRAY(0xbbe50c8)', >>>>> 'volume', '', 'async', 0, 'web_hook', >>>>> 'ARRAY(0xbd09158)', 'mode', ...) called at (eval >>>>> 27354) line 1 >>>>> eval 'speak(audreySpeakRooms => q(ARRAY(0xbbe50c8)), >>>>> volume => q(), async => q(0), web_hook => >>>>> q(ARRAY(0xbd09158)), mode => q(), web_file => >>>>> q(web_file), compression => q(), voice => q(), rooms >>>>> => q(all), length => q(500), engine => q(), text => >>>>> q(Primary Phone line is now offline), nolog => q(1), >>>>> to_file => q(), raw_text => q(Primary Phone line is >>>>> now offline)) >>>>> ;' called at >>>>> /usr/local/misterhouse/git-prod/bin/../lib/Timer.pm >>>>> line 269 >>>>> Timer::run_action('Timer=HASH(0xbd09140)') called at >>>>> /usr/local/misterhouse/git-prod/bin/../lib/Timer.pm >>>>> line 61 >>>>> Timer::check_for_timer_actions called at mh line 1491 >>>>> main::check_for_action called at mh line 3280 >>>>> main::monitor_commands called at mh line 6697 >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> October Webinars: Code for Performance >>>>> Free Intel webinars can help you accelerate application performance. >>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>>>> the latest Intel processors and coprocessors. See abstracts and register > >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>>> >>>>> >>>>> ________________________________________________________ >>>>> To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 >>>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> October Webinars: Code for Performance >>>> Free Intel webinars can help you accelerate application >>>> performance. >>>> Explore tips for MPI, OpenMP, advanced profiling, and >>>> more. Get the most from >>>> the latest Intel processors and coprocessors. See >>>> abstracts and register > >>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>> ________________________________________________________ >>>> To unsubscribe from this list, go to: >>>> http://sourceforge.net/mail/?group_id=1365 >>>> >>> >>> ------------------------------------------------------------------------------ >>> October Webinars: Code for Performance >>> Free Intel webinars can help you accelerate application >>> performance. >>> Explore tips for MPI, OpenMP, advanced profiling, and >>> more. Get the most from >>> the latest Intel processors and coprocessors. See >>> abstracts and register > >>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>> ________________________________________________________ >>> To unsubscribe from this list, go to: >>> http://sourceforge.net/mail/?group_id=1365 >>> >>> >>> >> >> > > |