You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get a read access violation in Map::getRegionDistance trying to read from std::shared_ptrr.
I think this may be related to passing in a raw pointer Region * in Simulator.cpp makeRoad
and then casting them back to shared_ptr in LeastCostEstimate?
Or in AdjactedCost the micropather is given a reference to n which immediatly falls out of scope?
I tried changing
int result = pather->Solve(c->region.get(), oc->region.get() &path, &totalCost);
to
int result = pather->Solve(&(c->region), &(oc->region), &path, &totalCost);
and
for (auto n : r->neighbors) {
to
for (auto &n : r->neighbors) {
in AdjacentCost but then it crashes while trying to delete cities in removeBadPorts
The text was updated successfully, but these errors were encountered:
Seems like my recent commits which adds smart pointers are horrible =/
Try to use 121b512c155da94b59e7990f0a9226a19e78e2ed for mapgen-viewer
and dd14a6b5e491b0bce52b7f885f424e9621e0f740 for libmapgen
I am not very experienced c++ developer to fix segfaults quickly =( But if you can, i will be very grateful.
If i run the following
I get a read access violation in Map::getRegionDistance trying to read from std::shared_ptrr.
I think this may be related to passing in a raw pointer
Region *
in Simulator.cpp makeRoadand then casting them back to shared_ptr in LeastCostEstimate?
Or in AdjactedCost the micropather is given a reference to n which immediatly falls out of scope?
I tried changing
to
and
to
in AdjacentCost but then it crashes while trying to delete cities in removeBadPorts
The text was updated successfully, but these errors were encountered: