Open anastasiyaig opened 4 weeks ago
@jrainville @alexjba any help here is very welcome , to find the place where this crash is actually happening it happens more often on wallet screen (adding accounts or editing them) and it also happens (a bit rarely) in tests that are creating community / community channels
This issue is very weird.
The crash happens when parsing the chats of the curated community, specifically the Status community. However, it only crashes if a wallet account was added prior to that. If I just open a new account and let the curated communities load while not doing anything, it doesn't crash.
It also doesn't crash on the same chat each time, so it doesn't seem related to any specific property. Sometimes it crashes when returning the ChatDto, sometimes when just manipulating the chatsObj
.
It feels very similar to the other crash we had with spectating a community after leaving, where it crashed when returning. https://github.com/status-im/status-desktop/issues/15848 Looking at the stack trace, I see mentions of the curated communities, so it might be the same indeed.
I tried putting a try/catch
around it and it doesn't catch it, it crashes anyway.
I commented the whole chat parsing part and that worked. I was wondering if maybe it would crash in a later parsing section if the issue was just a delayed panic, but no, it seems to be ok. However, we need that code block, so we can't just remove it.
I'm a bit at a loss for solutions. If it failed on a missing condition, it would be easy, but it crashes in different spots each times.
Can a property be garbage collected during the run time of a function? Since in both cases it seemed to happen after the DB was written to, could that be a clue? I don't see the connection, since the DB is in Go and the Nim code doesn't even access it, but it's the only thing linking those events.
maybe @igor-sirotin can look at it ? or @osmaczko
i also dont know how really possible to see this issue for real users but for tests its really a blocker it seems
i also dont know how really possible to see this issue for real users but for tests its really a blocker it seems
Indeed, it seems very edgecase, since in this particular scenario, you need to have a new account, create a new wallet account, all that before the Status community loads.
Though we have historical proof that it happened before. Also, if it makes the tests flaky, it would be good to fix it
For posterity, this is where the crash happens, though like I said, it happens in differences spots inside that code block: https://github.com/status-im/status-desktop/blob/ca1182e3f9f20f8ff345af42263063b86ecb9108/src/app_service/service/community/dto/community.nim#L486-L489
Bug Report
Description
It looks like application shuts down itself when tests are adding / editing / removing accounts. It happens randomly. When that happens, test fails and after that - it cant proceed with retry, as it feels like the appImage is irresponsive for some time. So Squish opens the app again, resizes the window (means it is attached to application) but then it cant click anywhere and fails.
Steps to reproduce
Seems i cant reproduce manually, but autotests can replicate it easily. Tests in PRs are failing with meaningless
Acknowledge checkbox was not checked
error which is the result of the problem: app is dead for first test attempt and then its cant continue for some time. After some attempts, tests can continue running furtherLog when this problem occurs:
data_attachments_88c7414071434e0a.txt
I would appreciate any help in debugging this issue as this breaks tests a lot. Also, maybe we can add some extra logging / output for nim calls
I was also able to reproduce on mac and it looks app crashes indeed:
crash report.txt
Additional Information