V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
feihu
V2EX  ›  iDev

有人碰到过下面的crash没?在调用UIImage的intiWithContentsOfFile,会crash到PandaHome(91助手)里面去。如何避免这种Crash

  •  
  •   feihu · 2013-07-18 09:47:22 +08:00 · 5522 次点击
    这是一个创建于 3935 天前的主题,其中的信息可能已经有所发展或是发生改变。
    0 libobjc.A.dylib 0x343bc5aa objc_msgSend (in libobjc.A.dylib) + 10
    1 PandaHome 0x019b0c02 0x019a6000 + 44034
    2 PandaHome 0x019b2454 0x019a6000 + 50260
    3 PandaHome 0x019b00c6 0x019a6000 + 41158
    4 UIKit 0x3361cefc ImageRefAtPath (in UIKit) + 300
    5 UIKit 0x33662b1e _UIImageRefAtPath (in UIKit) + 402
    6 PandaHome 0x019afe52 0x019a6000 + 40530
    7 UIKit 0x3366291e -[UIImage initWithContentsOfFile:] (in UIKit) + 58
    第 1 条附言  ·  2013-07-18 10:52:33 +08:00
    换个图片的生成函数可能能避免,但是我比较好奇:
    1、为什么会跑到PandaHome去。
    2、这个有什么方式实现吗?
    14 条回复    1970-01-01 08:00:00 +08:00
    alexrezit
        1
    alexrezit  
       2013-07-18 09:52:10 +08:00
    真奇葩... 越狱了?
    txx
        2
    txx  
       2013-07-18 09:53:40 +08:00 via iPhone
    是这个init 不能用了的意思么。还是特殊的路径 才会出问题
    feihu
        3
    feihu  
    OP
       2013-07-18 10:31:15 +08:00
    @alexrezit 是越狱了。crash的次数还挺多。
    @txx 图片路径其实是程序自带的一张图片。不是百分百crash。跟路径应该没有关系。
    sumanx
        4
    sumanx  
       2013-07-18 11:17:30 +08:00
    目测不是你的程序的问题,是91的问题
    gonefish
        5
    gonefish  
       2013-07-18 13:40:41 +08:00
    越狱设备经常有这种问题,SogouInput应该更多吧
    feihu
        6
    feihu  
    OP
       2013-07-18 15:17:08 +08:00
    @gonefish sogou是不少,但是那个控制不了,我现在就是想能不能避免这种crash。比如把UIImage initWithContentOfFile改成UIimage initWithData来避免这种情况。
    gonefish
        7
    gonefish  
       2013-07-18 17:50:55 +08:00
    一般都是动态库注入的进程里面

    @feihu 难道是这张图片导致PandaHome crash
    feihu
        8
    feihu  
    OP
       2013-07-19 09:58:14 +08:00
    @gonefish 这个不是必现的Crash,很难说是图片问题。感觉还是PandaHome有问题。现在换成initWithData之后貌似PandaHome的截获不到了,但是这样感觉很不爽。
    chisj
        9
    chisj  
       2013-07-19 11:27:22 +08:00
    之前也碰到过和91桌面的问题,后来联系他们程序员说不是他们的问题。。。。。 越狱后的设备各种坑。
    feihu
        10
    feihu  
    OP
       2013-07-19 17:25:59 +08:00
    @chisj 能说的更详细一些吗?
    so898
        11
    so898  
       2013-07-19 22:40:03 +08:00
    91的问题多了去了……
    当年拦截系统内置的那个密码库的事情都没说清楚呢……
    clowwindy
        12
    clowwindy  
       2013-07-20 11:33:24 +08:00 via iPhone
    想彻底避免,就在 crash 后下次进的时候提示用户 crash 是 91 造成的,让用户自己判断要不要把 91 卸了。这不是一个技术问题。被流氓强X何必忍气吞声。
    ultragtx
        13
    ultragtx  
       2013-07-20 14:43:25 +08:00 via iPhone
    为什么要费心为这种用户折腾呢
    feihu
        14
    feihu  
    OP
       2013-07-20 23:07:46 +08:00 via iPhone
    @clowwindy 这要是在美国,估计可以这么干,在中国,估计会倒打一把。还说这是污蔑。因为其他的程序不挂。为什么你的会挂
    @ultragtx 越狱用户也是用户阿,他操作挂掉了,只会骂我们。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5301 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 08:07 · PVG 16:07 · LAX 01:07 · JFK 04:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.