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] Code restructure failed: missing block #699

Closed
bagipro opened this issue Jul 7, 2019 · 7 comments
Closed

[core] Code restructure failed: missing block #699

bagipro opened this issue Jul 7, 2019 · 7 comments
Labels
bug Core Issues in jadx-core module

Comments

@bagipro
Copy link
Collaborator

bagipro commented Jul 7, 2019

Checks before report

  • [+] check latest unstable build (maybe issue already fixed)
  • [+] search existing issues by exception message
    (for example JadxRuntimeException: Can't find immediate dominator for block)
  • [+] check Troubleshooting Q&A section on wiki

Describe error
Class com.grab.rewards.models.RewardCta

    /* JADX WARNING: Code restructure failed: missing block: B:8:0x0024, code lost:
        if (p343e.p345f.p347b.C5608m.m19673a((java.lang.Object) r2.smartlink, (java.lang.Object) r3.smartlink) != false) goto L_0x0029;
     */
    public boolean equals(java.lang.Object obj) {
        if (this != obj) {
            if (obj instanceof com.grab.rewards.models.RewardCta) {
                com.grab.rewards.models.RewardCta rewardCta = (com.grab.rewards.models.RewardCta) obj;
                if (p343e.p345f.p347b.C5608m.m19673a((java.lang.Object) this.launch, (java.lang.Object) rewardCta.launch)) {
                    if (p343e.p345f.p347b.C5608m.m19673a((java.lang.Object) this.download, (java.lang.Object) rewardCta.download)) {
                    }
                }
            }
            return false;
        }
        return true;
    }

I have a lot of errors in important methods, but they are super big, so I hope sometimes they will be fixed via such reports :)

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

@bagipro bagipro added bug Core Issues in jadx-core module labels Jul 7, 2019
@bagipro bagipro changed the title [core] Multi-variable type inference failed (simple test case #3) [core] Code restructure failed: missing block Jul 7, 2019
@bagipro
Copy link
Collaborator Author

bagipro commented Jul 7, 2019

#563 (comment) fixed, but second one not

Class com.valvesoftware.android.steam.community.fragment.TabbedSteamWebViewFragment

    /* JADX WARNING: Code restructure failed: missing block: B:3:0x000f, code lost:
        if (r0 != null) goto L_0x0013;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void onResume() {
        java.lang.String str;
        super.onResume();
        android.os.Bundle arguments = getArguments();
        if (arguments != null) {
            str = arguments.getString("category");
        }
        str = null;
        getCategoryUrlInfo(str);
    }

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

@LucienMP
Copy link

LucienMP commented Aug 7, 2019

Similar issues with another APK, tried latest build jadx-gui-1.0.0-b1130-c0194d02
APK: https://drive.google.com/open?id=17mhxKPy3T4xBtP2cDOyr8JbfPY_vVnva

@bagipro
Copy link
Collaborator Author

bagipro commented Sep 5, 2019

@skylot
Maybe you can fix this one before #662? Last commits fixed the most of such things, but not all, and such errors break method structure :(

@bagipro
Copy link
Collaborator Author

bagipro commented Oct 29, 2019

@skylot
Is that one super hard? I see a lot of bugs with Code restructure failed: missing block in huge important methods, but you probably won't pass to much time to inspect them, so I try to reproduce them via such small bugs

@bagipro
Copy link
Collaborator Author

bagipro commented Nov 2, 2019

@skylot
Has the issue been fixed in the last commit? I still see the same codes

@skylot
Copy link
Owner

skylot commented Nov 2, 2019

@sergey-wowwow
Sorry, still not fixed.
I fix return instructions duplication for the first case.
Second case needs to implement assign inlining inside complex 'if' conditions (see this test as example).

Anyway, I want to mention that Code restructure failed: missing block is not a specific issue it can be any decompilation issue which leads to missing code in the method. This warning printed by check executed after decompilation and can be triggered by many issues, thats why it occurs very often. Also, that check is the main reason why show inconsistent code option was added - because this check can wrongly trigger warning :(

@skylot
Copy link
Owner

skylot commented Nov 30, 2019

@sergey-wowwow I add assign inlining to fix the last case. This inlining is a little too aggressive for now, but I think it is better than error.

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

3 participants