Closed lubaoyilang closed 8 years ago
请多提供一些信息,比如log,崩溃的位置等。
崩溃在汇编信息这里,obj_release 这里 我这个Controller 是继承其他Controller 来的。 我做了尝试,新建一个工程,然后搞了多个Controller继承关系,用js来调用Viewdidload,没有问题 然后回到我们项目,调用这个崩溃的Controller其他的方法,比如一个 testFun(),也不会发生崩溃 但是只要调用 Controller 的 ViewdidLoad 或者 ViewdidApper 这些方法,就会崩溃。 可以帮忙一起来分析一下嘛?定位一下问题。
继承关系 UIViewController -> BaseViewController ->UFQLifeViewController
我基于 BaseViewController 来调用 也不会发生问题,但是只要用最顶层Controller 就会发生问题。 require('UIColor,UIAlertView,UIView'); defineClass('BaseViewController', { viewDidLoad: function() { self.super().viewDidLoad(); self.view().setBackgroundColor(UIColor.whiteColor()); self.setTitle("111"); self.initValue(); self.initView(); self.loadData();
},
});
有没有用 Aspect ?
没有。。。Aspect
可能是某些SDK里用了Aspects?可以先去掉 JSPatch,在你说的 ViewdidApper 方法上断点看看堆栈
require('UIColor,UIAlertView,UIView'); defineClass('UFQLifeViewController', { viewDidLoad: function() { self.super().viewDidLoad(); self.view().setBackgroundColor(UIColor.whiteColor()); self.setTitle("111"); self.initValue(); self.initView(); self.loadData();
});
调出崩溃,问题出在哪里呢?