Opened on 01/22/2015 at 01:22:14 PM

Closed on 02/04/2015 at 01:05:03 PM

Last modified on 02/06/2015 at 12:50:49 PM

#1848 closed defect (fixed)

Clean up local reference handling

Reported by: rjeschke Assignee: rjeschke
Priority: P1 Milestone: Adblock-Plus-for-Android-1.3
Module: Adblock-Plus-for-Android Keywords:
Cc: Blocked By:
Blocking: Platform: Android
Ready: yes Confidential: no
Tester: Verified working:
Review URL(s):

Description (last modified by rjeschke)

With Android 5.x a new type of errors is popping up: local reference table overflows. This error always results in an application crash.

This bug is caused by holding JNI created Java references for too long. It's strange that this didn't cause any errors before 5.x, but now we have to deal with it.

The solution for this is pretty simple (but time consuming):

We will need to go through all JNI methods and dispose local references as soon as we don't need them anymore. To reduce code clutter we should implement this using a Push-/PopLocalFrame RAII wrapper for methods that do not return or pass objects, and RAII wrappers for single references in cases where we need a finer grained control over when to dispose stuff.

Attachments (0)

Change History (5)

comment:1 Changed on 01/22/2015 at 01:23:20 PM by rjeschke

  • Description modified (diff)

comment:2 Changed on 01/22/2015 at 06:54:32 PM by rjeschke

  • Review URL(s) modified (diff)

comment:3 Changed on 01/30/2015 at 10:55:36 AM by rjeschke

  • Status changed from new to reviewing

comment:4 Changed on 02/04/2015 at 01:05:03 PM by rjeschke

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:5 Changed on 02/06/2015 at 12:50:49 PM by rjeschke

  • Milestone set to Adblock-Plus-for-Android-1.3

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from rjeschke.
Note: See TracTickets for help on using tickets.