Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java finalize test fails with release variant when installed from Android Studio #1061

Closed
mhsmith opened this issue Dec 23, 2023 · 0 comments
Labels
Milestone

Comments

@mhsmith
Copy link
Member

mhsmith commented Dec 23, 2023

First run:

finalize_(com.chaquo.java.PyObjectTest)
com.chaquo.python.PyException: AssertionError: Not triggered after 1.0 seconds
	at <python>.unittest.case.fail(case.py:753)
	at <python>.chaquopy.test.pyobjecttest.assertTriggered(pyobjecttest.py:36)
	at <python>.chaquopy_java.call(chaquopy_java.pyx:354)
	at <python>.chaquopy_java.Java_com_chaquo_python_PyObject_callAttrThrowsNative(chaquopy_java.pyx:326)
	at com.chaquo.python.PyObject.callAttrThrowsNative(Native Method)
	at com.chaquo.python.PyObject.callAttrThrows(PyObject.java:232)
	at com.chaquo.python.PyObject.callAttr(PyObject.java:221)
	at com.chaquo.java.PyObjectTest.finalize_(PyObjectTest.java:827)

Second run:

com.chaquo.python.PyException: AssertionError: False != True
	at <python>.unittest.case._baseAssertEqual(case.py:905)
	at <python>.unittest.case.assertEqual(case.py:912)
	at <python>.chaquopy.test.pyobjecttest.assertTriggered(pyobjecttest.py:30)
	at <python>.chaquopy_java.call(chaquopy_java.pyx:354)
	at <python>.chaquopy_java.Java_com_chaquo_python_PyObject_callAttrThrowsNative(chaquopy_java.pyx:326)
	at com.chaquo.python.PyObject.callAttrThrowsNative(Native Method)
	at com.chaquo.python.PyObject.callAttrThrows(PyObject.java:232)
	at com.chaquo.python.PyObject.callAttr(PyObject.java:221)
	at com.chaquo.java.PyObjectTest.finalize_(PyObjectTest.java:824)

This happens when the release variant is installed with the Android Studio play button, but it doesn't happen with the release build of the demo app from GitHub Actions, installed with adb. And it didn't happen in any previous release where I built the demo app with the "Generate Signed APK" command.

It happens with Chaquopy 15.0.1, on:

  • Pixel 7 with API level 34
  • ARM64 emulator on API levels 24, 27, 33 and 34, but NOT 21

And with a random local build of Chaquopy from early December 2023, on:

  • x86_64 emulator on API level 34

The current demo app can't build against any older Chaquopy version because it uses the new DSL, but if I build the 14.0.2 version of the demo app (complete with older AGP version and everything associated with that) against the Maven Central build of Chaquopy 14.0.2, I cannot reproduce the problem at all.

@mhsmith mhsmith added the bug label Dec 23, 2023
@mhsmith mhsmith modified the milestones: 15.1, 15.0 Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant