Picture of tsn
Registered 4 years 358 days
tsn Monday, 5 October 2020, 01:14 PM
App crashed in AppWebsocket's destructor
Hi guys,

Under some uncertain condition my app is crashed in AppWebsocket's destructor:

```
#1 0x0000000000486fc3 in AppWebsocket::~AppWebsocket (this=0x25c1130, __in_chrg=<optimized out>) at sdk/common/lib-cpp/appwebsocket.cpp:57
#2 0x0000000000496732 in AppUpdatesSession::~AppUpdatesSession (this=0x25c1130, __in_chrg=<optimized out>) at sdk/common/lib-cpp/app_updates.cpp:89
```

This happens immediately after my AppSession's destructor is finished.

I'm using the same implementation for App's session as you provide in default template. This happens from time to time and I can't find any patter of how to reproduce this issue.

Please let me know if you have any ideas where to look to better understand what is the reason of this issue.

Best regards,
Sergey
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Friday, 9 October 2020, 08:30 AM
Re: App crashed in AppWebsocket's destructor
Hi Sergey,

can you add Logs to the destructor/constructor/Close/TryClose of your session class and make sure, that you delete this class just once and in addition just if your session class received AppWebsocketClosed, not before.

Greetings,
Daniel
Picture of tsn
Registered 4 years 358 days
tsn Friday, 9 October 2020, 08:36 AM
Re: App crashed in AppWebsocket's destructor
Hi Daniel,

Thank you for your response. I'm using the same code which is generated from innovaphone's template. No modifications from my side.

But thank you for this suggestion, I will add more logs to see if this happens or not.

Thanks,
Sergey
Picture of tsn
Registered 4 years 358 days
tsn Wednesday, 2 December 2020, 08:14 PM
Re: App crashed in AppWebsocket's destructor
Hi Daniel,

I've traced my session implementation and it works just fine for any kind of session except the first, PBX, session. I call `delete` for PBX session object only once and each time it results in crash. I can't reproduce this issue with any tools I'm using to test my connection logic but this can be relatively easy to reproduce if I just try to stop my app instance in AP Manager.

I really stuck with this issue and any help will be very appreciated.

Please find attached stacktrace and core dump.

Will look forward to your feedback.

Best regards,
Sergey
70004.zip
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Thursday, 3 December 2020, 07:26 AM
Re: App crashed in AppWebsocket's destructor
Hi Sergey,

I created an internal case for this and assigned it to another developer.

Greetings,
Daniel
Picture of tsn
Registered 4 years 358 days
tsn Thursday, 3 December 2020, 10:12 AM
Re: App crashed in AppWebsocket's destructor
Hi Daniel,

Thank you for the update. WIll look forward for SR21.

Best regards,
Sergey
Picture of tsn
Registered 4 years 358 days
tsn Thursday, 3 December 2020, 10:22 AM
Re: App crashed in AppWebsocket's destructor
Sorry, I meant that I will look forward for new updates from this developer if he can find anything which I need to fix on my side.
← You can define your color theme preference here