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] Regions count limit reached for a small method #876

Closed
bagipro opened this issue Mar 1, 2020 · 1 comment
Closed

[core] Regions count limit reached for a small method #876

bagipro opened this issue Mar 1, 2020 · 1 comment
Labels
bug Core Issues in jadx-core module

Comments

@bagipro
Copy link
Collaborator

bagipro commented Mar 1, 2020

Hi, I've noticed that method android.support.v4.content.ModernAsyncTask.executeOnExecutor method is not decompiled, it's source https://android.googlesource.com/platform/frameworks/support/+/android-support-lib-19.1.0/v4/java/android/support/v4/content/ModernAsyncTask.java#404

But decompiled to

    /*  JADX ERROR: JadxOverflowException in pass: RegionMakerVisitor
        jadx.core.utils.exceptions.JadxOverflowException: Regions count limit reached
        	at jadx.core.utils.ErrorsCounter.addError(ErrorsCounter.java:47)
        	at jadx.core.utils.ErrorsCounter.methodError(ErrorsCounter.java:81)
        */
    /* JADX WARNING: Removed duplicated region for block: B:4:0x0013  */
    /* JADX WARNING: Removed duplicated region for block: B:6:0x001b  */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x0023  */
    public final android.support.v4.content.ModernAsyncTask<Params, Progress, Result> executeOnExecutor(java.util.concurrent.Executor r3, Params... r4) {
        /*
            r2 = this;
            android.support.v4.content.ModernAsyncTask$Status r0 = r2.mStatus
            android.support.v4.content.ModernAsyncTask$Status r1 = android.support.v4.content.ModernAsyncTask.Status.PENDING
            if (r0 == r1) goto L_0x002b
            int[] r3 = android.support.v4.content.ModernAsyncTask.C04244.$SwitchMap$androidx$loader$content$ModernAsyncTask$Status
            android.support.v4.content.ModernAsyncTask$Status r4 = r2.mStatus
            int r4 = r4.ordinal()
            r3 = r3[r4]
            switch(r3) {
                case 1: goto L_0x0023;
                case 2: goto L_0x001b;
                default: goto L_0x0013;
            }
        L_0x0013:
            java.lang.IllegalStateException r3 = new java.lang.IllegalStateException
            java.lang.String r4 = "We should never reach this state"
            r3.<init>(r4)
            throw r3
        L_0x001b:
            java.lang.IllegalStateException r3 = new java.lang.IllegalStateException
            java.lang.String r4 = "Cannot execute task: the task has already been executed (a task can be executed only once)"
            r3.<init>(r4)
            throw r3
        L_0x0023:
            java.lang.IllegalStateException r3 = new java.lang.IllegalStateException
            java.lang.String r4 = "Cannot execute task: the task is already running."
            r3.<init>(r4)
            throw r3
        L_0x002b:
            android.support.v4.content.ModernAsyncTask$Status r0 = android.support.v4.content.ModernAsyncTask.Status.RUNNING
            r2.mStatus = r0
            r2.onPreExecute()
            android.support.v4.content.ModernAsyncTask$WorkerRunnable<Params, Result> r0 = r2.mWorker
            r0.mParams = r4
            java.util.concurrent.FutureTask<Result> r4 = r2.mFuture
            r3.execute(r4)
            return r2
        */
        throw new UnsupportedOperationException("Method not decompiled: android.support.v4.content.ModernAsyncTask.executeOnExecutor(java.util.concurrent.Executor, java.lang.Object[]):android.support.v4.content.ModernAsyncTask");
    }

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

@bagipro bagipro added bug Core Issues in jadx-core module labels Mar 1, 2020
@bagipro
Copy link
Collaborator Author

bagipro commented Mar 17, 2020

Fixed, thanks!

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

1 participant