rovo89 / android_art

Android ART with modifications for the Xposed framework.
Other
375 stars 211 forks source link

Strange app crash #43

Open shakalaca opened 8 years ago

shakalaca commented 8 years ago

The following lines will crash in Android 5.0 (API 21) with XposedFramework v80+ but work fine without XposedFramework installed. Crash log is here: http://pastebin.com/Hp5mNT5F

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    t(new AccelerateInterpolator());
}

private void t(BaseInterpolator a) {   
    Log.d("TEST", "here");
}

After spent an hour inspecting the code, I found out if I don't return nullptr here: https://github.com/rovo89/android_art/blob/0e430fac43f36689cefa923d0a6b4cce76206b73/compiler/dex/verified_method.cc#L64 the sample code above will run without problem. I'm not familiar with this area, if someone can help fix the problem, I'd appreciate it. :)

Liliniser commented 8 years ago

I had the same problem and reverting the commit 0e430fac43f36689cefa923d0a6b4cce76206b73 helped.

rovo89 commented 8 years ago

It's good to know that this line is triggering the issue. Obviously, I didn't add this commit just for fun, so I'll need to check why GenerateDequickenMap() fails in this case.

rovo89 commented 8 years ago

It seems that BaseInterpolator isn't even supported on API 21, it was added in API 22: https://developer.android.com/reference/android/view/animation/BaseInterpolator.html

I need to check why/how this case can be handled in AOSP ART, but the real root cause seems to be in your code. See also: http://stackoverflow.com/questions/34879343/baseinterpolator-cannot-be-resolved-to-a-type