Skip to content

Android app crashes when Table contains too many cells #1392

Description

@t-arn

On Android, the app crashes when there is a Table that contains too many cells

To Reproduce
Steps to reproduce the behavior:

  1. Use the Toga example "table" as of [1198c0f]
  2. Create the Android build
  3. Run the example on the Android emulator

Expected behavior
The code should check if the max amount of cells would be exceeded (how much is this??)
If yes, the table should not be created and
an exception should be raised (is that what we want?)

Logcat

org.beeware.table D/Python: Running 'table' as __main__...
org.beeware.table W/g.beeware.table: type=1400 audit(0.0:202): avc: denied { read } for name="/" dev="dm-0" ino=2 scontext=u:r:untrusted_app:s0:c96,c256,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0
org.beeware.table W/g.beeware.tabl: Accessing hidden method Ljava/io/FileDescriptor;->setInt$(I)V (light greylist, JNI)
org.beeware.table I/Python: Python app launched & stored in Android Activity class
org.beeware.table I/Python: [Android] Not implemented: Widget.set_hidden()
org.beeware.table I/chatty: uid=10096(org.beeware.table) identical 1 line
org.beeware.table I/Python: [Android] Not implemented: Widget.set_hidden()
org.beeware.table I/Python: WARNING: Using empty string for missing value in data. Define a 'missing_value' on the table to silence this message
org.beeware.table W/System: A resource failed to call close. 
org.beeware.table I/Python: [Android] Not implemented: Widget.set_hidden()
org.beeware.table I/g.beeware.tabl: NativeAlloc concurrent copying GC freed 7313(541KB) AllocSpace objects, 0(0B) LOS objects, 20% free, 23MB/29MB, paused 295us total 102.449ms
org.beeware.table I/g.beeware.tabl: Background concurrent copying GC freed 16509(1382KB) AllocSpace objects, 0(0B) LOS objects, 17% free, 28MB/34MB, paused 328us total 136.771ms
org.beeware.table I/g.beeware.tabl: NativeAlloc concurrent copying GC freed 8091(728KB) AllocSpace objects, 0(0B) LOS objects, 16% free, 30MB/36MB, paused 287us total 145.263ms
org.beeware.table A/g.beeware.tabl: java_vm_ext.cc:641] JNI ERROR (app bug): global reference table overflow (max=51200)global reference table dump:

Environment:

  • Operating System: Android
  • Python version: 3.8 (but probably on all versions)
  • Software versions:
    • Briefcase: 0.3.5
    • Toga: 0.3.0.dev30 [1198c0f]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidThe issue relates to Android mobile support.bugA crash or error in behavior.

    Projects

    Status
    Needs design

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions