混淆后的bugly报错分析

Posted 汤米粥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了混淆后的bugly报错分析相关的知识,希望对你有一定的参考价值。

bugly日志信息解读示例:

Attempt to invoke interface method 'java.util.ArrayList h.i.a.c.a.a(h.i.a.c.d.e)' on a null object reference

Attempt to invoke virtual method 'android.view.ViewTreeObserver android.widget.FrameLayout.getViewTreeObserver()' on a null object reference

总结规律:
上面两个例子都是'ClassA xxx.xxx.xxx()'表示是xxx.xxx.xxx方法出异常了,
这个方法的返回值是ClassA

根据这个规律我们分析这个异常:
Attempt to invoke interface method 'com.maka.app.postereditor.data.PageData com.maka.app.postereditor.editor.f.N()' on a null object reference com.maka.app.h5editor.ui.activity.H5EditorActivity.R0(SourceFile:1)

应该是H5EditorActivity类里com.maka.app.postereditor.editor.f.N() editor.f 表示f类的N方法出错了,而且这方法的返回值是PageData

我们先在H5EditorActivity的import里找com.maka.app.postereditor.editor这个目录里有哪些类,找到这些:
import com.maka.app.postereditor.editor.EditorConfigView;
import com.maka.app.postereditor.editor.EditorController;
import com.maka.app.postereditor.editor.IEditorView;
import com.maka.app.postereditor.editor.base.EditorHelper;
import com.maka.app.postereditor.editor.bg.BgEditConfigView;
import com.maka.app.postereditor.editor.group.GroupEditorConfigView;
import com.maka.app.postereditor.editor.image.ImageEditorConfigView;
import com.maka.app.postereditor.editor.layer.LayerConfigView;
import com.maka.app.postereditor.editor.shape.ShapeEditorConfigView;
import com.maka.app.postereditor.editor.text.TextEditorConfigView;

再找上面类中有哪个类在H5EditorActivity中调用了一个返回值为PageData的方法,排查这上面几个接口和类,发现只有EditorController这个接口的   PageData getSelectedPage();方法是返回PageData对象的。所以应该是H5EditorActivty里的mEditorController.getSelectPage方法报的错。
至些错误已经定位到,bug修复。

以上是关于混淆后的bugly报错分析的主要内容,如果未能解决你的问题,请参考以下文章

结合程序崩溃后的core文件分析bug

!OpenResty HTTP库 request_uri方法set_keepalive报错源码中的BUG分析

子查询引起的oracle数据库bug分析

全网首发:ScrollBarUI混淆后效果错误的分析

python 的混淆后的代码可以还原么

使用 Proguard 混淆后的 SuperNotCalledException