TheDuckCow / godot-road-generator

A godot plugin for creating 3D highways and streets.
MIT License
316 stars 16 forks source link

Intermittent clear_lane_segments error when transforming road points #48

Closed bdog2112 closed 3 months ago

bdog2112 commented 1 year ago

Intermittent error shows up when transforming road points:

res://addons/road-generator/road_network.gd:168 - Invalid call. Nonexistent function 'clear_lane_segments' in base 'Nil'.

Not sure of the best way to recreate problem. But, try the following:

This should result in the error message denoted above. It may be that only the start of a road network is affected.

So, a temporary workaround may be to not select/transform a road's start point.

TheDuckCow commented 1 year ago

Thanks for logging. I'd be fine to just leave this in the backlog and we can get back to it at some later point

TheDuckCow commented 3 months ago

I tried replicating this just now, and it seems we no longer have the error. We might however get the following warning printouts:

modules/gdscript/gdscript_functions.cpp:789 - RP should have been present in container edge list

But, on using the refresh roads button, all gets resolved as the edge list is updated. The only question in my mind here is whether we should in this scenario just auto update the edge list, but I worry about some edge cases which could lead to a lot of extra runtime processing. So I'm going to suggest avoiding it for now. I'm inclined to close this issue in the meantime, given its age.

Edit: It's worth saying that this source example was also only valid due to having this intentional edge test case of this roadpoint being made hidden initially on scene start. So, already a sort of unusual case.