sol2 icon indicating copy to clipboard operation
sol2 copied to clipboard

Crash during destruction when using meta_function::new_index and coroutines

Open Maddimax opened this issue 10 months ago • 0 comments

I attached a reproduction example to the ticket: main.cpp.txt

The example crashes during the m_entries.clear(); in the ~MyDynamic() destructor.

The crash only occurs if the test() function is started as a coroutine.

I sadly don't know enough about lua to see if this is a problem with lua itself, or something in sol2. Any help/hints would be greatly appreciated.

Build and reproduced on macOS 14,

clang++ --version                                                                                                                                              e0bb8f0 ✭ ✱ ◼
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Maddimax avatar Apr 04 '24 11:04 Maddimax