ChimeHQ / Neon

A Swift library for efficient, flexible content-based text styling
BSD 3-Clause "New" or "Revised" License
320 stars 18 forks source link

Crash on async access #22

Closed kaunteya closed 1 year ago

kaunteya commented 1 year ago

Crash happens on async access to currentTree

Created a minimum reproducible https://github.com/kaunteya/TreeSitter-crash-minreprex

mattmassicotte commented 1 year ago

Ok I will look closer tomorrow. But I just looked quickly. It seems that the node instance is outliving the tree it is a part of. If you keep references to both (could just quickly return a tuple) does it help?

kaunteya commented 1 year ago

Yes. That was quick Matt. Thanks!!