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

[core] IF instruction can be used only in fallback mode #710

Closed
bagipro opened this issue Jul 11, 2019 · 1 comment
Closed

[core] IF instruction can be used only in fallback mode #710

bagipro opened this issue Jul 11, 2019 · 1 comment
Labels
bug Core Issues in jadx-core module

Comments

@bagipro
Copy link
Collaborator

bagipro commented Jul 11, 2019

Checks before report

Describe error
File com/paypal/android/foundation/notifications/model/BaseNotificationPreference.java

    /*  JADX ERROR: IF instruction can be used only in fallback mode
        jadx.core.utils.exceptions.CodegenException: IF instruction can be used only in fallback mode
        	at jadx.core.codegen.InsnGen.fallbackOnlyInsn(InsnGen.java:571)
        	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:477)
        	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:242)
        	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:213)
        	at jadx.core.codegen.RegionGen.makeSimpleBlock(RegionGen.java:109)
        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:55)
        	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
        	at jadx.core.codegen.RegionGen.makeRegionIndent(RegionGen.java:98)
        	at jadx.core.codegen.RegionGen.makeTryCatch(RegionGen.java:311)
        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:68)
        	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
        	at jadx.core.codegen.MethodGen.addRegionInsns(MethodGen.java:210)
        	at jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:203)
        	at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:315)
        	at jadx.core.codegen.ClassGen.addMethods(ClassGen.java:261)
        	at jadx.core.codegen.ClassGen.addClassBody(ClassGen.java:224)
        	at jadx.core.codegen.ClassGen.addClassCode(ClassGen.java:109)
        	at jadx.core.codegen.ClassGen.makeClass(ClassGen.java:75)
        	at jadx.core.codegen.CodeGen.wrapCodeGen(CodeGen.java:44)
        	at jadx.core.codegen.CodeGen.generateJavaCode(CodeGen.java:32)
        	at jadx.core.codegen.CodeGen.generate(CodeGen.java:20)
        	at jadx.core.ProcessClass.process(ProcessClass.java:36)
        	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311)
        	at jadx.api.JavaClass.decompile(JavaClass.java:62)
        	at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:217)
        */
    /* JADX WARNING: Code restructure failed: missing block: B:5:0x002b, code lost:
        r0 = new com.paypal.android.foundation.notifications.model.NotificationPreferenceAdditionalProperties(r4.getJSONObject("additionalProperties"), r5);
     */
    protected BaseNotificationPreference(org.json.JSONObject r4, com.paypal.android.foundation.core.model.ParsingContext r5) {
        /*
            r3 = this;
            r3.<init>(r4, r5)
            java.lang.String r0 = "status"
            java.lang.Object r0 = r3.getObject(r0)
            com.paypal.android.foundation.notifications.model.NotificationPreferenceStatus r0 = (com.paypal.android.foundation.notifications.model.NotificationPreferenceStatus) r0
            r3.status = r0
            java.lang.String r0 = "type"
            java.lang.Object r0 = r3.getObject(r0)
            com.paypal.android.foundation.notifications.model.NotificationPreferenceType r0 = (com.paypal.android.foundation.notifications.model.NotificationPreferenceType) r0
            r3.type = r0
            r0 = 0
            java.lang.String r1 = "additionalProperties"
            boolean r1 = r4.has(r1)     // Catch:{ JSONException -> 0x002c }
            if (r1 == 0) goto L_0x002c     // Catch:{ JSONException -> 0x002c }
            com.paypal.android.foundation.notifications.model.NotificationPreferenceAdditionalProperties r1 = new com.paypal.android.foundation.notifications.model.NotificationPreferenceAdditionalProperties     // Catch:{ JSONException -> 0x002c }
            java.lang.String r2 = "additionalProperties"     // Catch:{ JSONException -> 0x002c }
            org.json.JSONObject r4 = r4.getJSONObject(r2)     // Catch:{ JSONException -> 0x002c }
            r1.<init>(r4, r5)     // Catch:{ JSONException -> 0x002c }
            r0 = r1
        L_0x002c:
            r3.notificationPreferenceAdditionalProperties = r0
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.paypal.android.foundation.notifications.model.BaseNotificationPreference.<init>(org.json.JSONObject, com.paypal.android.foundation.core.model.ParsingContext):void");
    }

APK: https://drive.google.com/file/d/1CSo_sZ71WsM3WvGw2VzG7xnkqpUO3GSJ/view?usp=sharing

@bagipro bagipro added bug Core Issues in jadx-core module labels Jul 11, 2019
@skylot
Copy link
Owner

skylot commented Jul 20, 2019

Fixed. Thanks, that was a fresh regression 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

2 participants