zoukankan      html  css  js  c++  java
  • strcmp传入nil导致崩溃

    现象:连接电脑可以正常启动程序,不连接电脑启动程序就崩溃。

    崩溃信息:

    BSXPCMessage received error for message: Connection invalid

    HW kbd: Failed to set (null) as keyboard focus

    UNNotificationRegistrarConnectionListener connection invalidated

    UNNotificationSchedulerConnectionListener connection invalidated

    com.apple.xpc.launchd[1] (UIKitApplication:com.wuba.zhuanzhuan[0x58ac][1073]) <Notice>: Service exited due to signal: Segmentation fault: 11

    这种崩溃信息比较浪,导致这种崩溃的可能性比较多,最终定位问题是程序中用了一个c的方法 strcmp,原因是向这个方法中传递的参数中有nil,所以导致崩溃。

  • 相关阅读:
    vijos 1426
    2455 繁忙的都市
    2104 删除物品
    3235 战争
    BZOJ 2962
    COGS 265 线段覆盖
    P2184 贪婪大陆
    0729模拟赛解题报告
    BZOJ 1012
    BZOJ 2763
  • 原文地址:https://www.cnblogs.com/ygm900/p/5267246.html
Copyright © 2011-2022 走看看