My guess as to what is happening here is that the server has already sent  a sonar message when you delete the sonar proxy and so it doesnt know what to do with the message. Simple option is just to catch the exception here and then continue.


2009/3/17 Wu Hengxin <>

I am trying to get the pioneer sonar to switch on and off at certain requirements. I am using player 2.1.2 and playerc++ proxy.

My code is as follows

PlayerClient robot (gHostname, gPort);
SonarProxy *sonarP;


for (;;)
    if (onSonar)
        sonarP = new SonarProxy(&robot,0);
        onSonar = false;
   if (offSonar)
        offSonar = false;

 //other stuff here....


The failure point comes after the delete sonar portion and when the robot thread starts to read. The error returned is

playerc warning   : warning : Failed to dispatch data message: subtype 1
address: 16777343:6665:sonar:0
terminate called after throwing an instance of 'PlayerCc::PlayerError'
size: 8Aborted

Any help will be well appreciated. Thanks

Wu Hengxin
Institute for Infocomm Research

Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial.
Playerstage-users mailing list

This email is intended for the addressee only and may contain privileged and/or confidential information