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.lang.VerifyError: Rejecting class processing.a2d.PSurfaceAndroid2D #748

Open
rvispute opened this issue Jul 23, 2023 · 7 comments
Open

Comments

@rvispute
Copy link

Getting following error after updating to 4.5.1 from 4.5.0b5.
On 4.5 beta 5 application was building and loading on device.
on 4.5.1 the build is successful but the app crashes at the start on the device and following error message is displayed on IDE console.

FATAL EXCEPTION: main
Process: processing.test.wifircesp32, PID: 17183
java.lang.VerifyError: Rejecting class processing.a2d.PSurfaceAndroid2D that attempts to sub-type erroneous class processing.core.PSurfaceNone (declaration of 'processing.a2d.PSurfaceAndroid2D' appears in /data/app/~~qrWxfXdcaxKOVnDrKVlvpg==/processing.test.wifircesp32-hUXCyiGCZyRROhlxxgXnlA==/base.apk)
at processing.a2d.PGraphicsAndroid2D.createSurface(PGraphicsAndroid2D.java:180)
at processing.core.PApplet.initSurface(PApplet.java:538)
at processing.android.PFragment.onCreateView(PFragment.java:149)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:518)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3138)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3072)
at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:251)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:502)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:251)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1435)
at android.app.Activity.performStart(Activity.java:8018)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3457)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.VerifyError: Verifier rejected class processing.core.PSurfaceNone: android.content.Context processing.core.PSurfaceNone.getContext() failed to verify: android.content.Context processing.core.PSurfaceNone.getContext(): [0x22] can't resolve returned type 'Reference: android.content.Context' or 'Unresolved Reference: android.support.wearable.watchface.WatchFaceService' (declaration of 'processing.core.PSurfaceNone' appears in /data/app/~~qrWxfXdcaxKOVnDrKVlvpg==/processing.test.wifircesp32-hUXCyiGCZyRROhlxxgXnlA==/base.apk)
... 28 more

@rvispute rvispute changed the title kava.lang.VerifyError: Rejecting class processing.a2d.PSurfaceAndroid2D java.lang.VerifyError: Rejecting class processing.a2d.PSurfaceAndroid2D Jul 23, 2023
@ranaaditya
Copy link
Member

Getting following error after updating to 4.5.1 from 4.5.0b5. On 4.5 beta 5 application was building and loading on device. on 4.5.1 the build is successful but the app crashes at the start on the device and following error message is displayed on IDE console.

FATAL EXCEPTION: main Process: processing.test.wifircesp32, PID: 17183 java.lang.VerifyError: Rejecting class processing.a2d.PSurfaceAndroid2D that attempts to sub-type erroneous class processing.core.PSurfaceNone (declaration of 'processing.a2d.PSurfaceAndroid2D' appears in /data/app/~~qrWxfXdcaxKOVnDrKVlvpg==/processing.test.wifircesp32-hUXCyiGCZyRROhlxxgXnlA==/base.apk) at processing.a2d.PGraphicsAndroid2D.createSurface(PGraphicsAndroid2D.java:180) at processing.core.PApplet.initSurface(PApplet.java:538) at processing.android.PFragment.onCreateView(PFragment.java:149) at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:518) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002) at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3138) at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3072) at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:251) at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:502) at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:251) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1435) at android.app.Activity.performStart(Activity.java:8018) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3457) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7664) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) Caused by: java.lang.VerifyError: Verifier rejected class processing.core.PSurfaceNone: android.content.Context processing.core.PSurfaceNone.getContext() failed to verify: android.content.Context processing.core.PSurfaceNone.getContext(): [0x22] can't resolve returned type 'Reference: android.content.Context' or 'Unresolved Reference: android.support.wearable.watchface.WatchFaceService' (declaration of 'processing.core.PSurfaceNone' appears in /data/app/~~qrWxfXdcaxKOVnDrKVlvpg==/processing.test.wifircesp32-hUXCyiGCZyRROhlxxgXnlA==/base.apk) ... 28 more

hi @rvispute which java version are you using ?

@Entropy159
Copy link

I have this same problem. I'm not sure how to check my java version...

@Psudonem
Copy link

I have the same problem. It was working a few days ago, but suddenly I can't make android apps anymore.

@codeanticode
Copy link
Member

@Psudonem @Entropy159 @rvispute what version of Processing are you using?

@codeanticode codeanticode added this to the 4.6 bugfixes milestone Oct 30, 2023
@ninzhan
Copy link

ninzhan commented Dec 4, 2023

Running into this same problem. Stack is basically the same running Processing 4.3 with Open JDK 21.0.1. Device was a Moto g Stylus if that helps.

@Entropy159
Copy link

I think I used processing 4.3, and I trying it on a moto g power 2021. Works fine in the emulator though

@VSMent
Copy link

VSMent commented Mar 24, 2024

Same happening for me.
Genymotion API 21 emulator and API 33 physical device work fine, but Genymotion API 30 emulator fails.
processing-core v411


UPD:
processing-core v408 - v411 fails to launch with the error
processing-core v407 - works on all 21/30/33 APIs


UPD 2:
Same issue was reported in #729

@codeanticode codeanticode removed this from the 4.6 bugfixes milestone Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants