Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4908] TableView crash = JNI ERROR (app bug): weak global reference table overflow (max=51200)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionHold
Resolution Date2017-04-28T20:35:27.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelscrash, tableview
Reporterardy wongso
AssigneeShak Hossain
Created2017-04-17T09:54:17.000+0000
Updated2017-04-28T20:35:27.000+0000

Description

Table view crash after scrolling lots of row, it happen specially with Marshmallow device (I believe) even though I tried to nulling the view/image variable, or clean the table listing, it seems the global reference still there and keep increasing until certain point( maybe once it reach total 51200 as stated in error below), app will restarted. is there any way we can make this work or to clean the global reference, as my app is about data listing thanks. [INFO] : art: art/runtime/indirect_reference_table.cc:127] JNI ERROR (app bug): weak global reference table overflow (max=51200) [INFO] : art: art/runtime/indirect_reference_table.cc:127] weak global reference table dump: [INFO] : art: art/runtime/indirect_reference_table.cc:127] Last 10 entries (of 51200): [INFO] : art: art/runtime/indirect_reference_table.cc:127] 51199: 0x16fb65e0 ti.modules.titanium.ui.ImageViewProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] 51198: 0x15ac41c0 ti.modules.titanium.ui.ImageViewProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] 51197: 0x194be0a0 ti.modules.titanium.ui.ImageViewProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] 51196: 0x194befa0 ti.modules.titanium.ui.ImageViewProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] 51195: 0x194bef40 ti.modules.titanium.ui.ImageViewProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] 51194: 0x194beee0 ti.modules.titanium.ui.TableViewRowProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] 51193: 0x194bee80 ti.modules.titanium.ui.LabelProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] 51192: 0x194bee20 ti.modules.titanium.ui.LabelProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] 51191: 0x194bedc0 ti.modules.titanium.ui.LabelProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] 51190: 0x194bed60 ti.modules.titanium.ui.LabelProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] Summary: [INFO] : art: art/runtime/indirect_reference_table.cc:127] 2 of org.appcelerator.titanium.proxy.ActivityProxy (1 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 978 of ti.modules.titanium.ui.TableViewRowProxy (978 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 1 of ti.modules.titanium.ui.TableViewSectionProxy [INFO] : art: art/runtime/indirect_reference_table.cc:127] 19943 of ti.modules.titanium.ui.ImageViewProxy (19943 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 29907 of ti.modules.titanium.ui.LabelProxy (29907 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 2 of byte[] (16 elements) (2 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 2 of byte[] (100 elements) (2 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 3 of byte[] (288 elements) (3 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 3 of byte[] (576 elements) (3 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 6 of byte[] (1248 elements) (6 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 5 of byte[] (1296 elements) (5 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 3 of byte[] (1440 elements) (3 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 8 of byte[] (1560 elements) (8 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 5 of byte[] (2304 elements) (5 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 3 of byte[] (3600 elements) (3 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 4 of byte[] (4320 elements) (4 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 3 of byte[] (5016 elements) (3 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 3 of byte[] (6912 elements) (3 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 1 of byte[] (7912 elements) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 8 of byte[] (9216 elements) (8 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 2 of byte[] (12672 elements) (2 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 1 of byte[] (17280 elements) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 29 of byte[] (20736 elements) (29 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 2 of byte[] (21168 elements) (2 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 16 of byte[] (25344 elements) (16 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 27 of byte[] (26244 elements) (27 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 50 of byte[] (29952 elements) (50 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 1 of byte[] (32256 elements) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 1 of byte[] (32448 elements) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 2 of byte[] (34848 elements) (2 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 6 of byte[] (35344 elements) (6 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 127 of byte[] (36864 elements) (127 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 2 of byte[] (40000 elements) (2 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 3 of byte[] (46656 elements) (3 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 4 of byte[] (55296 elements) (4 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 4 of byte[] (73728 elements) (4 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 4 of byte[] (76032 elements) (4 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 1 of byte[] (82368 elements) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 5 of byte[] (82944 elements) (5 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 1 of byte[] (85264 elements) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 2 of byte[] (98136 elements) (2 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 10 of byte[] (140160 elements) (10 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 2 of byte[] (207936 elements) (2 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] 8 of byte[] (349056 elements) (8 unique instances) [INFO] : art: art/runtime/indirect_reference_table.cc:127] [INFO] : art: art/runtime/runtime.cc:368] Runtime aborting... [INFO] : art: art/runtime/runtime.cc:368]

Attachments

FileDateSize
app.js2017-04-21T01:37:12.000+00003759

Comments

  1. Hans Knöchel 2017-04-17

    Interesting, we fixed a very similar issue for 6.0.0 (TIMOB-15765). [~gmathews] did you see it somewhere since then?
  2. Gary Mathews 2017-04-20

    [~hansknoechel] Nope, I tested [this](https://archive.appcelerator.com/question/158112/reference-table-overflow-on-select-all-for-tableview-android#comment-193627) on my S7 and 6.0 emulator and I could not reproduce the issue. Maybe [~lchoudhary] could test on an S5?
  3. ardy wongso 2017-04-21

    Hi, I test it on google nexus 6p and it crash, I attach a simple code of tableview, each row has 50 component, and believe me it will crash around row 1.1k, (because 51200 / 50 = 1024) I know the code looks stupid, but even though you clean the object on row 500 or close the app on row 500, than re-open the app, still app will crash once it reach accumulation of 51200 (means around row 600 on second time app open it will crash) Please check the code attached
  4. Hans Knöchel 2017-04-23

    I noticed you are using the Ti.UI.TableView instead of the Ti.UI.ListView. Using the latter one will give you a huge performance boost, because the row is defined by templates, not by real proxy-references. Pretty sure it won't crash with ListView. Check out [the docs|docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListView] for more info on how to use it and for which use-cases it is made.
  5. Sharif AbuDarda 2017-04-27

    Hello [~dyan02], Can you follow up on Han's comment there? [Listview](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListView) should give a better performance.
  6. ardy wongso 2017-04-28

    Hi thanks for the response, Ya, I already switch from tableview to listview, and it is giving me better performance So if you think the tableview issue is not a bug then you may close this issue. Thanks.

JSON Source