Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expression: map/set iterator not dereferencable in RegionGenerator #1

Open
s7jones opened this issue Feb 10, 2018 · 0 comments
Open

Comments

@s7jones
Copy link
Owner

s7jones commented Feb 10, 2018

In RegionGenerator, the code:

std::map<nodeID, Chokepoint*> node2chokepoint;
for (const auto& chokeNodeId : graph.chokeNodes) {
	auto it = graph.adjacencyList[chokeNodeId].begin();
	Region* r1 = node2region[*it];
	++it;
	Region* r2 = node2region[*it];
	BWAPI::Position side1(chokepointSides.at(chokeNodeId).side1);
	BWAPI::Position side2(chokepointSides.at(chokeNodeId).side2);
	Chokepoint* newChokepoint = new ChokepointImpl(std::make_pair(r1, r2), std::make_pair(side1, side2));
	chokepoints.insert(newChokepoint);
	node2chokepoint.insert(std::make_pair(chokeNodeId, newChokepoint));
}

throws an error Expression: map/set iterator not dereferencable at Region* r2 = node2region[*it];.

This is for map with the resulting hash:
+ filename "bwapi-data/BWTA2/d2f5633cc4bb0fca13cd1250729d5530c82c7451.bwta" std::basic_string<char,std::char_traits<char>,std::allocator<char> >

in TerrainAnalysis::analyze().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant