Skip to content

fix: sigsegv on starting a conversation#63

Open
plopezlpz wants to merge 2 commits intomainfrom
fix/sigsegv
Open

fix: sigsegv on starting a conversation#63
plopezlpz wants to merge 2 commits intomainfrom
fix/sigsegv

Conversation

@plopezlpz
Copy link

Getting this errors on logos-chatsdk-ui when trying to start a conversation:

"SIGSEGV: Illegal storage access. (Attempt to read from nil?)"

"SIGSEGV: Illegal storage access. (Attempt to read from nil?)"
@plopezlpz plopezlpz requested review from jazzz and osmaczko February 24, 2026 11:35
Copy link
Collaborator

@jazzz jazzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue currently has two proposed solutions: #62 and #64

I don't immediately see how {.bycopy.} directly solves the issue. Perhaps I am missing something though.

@plopezlpz
Copy link
Author

plopezlpz commented Feb 24, 2026

This issue currently has two proposed solutions: #62 and #64

I don't immediately see how {.bycopy.} directly solves the issue. Perhaps I am missing something though.

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants