ros2 / sros2

tools to generate and distribute keys for SROS 2
Apache License 2.0
88 stars 43 forks source link

Fix sros2 tests on Windows Debug. (backport #317) #320

Closed mergify[bot] closed 2 months ago

mergify[bot] commented 2 months ago

From what I can tell, it looks like lxml has a bug where it doesn't properly track references to objects via the find() method. This manifests on Windows debug as a crash after we have stopped using the object, but I believe that by that point the underlying memory has already been freed. Windows Debug in particular is sensitive to this.

Fix it by doing a deepcopy of the object returned from the find(). This code isn't performance sensitive, so it shouldn't be a big deal to do it here, and it fixes the bug in my testing.


This is an automatic backport of pull request #317 done by Mergify.

mikaelarguedas commented 2 months ago

In None mode

In Debug mode