【问题标题】:App getting crashed (SIGABRT) while accessing main run loop?访问主运行循环时应​​用程序崩溃(SIGABRT)?
【发布时间】:2015-01-13 08:33:12
【问题描述】:
AppXYZ(2111,0xb04a3000) malloc: *** mach_vm_map(size=1207959552) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc

如何从上述调试器日志中获取符号化信息?

比如我需要知道地址的类别(0xb04a3000)、代码中错误的确切位置等等。

【问题讨论】:

标签: c++ objective-c c class


【解决方案1】:

在 gdb 中,我会按照它说的做,即在提到的函数中放置一个断点:

$ gdb AppXYZ
[... gdb starts ...]
gdb$ break malloc_error_break
gdb$ run

重现导致崩溃的事情。通俗地说,这似乎是因为它试图在单个 malloc() 调用中分配超过 1 GB 的内存,这在某些环境中是相当大胆的。

【讨论】:

    【解决方案2】:

    从您的帖子中我会说您内存不足。

    Malloc was not able to allocate the requested memory
    

    这是因为您必须请求使用 malloc 分配大块内存。

    我建议你减少分配的内存量并尝试。

    请参阅Malloc Error Code = 3Malloc Error 了解更多详情

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-12-06
      • 2018-01-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-29
      相关资源
      最近更新 更多