Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2480] SocketIO: Event handler GC leads to crash (iOS)

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-02-25T23:08:58.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterJan Vennemann
AssigneeJan Vennemann
Created2018-12-07T00:34:55.000+0000
Updated2019-02-25T23:09:13.000+0000

Description

For compatibility with the web client we have our own event listener methods on, once and off. Those do not properly protect the callback against GC so when the event listener is ultimately called and was already subject to GC the app will crash.

Comments

  1. Hans Knöchel 2018-12-07

    Thanks for creating the ticket Jan! If there is a workaround (e.g. by using callbacks directly), we could apply that temporarily to be unblocked from production. Thanks!
  2. Jan Vennemann 2018-12-07

    Try calling the proxy's addEventListener in addition to on or once and removeEventListener with off.. That should take care of properly storing the callback and protecting it against GC. I have a fix incoming which does exactly the same behind the scenes.
  3. Jan Vennemann 2019-02-25

    Fixed with version 2.0.0 of the socket.io module.

JSON Source