iPhone:20 分钟后 MapView 中的应用程序崩溃

发布于 2024-09-12 09:13:50 字数 2155 浏览 3 评论 0原文

我正在开发一个跟踪用户位置的应用程序。大约 20 分钟后,应用程序似乎总是崩溃,我不知道为什么。设备日志显示:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x069f6000
Crashed Thread:  0

Thread 0 Crashed:
0   Ride                            0x00012e00 -[Route addCoordinate:] (Route.m:92)
1   Ride                            0x0000877a -[MyRidesMapViewController locationManager:didUpdateToLocation:fromLocation:] (MyRidesMapViewController.m:528)
2   CoreLocation                    0x0000931c -[CLLocationManager onClientEventLocation:] + 584
3   CoreLocation                    0x00007552 -[CLLocationManager onClientEvent:supportInfo:] + 98
4   CoreLocation                    0x000076a0 OnClientEvent + 16
5   CoreLocation                    0x00002ade CLClientInvokeCallback(__CLClient*, CLClientEvent, __CFDictionary const*) + 42
6   CoreLocation                    0x0000512c CLClientHandleDaemonDataLocation(__CLClient*, CLClientLocation const*, __CFDictionary const*) + 204
7   CoreLocation                    0x0000528a CLClientHandleDaemonData(__CFMessagePort*, long, __CFData const*, void*) + 298
8   CoreFoundation                  0x0006936a __CFMessagePortPerform + 242
9   CoreFoundation                  0x00071aa4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
10  CoreFoundation                  0x00073848 __CFRunLoopDoSource1 + 160
11  CoreFoundation                  0x00074626 __CFRunLoopRun + 514
12  CoreFoundation                  0x0001d8e4 CFRunLoopRunSpecific + 224
13  CoreFoundation                  0x0001d7ec CFRunLoopRunInMode + 52
14  GraphicsServices                0x000036e8 GSEventRunModal + 108
15  GraphicsServices                0x00003794 GSEventRun + 56
16  UIKit                           0x000062a0 -[UIApplication _run] + 396
17  UIKit                           0x00004e10 UIApplicationMain + 664
18  Ride                            0x00002a20 main (main.m:14)
19  Ride                            0x000029d4 start + 32

看起来我正在尝试发布已经发布的内容,但是什么?!我启用了 NSZombie,但它似乎没有帮助。

它曾经有效,我最近更新了我的课程以使用 self.对于我合成的任何内容,这可能是问题所在吗?

编辑:我更新了错误。它似乎列出了每行的行号,但它们似乎并不能帮助找到问题。

I am working on an app that tracks a users location. After about 20 minutes it seems that the app always crashes, and I am not sure why. Device logs show:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x069f6000
Crashed Thread:  0

Thread 0 Crashed:
0   Ride                            0x00012e00 -[Route addCoordinate:] (Route.m:92)
1   Ride                            0x0000877a -[MyRidesMapViewController locationManager:didUpdateToLocation:fromLocation:] (MyRidesMapViewController.m:528)
2   CoreLocation                    0x0000931c -[CLLocationManager onClientEventLocation:] + 584
3   CoreLocation                    0x00007552 -[CLLocationManager onClientEvent:supportInfo:] + 98
4   CoreLocation                    0x000076a0 OnClientEvent + 16
5   CoreLocation                    0x00002ade CLClientInvokeCallback(__CLClient*, CLClientEvent, __CFDictionary const*) + 42
6   CoreLocation                    0x0000512c CLClientHandleDaemonDataLocation(__CLClient*, CLClientLocation const*, __CFDictionary const*) + 204
7   CoreLocation                    0x0000528a CLClientHandleDaemonData(__CFMessagePort*, long, __CFData const*, void*) + 298
8   CoreFoundation                  0x0006936a __CFMessagePortPerform + 242
9   CoreFoundation                  0x00071aa4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
10  CoreFoundation                  0x00073848 __CFRunLoopDoSource1 + 160
11  CoreFoundation                  0x00074626 __CFRunLoopRun + 514
12  CoreFoundation                  0x0001d8e4 CFRunLoopRunSpecific + 224
13  CoreFoundation                  0x0001d7ec CFRunLoopRunInMode + 52
14  GraphicsServices                0x000036e8 GSEventRunModal + 108
15  GraphicsServices                0x00003794 GSEventRun + 56
16  UIKit                           0x000062a0 -[UIApplication _run] + 396
17  UIKit                           0x00004e10 UIApplicationMain + 664
18  Ride                            0x00002a20 main (main.m:14)
19  Ride                            0x000029d4 start + 32

Looks like I am trying to release something that has already been released, but what?! I have NSZombie enabled, and it does not seem to help.

It used to work, and I recently updated my class to use self. for anything that I synthesized, could this be the issue?

EDIT: I updated the error. It seems to be listing the line numbers for each line, but they do not seem to be helping to find the issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

胡大本事 2024-09-19 09:13:50

您在设备上运行时是否启用了 NSZombie?如果是这样,您可能内存不足。如您所知,NSZombie 保留已释放的对象,以便您可以检测到双重释放。

不过,您可能确实存在一些记忆问题。静态分析仪会向您显示什么吗? (shift-命令-A)。

Do you have NSZombie enabled while you're running on the device? If so chances are you are running out of memory. As you know, NSZombie keeps released objects around so you can detect a double release.

Chances are you do have some memory issues though. Does the static analyzer show you anything? (shift-command-A).

嗳卜坏 2024-09-19 09:13:50

将位置管理器委托设置为 nil 然后释放它为我修复了崩溃。

Setting the location manager delegate to nil AND THEN releasing it fixed the crash for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文