← Back to team overview

kicad-developers team mailing list archive

RAII for the PNS_ROUTER

 

Hello all,

up to the most current version of the router code I could get hold of, it is leaking much memory (eventually resulting in std::bad_alloc) on iterative stuff like dragging. I was also made aware of bugs like "https://bugs.launchpad.net/kicad/+bug/1553804";. Now this stuff is a complex beast, and I'm nowhere any near fluent with it. But it's also very interesting to me algorithm-wise. I believe that the original devs at this point are the only ones that could really spot leaks and segfaults in it with a reasonable time effort, might be wrong though.

It is my experience though, that such bugs usually surface while transforming source code to a more rigid RAII source-style with clear and enforced ownership. I would be totally willing to fight myself through the sources, trying to transform it without change in behaviour, but getting that right will probably reveal misconceptions on my side and it will also touch a huge amount of lines in the end and take quite a while. I might even feel forced to ask people for support.

So I don't want to rush ahead and get lost in details not being seen anymore, before I don't know if there's general interest walking such a route and nobody is actually addressing this currently (my time does have some tiny amount of rest-value to me ;)).

What are your thoughts?

Hope all goes well for a spedy 4.0.3! It's great to see how the wheels turn.

Michael



Follow ups