iOS 6地图偶尔会崩溃

Olg*_*ton 11 iphone ios ios6 ios6-maps

我偶尔会遇到iOS 6 MapKit崩溃.无法真正重现它.是什么导致这个?

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

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   IMGSGX543GLDriver               0x38f231b4 sgxTextureGetImageRowBytes(GLDTextureRec*, unsigned int, unsigned int) + 8
1   IMGSGX543GLDriver               0x38f23160 CalculateChunkPlaneSizes(GLDTextureRec*, int, unsigned int*, unsigned int*, unsigned int*, unsigned int*) + 104
2   IMGSGX543GLDriver               0x38f25906 sgxConfigureTexturePrivate(GLDTextureRec*) + 82
3   IMGSGX543GLDriver               0x38f24584 glrUpdateTexture + 616
4   libGPUSupportMercury.dylib      0x342c76b6 gldLoadFramebuffer + 102
5   GLEngine                        0x31b50e52 gleUpdateDrawFramebufferState + 178
6   GLEngine                        0x31b52556 gleDoDrawDispatchCoreES2 + 126
7   GLEngine                        0x31aedbc0 gleDrawArraysOrElements_Entries_Body + 140
8   GLEngine                        0x31aea5ec glDrawArrays_ES2Exec + 160
9   VectorKit                       0x3780dcd6 -[VKSkyModel drawScene:withContext:] + 326
10  VectorKit                       0x377e76d6 -[VKModelObject recursiveDrawScene:whenReadyWithContext:] + 118
11  VectorKit                       0x377621ea -[VKMapModel recursiveDrawScene:withContext:] + 278
12  VectorKit                       0x37762096 -[VKModelObject recursiveDrawScene:withContext:] + 186
13  VectorKit                       0x3775d4da -[VKScreenCanvas onTimerFired:] + 1014
14  VectorKit                       0x3775b548 -[VKMapCanvas onTimerFired:] + 500
15  VectorKit                       0x3775a3d2 -[VKMainLoop displayTimerFired:] + 610
16  QuartzCore                      0x3095b06c CA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 156
17  QuartzCore                      0x3095afc4 CA::Display::IOMFBDisplayLink::callback(__IOMobileFramebuffer*, unsigned long long, unsigned long long, unsigned long long, void*) + 60
18  IOMobileFramebuffer             0x331e4fd4 IOMobileFramebufferVsyncNotifyFunc + 152
19  IOKit                           0x36fc4446 IODispatchCalloutFromCFMessage + 190
20  CoreFoundation                  0x382a95d8 __CFMachPortPerform + 116
21  CoreFoundation                  0x382b4170 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
22  CoreFoundation                  0x382b4112 __CFRunLoopDoSource1 + 134
23  CoreFoundation                  0x382b2f94 __CFRunLoopRun + 1380
24  CoreFoundation                  0x38225eb8 CFRunLoopRunSpecific + 352
25  CoreFoundation                  0x38225d44 CFRunLoopRunInMode + 100
26  GraphicsServices                0x3415f2e6 GSEventRunModal + 70
27  UIKit                           0x351b72fc UIApplicationMain + 1116
28  MyApp                           0x0005d78a main (main.m:14)
29  MyApp                           0x0005d744 start + 36
Run Code Online (Sandbox Code Playgroud)

小智 2

我找到了这个。它可能会帮助您解决问题。

\n\n

“问题:基于 OpenGL ES 的应用程序在调用 PresentRenderBuffer 后显示 \xe2\x80\x9cflashing\xe2\x80\x9d 或 \xe2\x80\x9cstale\xe2\x80\x9d 帧。\n当 OpenGL ES 应用程序调用 EAGL PresentRenderbuffer 方法而不首先绘制任何内容。屏幕上看到的内容可能包含未初始化的像素或先前渲染的帧。要纠正此问题,您应该始终在调用 PresentRenderbuffer 之前向帧缓冲区绘制一些内容。另请注意,除非您设置CAEAGLLayer 上的 RetainedBackbuffer 属性启用保留后备缓冲区模式,但在调用 PresentRenderbuffer 后,不保证渲染缓冲区的内容保持有效”。

\n\n

-刘易斯

\n

  • 不太确定这如何回答问题。听起来发帖者并不是在编写基于 OpenGL ES 的应用程序,而只是尝试使用 MKMapView。我有一份几乎相同的崩溃报告,根据 Crashlytics 的说法,这是我最常见的崩溃报告。关于如何配置/使用 MKMapView 来避免这种崩溃有什么建议吗? (8认同)