Hi Leonhard,
Thank you for investigating this. It looks like it's sumocfg specific:
If I run your example against my own compiled sumo which is known to crash
then your main.cpp works.
If I run one of our sumocfg files with your main.cpp then I get the
readIsSafe error.

I will investigate further the differences between our scenarios and yours.
It may be the way we're defining our traffic.

Do you think it could be because of the following warning which we now get?
Warning: Defining car following parameters in a nested element is
deprecated in vType 'CarA', use attributes instead!

Cheers,
Erik


-- 
Erik Newton
Model Integration Engineer
rFactor Pro

w: http://www.rfpro.com

This e-mail and any files transmitted with it are private and confidential.
If you have received this email in error please notify the sender
immediately and delete this e-mail from your system. The recipient should
check this email and any attachments for the presence of viruses. rFactor
Pro accepts no liability for any damage caused by any virus transmitted by
this email. rFactor Pro is the trading name of Kangaloosh Limited,
registered in England No. 06427019.

On 24 July 2017 at 13:45, <leonhard.luec...@dlr.de> wrote:

> Hi Erik,
>
> I couldn’t reproduce the ‘readIsSafe’-error. Attached you find my try
> using your code. However it seems to work fine (on my Ubuntu machine).
> Maybe you can provide more details on the crash / modify my code so it
> crashes?
>
> Best regards,
>
> Leo
>
>
>
> *Von:* erik.new...@rfactor-pro.com [mailto:erik.new...@rfactor-pro.com] *Im
> Auftrag von *Erik Newton
> *Gesendet:* Donnerstag, 20. Juli 2017 15:15
> *An:* Jakob Erdmann
> *Cc:* sumo-devel@lists.sourceforge.net; Lücken, Leonhard
> *Betreff:* Re: [sumo-devel] TraCI Subscribe to people in vehicle context
>
>
>
> Thanks Jakob,
>
> That is excellent news. Thank you so much for implementing this so quickly.
>
>
>
> I've just tried a r25274 build of sumo.exe and our interface based on an
> equivalent version of Traci. Within a class derived from public TraCIAPI we
> do the following to subscribe to vehicles:
>
>
>
>         {
>
>             auto routes = route.getIDList();
>
>             vehicle.add(mEgoId, routes[0], egoType);
>
>         }
>
>
>
>         const std::vector<int> varsTraffic{ VAR_POSITION3D, VAR_ANGLE,
> VAR_COLOR, VAR_SPEED, VAR_TYPE, VAR_VEHICLECLASS, VAR_SHAPECLASS,
> VAR_SIGNALS };
>
>
>
>         simulation.subscribeContext(CMD_SUBSCRIBE_VEHICLE_CONTEXT,
> mEgoId, 0, 999999999, CMD_GET_VEHICLE_VARIABLE, egoRadius, varsTraffic);
>
>
>
>
>
> The final line causes the SUMO server to exit with:
>
> Error: tcpip::Storage::readIsSafe: want to read 4 bytes from Storage, but
> only 0 remaining
>
> Quitting (on error).
>
>
>
> As I say it looked to me like r24483 had extended the definition of the
> subscription request packet, but the equivalent traci code hadn't been
> extended.
>
>
>
> Any thoughts?
>
> Erik
>
>
>
>
>
> --
>
> Erik Newton
> Model Integration Engineer
> rFactor Pro
>
> w: http://www.rfpro.com
>
> This e-mail and any files transmitted with it are private and
> confidential. If you have received this email in error please notify the
> sender immediately and delete this e-mail from your system. The recipient
> should check this email and any attachments for the presence of viruses.
> rFactor Pro accepts no liability for any damage caused by any virus
> transmitted by this email. rFactor Pro is the trading name of Kangaloosh
> Limited, registered in England No. 06427019.
>
>
>
> On 18 July 2017 at 15:30, Jakob Erdmann <namdre.s...@googlemail.com>
> wrote:
>
> Hello,
>
> person context subscriptions are fixed in revision [25252]. Thank you for
> pointing out the problem.
>
> Regarding the issue with r24483, I could not yet reproduce any exceptions.
> Can you please send a small sample scenario+script?
>
> regards,
>
> Jakob
>
>
>
> 2017-07-11 23:31 GMT+02:00 Erik Newton via sumo-devel <
> sumo-devel@lists.sourceforge.net>:
>
> Hi Dev Team,
> I've been trying to subscribe to pedestrians within a radius of my injected
> ego vehicle, but was always getting zero people.
>
> This works for subscribing to vehicles:
>         simulation.subscribeContext(CMD_SUBSCRIBE_VEHICLE_CONTEXT, mEgoId,
> 0, 999999999, CMD_GET_VEHICLE_VARIABLE, egoRadius, varsTraffic);
>
> But this does not work for pedestrians:
>         simulation.subscribeContext(CMD_SUBSCRIBE_VEHICLE_CONTEXT, mEgoId,
> 0, 999999999, CMD_GET_PERSON_VARIABLE, egoRadius, varsPeople);
>
> I'm getting a subscription message returned OK but always no pedestrians
> despite running them over.
>
> I think I've traced the problem down to
> TraCIServer.cpp collectObjectsInRange does not have a case statement
> for CMD_GET_PERSON_VARIABLE. To implement it, do we then
> need TraCIServerAPI_Person::getTree();
>
> I've not looked at how difficult that is to implement yet. Assuming I've
> gone about this the correct way, does anyone have time to implement this at
> the moment please?
>
> Also traci appears to be broken in the current trunk r25176 due to r24483
> adding code to initialiseSubscription. You get a safeRead exception. This
> may be expected?  so I went back to 0.30.
>
> Cheers,
> Erik
>
>
>
> --
> Erik Newton
> Model Integration Engineer
> rFactor Pro
>
> w: http://www.rfpro.com
>
> This e-mail and any files transmitted with it are private and confidential.
> If you have received this email in error please notify the sender
> immediately and delete this e-mail from your system. The recipient should
> check this email and any attachments for the presence of viruses. rFactor
> Pro accepts no liability for any damage caused by any virus transmitted by
> this email. rFactor Pro is the trading name of Kangaloosh Limited,
> registered in England No. 06427019.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> sumo-devel mailing list
> sumo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sumo-devel
>
>
>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-devel mailing list
sumo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sumo-devel

Reply via email to