You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
free() is used in these 3 places and it only crashes on Windows.
I don't know how to debug this, so I've disabled the calls for the time being.
This may lead to minor memory leaks but at least it won't crash.
This is not really a useful workaround, but maybe it is helpful for finding the cause or it gives a hint what could be the reason? It seems somehow the default allocation functions used by tree-sitter internally are not compatible with the free function obtained through FFM on Windows. But each on their own works correctly: The default tree-sitter allocation functions work fine when tree-sitter internally allocates and frees memory, and configuring tree-sitter to only use the allocation functions through FFM (as done with the ts_set_allocator approach above) also works fine. Only the combination of memory allocated internally by tree-sitter but freed through FFM with free seems to be an issue.
I also tried to use ts_current_free instead of free but that crashes the JVM as well on Windows for me.
free()
is used in these 3 places and it only crashes on Windows.I don't know how to debug this, so I've disabled the calls for the time being.
This may lead to minor memory leaks but at least it won't crash.
java-tree-sitter/src/main/java/io/github/treesitter/jtreesitter/Node.java
Line 443 in 9c5eb24
java-tree-sitter/src/main/java/io/github/treesitter/jtreesitter/Tree.java
Line 98 in 9c5eb24
java-tree-sitter/src/main/java/io/github/treesitter/jtreesitter/Tree.java
Line 125 in 9c5eb24
The text was updated successfully, but these errors were encountered: