Conversation
"SIGSEGV: Illegal storage access. (Attempt to read from nil?)"
aparently it forces nim to pass those structs as value (rather than sometimes as reference) so calling some functions was working fine (start waku, get my bundle), others were crashing the program (like creating a new conversation). Having said that probably the best solution is #64, feel free to close this one in favor of that. |
There was a problem hiding this comment.
Pull request overview
This PR fixes a segmentation fault (SIGSEGV) that occurred when starting a conversation in the logos-chatsdk-ui Nim application. The issue was caused by an ABI mismatch between Nim and Rust FFI types. The fix adds the {.bycopy.} pragma to all FFI object type definitions to ensure pass-by-value semantics match Rust's expectations.
Changes:
- Added
{.bycopy.}pragma to 9 FFI object type definitions in the Nim bindings to ensure proper ABI compatibility with Rust's#[repr(C)]structs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Getting this errors on
logos-chatsdk-uiwhen trying to start a conversation:"SIGSEGV: Illegal storage access. (Attempt to read from nil?)"