Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when fetching more messages #5353

Closed
0x-r4bbit opened this issue Apr 5, 2022 · 2 comments · Fixed by #5541
Closed

App crashes when fetching more messages #5353

0x-r4bbit opened this issue Apr 5, 2022 · 2 comments · Fixed by #5541
Assignees
Labels
bug Something isn't working

Comments

@0x-r4bbit
Copy link
Member

This is something that first came up during testing the community history archive protocol, which is why I thought the crash is related to those changes. However it turns out this crash is reproducable when there's not community history archive in play at all.

Here's how it happens:

  1. Create a community
  2. Create a channel
  3. Send some messages to that channel (although, possible this isn't necessary)
  4. Invite someone to that community
  5. Login as that someone, join the community
  6. Enter the channel, and click "Fetch more messages"

The app crashes with:

Traceback (most recent call last)
/home/rabbit/projects/status-im/status-desktop/src/nim_status_client.nim(164) nim_status_client
/home/rabbit/projects/status-im/status-desktop/src/nim_status_client.nim(161) mainProc
/home/rabbit/projects/status-im/status-desktop/vendor/nimqml/src/nimqml/private/qguiapplication.nim(29) exec
/home/rabbit/projects/status-im/status-desktop/vendor/nimqml/src/nimqml/private/qobject.nim(49) qobjectCallback
/home/rabbit/projects/status-im/status-desktop/vendor/nimqml/src/nimqml/private/qobject.nim(34) onSlotCalled
/home/rabbit/projects/status-im/status-desktop/vendor/nimbus-build-system/vendor/Nim/lib/core/macros.nim(587) onSlotCalled
/home/rabbit/projects/status-im/status-desktop/src/app/modules/main/chat_section/chat_content/messages/view.nim(152) requestMoreMessages
/home/rabbit/projects/status-im/status-desktop/src/app/modules/main/chat_section/chat_content/messages/io_interface.nim(112) requestMoreMessages
/home/rabbit/projects/status-im/status-desktop/src/app/modules/main/chat_section/chat_content/messages/module.nim(474) requestMoreMessages
/home/rabbit/projects/status-im/status-desktop/src/app/modules/main/chat_section/chat_content/messages/controller.nim(245) requestMoreMessages
/home/rabbit/projects/status-im/status-desktop/src/app_service/service/mailservers/service.nim(83) requestMoreMessages
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
make: *** [Makefile:582: run-linux] Segmentation fault (core dumped)

Notice how the stack trace says that it fails at requestMoreMessages.
This calls SyncChatFromSyncedFrom in status-go.
I tried debugging this but it's kinda hard. The moment the fetch more button is clicked the app crashes even ignoring logs.

One important note:
When restarting the app (as that invited someone) and entering the channel again, hitting the "fetch more messages" button now doesn't crash it anymore.
So this seems to be only an issue upon recent community invite...

@0x-r4bbit 0x-r4bbit added the bug Something isn't working label Apr 5, 2022
@0x-r4bbit
Copy link
Member Author

Happy to investigate this further, but will work on landing status-im/status-go#2576 and status-im/status-go#2585

@0x-r4bbit
Copy link
Member Author

Noticed that the exact same thing happens after importing a community (and then trying to fetch more messages)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants