VectorKit memory bugs

I see a lot of random VectorKit crashes due to malloc error or EXC_BAD_ACCESS, seemingly under MapKit and Core Image in iOS 9.3.1. Anyone see the same problems?

Replies

Hi,


I use MapKit and i have the same problem in my app under iOS 9.3.2 with different stack strace each time :


Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000010


... ... ...


Thread 15 name:  Dispatch queue: com.apple.vectorkit.dispatch.layoutqueue.0x126cae000
Thread 15 Crashed:
0   VectorKit                     0x000000018be05628 gm::Matrix<float, 4, 1> gss::StyleData::valueForKeyAtZ<gm::Matrix<float, 4, 1> >(gss::PropertyID, unsigned int) const + 24
1   VectorKit                     0x000000018be0e818 gm::Matrix<float, 4, 1> gss::RenderStyle::styleValueForKeyAtZ<gm::Matrix<float, 4, 1> >(gss::PropertyID, unsigned int, gss::StyleBlendingEnd) + 60
2   VectorKit                     0x000000018be0e818 gm::Matrix<float, 4, 1> gss::RenderStyle::styleValueForKeyAtZ<gm::Matrix<float, 4, 1> >(gss::PropertyID, unsigned int, gss::StyleBlendingEnd) + 60
3   VectorKit                     0x000000018be0e7c0 gm::Matrix<float, 4, 1> gss::RenderStyle::valueForKeyAtZ<gm::Matrix<float, 4, 1> >(gss::PropertyID, unsigned int) + 236
4   VectorKit                     0x000000018be0f548 gss::RoadDrawStyle::getStrokeColorResolved(float) + 96
5   VectorKit                     0x000000018bd130e0 vk::RoadLayer::layout(vk::RibbonLayoutContext const&) + 1472
6   VectorKit                     0x000000018baea004 -[VKRoadMapModel gglLayoutScene:withContext:renderQueue:] + 2216
7   VectorKit                     0x000000018ba6519c __78-[VKModelObject gglLayoutSceneIfNeeded:withContext:renderQueue:dispatchQueue:]_block_invoke + 200
8   libdispatch.dylib             0x00000001814bd4bc _dispatch_call_block_and_release + 24
9   libdispatch.dylib             0x00000001814bd47c _dispatch_client_callout + 16
10  libdispatch.dylib             0x00000001814c94c0 _dispatch_queue_drain + 864
11  libdispatch.dylib             0x00000001814c0f80 _dispatch_queue_invoke + 464
12  libdispatch.dylib             0x00000001814cb390 _dispatch_root_queue_drain + 728
13  libdispatch.dylib             0x00000001814cd934 _dispatch_worker_thread + 124
14  libsystem_pthread.dylib       0x00000001816d7b28 _pthread_body + 156
15  libsystem_pthread.dylib       0x00000001816d7a8c _pthread_body + 0
16  libsystem_pthread.dylib       0x00000001816d5028 thread_start + 4


or


Thread 19 name:  Dispatch queue: com.apple.vectorkit.dispatch.layoutqueue.0x148bb0480
Thread 19 Crashed:
0   CoreGraphics                   0x0000000182d2aca4 CGFontStrikeGetValue + 48
1   CoreGraphics                   0x0000000182f60ba4 CGGlyphBuilder::lock_glyph_bitmaps(CGGlyphIdentifier const*, unsigned long, CGGlyphBitmap const**) + 80
2   CoreGraphics                   0x0000000182f5c4a8 render_glyphs + 188
3   CoreGraphics                   0x0000000182f5c0c0 draw_glyph_bitmaps + 1128
4   CoreGraphics                   0x0000000182f5b3dc ripc_DrawGlyphs + 1168
5   CoreGraphics                   0x0000000182f8fad4 draw_glyphs + 656
6   VectorKit                     0x000000018bd56e9c vk::TextLabelPart::pushToMesh(vk::LabelMeshBase&, float) + 1888
7   VectorKit                     0x000000018bd9d420 vk::CaptionedIconLabelPart::pushToMesh(vk::LabelMeshBase&, float) + 148
8   VectorKit                     0x000000018bc14494 vk::LabelManager::layout(VKLayoutContext*, std::__1::vector<std::__1::shared_ptr<vk::LabelMapTile>, std::__1::allocator<std::__1::shared_ptr<vk::LabelMapTile> > > const&, VKScene*, md::RenderQueue*) + 11712
9   VectorKit                     0x000000018ba6519c __78-[VKModelObject gglLayoutSceneIfNeeded:withContext:renderQueue:dispatchQueue:]_block_invoke + 200
10  libdispatch.dylib             0x00000001814bd4bc _dispatch_call_block_and_release + 24
11  libdispatch.dylib             0x00000001814bd47c _dispatch_client_callout + 16
12  libdispatch.dylib             0x00000001814c94c0 _dispatch_queue_drain + 864
13  libdispatch.dylib             0x00000001814c0f80 _dispatch_queue_invoke + 464
14  libdispatch.dylib             0x00000001814cb390 _dispatch_root_queue_drain + 728
15  libdispatch.dylib             0x00000001814cd934 _dispatch_worker_thread + 124
16  libsystem_pthread.dylib       0x00000001816d7b28 _pthread_body + 156
17  libsystem_pthread.dylib       0x00000001816d7a8c _pthread_body + 0
18  libsystem_pthread.dylib       0x00000001816d5028 thread_start + 4


or


Thread 20 name:  Dispatch queue: com.apple.vectorkit.dispatch.layoutqueue.0x158cc9ad0
Thread 20 Crashed:
0   libobjc.A.dylib               0x00000001810e9b90 objc_msgSend + 16
1   Foundation                     0x00000001823c38a8 -[NSSubrangeData getBytes:range:] + 404
2   ImageIO                       0x00000001834edb2c CGImageReadGetBytesAtOffset + 624
3   ImageIO                       0x00000001834ed89c CGImageReadSessionGetBytes + 36
4   ImageIO                       0x00000001836aaaf0 read_fn + 44
5   ImageIO                       0x00000001834ed7c4 png_read_sig + 72
6   ImageIO                       0x00000001834ed274 _cg_png_read_info + 56
7   ImageIO                       0x00000001834f8504 copyImageBlockSetPNG + 2084
8   ImageIO                       0x00000001834f7368 ImageProviderCopyImageBlockSetCallback + 856
9   CoreGraphics                   0x0000000182d6ff5c subImageProviderCopyImageBlockSet + 224
10  CoreGraphics                   0x0000000182ec8e20 img_blocks_create + 372
11  CoreGraphics                   0x0000000182ecfaa0 img_data_lock + 1388
12  CoreGraphics                   0x0000000182ecf4e0 CGSImageDataLock + 152
13  CoreGraphics                   0x0000000182d033a0 ripc_AcquireImage + 764
14  CoreGraphics                   0x0000000182ee2948 ripc_DrawImage + 688
15  CoreGraphics                   0x0000000182ed36c4 CGContextDrawImageWithOptions + 456
16  VectorKit                     0x000000018bc4949c -[VKImage gglTexture] + 336
17  VectorKit                     0x000000018bd2f220 md::LabelMesh::render(ggl::CommandBuffer*, md::CommandBufferId, std::__1::__wrap_iter<std::__1::shared_ptr<ggl::RenderItem>*>&, std::__1::__wrap_iter<std::__1::shared_ptr<ggl::ShaderSetup>*>&, bool, gm::Box<float, 2> const*) + 1576
18  VectorKit                     0x000000018bd30688 md::LabelMesh::endLayout(md::RenderQueue*, CGSize, bool, gm::Box<float, 2> const*) + 4880
19  VectorKit                     0x000000018bc146fc vk::LabelManager::layout(VKLayoutContext*, std::__1::vector<std::__1::shared_ptr<vk::LabelMapTile>, std::__1::allocator<std::__1::shared_ptr<vk::LabelMapTile> > > const&, VKScene*, md::RenderQueue*) + 12328
20  VectorKit                     0x000000018ba6519c __78-[VKModelObject gglLayoutSceneIfNeeded:withContext:renderQueue:dispatchQueue:]_block_invoke + 200
21  libdispatch.dylib             0x00000001814bd4bc _dispatch_call_block_and_release + 24
22  libdispatch.dylib             0x00000001814bd47c _dispatch_client_callout + 16
23  libdispatch.dylib             0x00000001814c94c0 _dispatch_queue_drain + 864
24  libdispatch.dylib             0x00000001814c0f80 _dispatch_queue_invoke + 464
25  libdispatch.dylib             0x00000001814cb390 _dispatch_root_queue_drain + 728
26  libdispatch.dylib             0x00000001814cd934 _dispatch_worker_thread + 124
27  libsystem_pthread.dylib       0x00000001816d7b28 _pthread_body + 156
28  libsystem_pthread.dylib       0x00000001816d7a8c _pthread_body + 0
29  libsystem_pthread.dylib       0x00000001816d5028 thread_start + 4

We have a lot of issues too when we have too much annoation (with images inside).

The thread com.apple.mapdisplay.dispatch.tiledecodequeue return also a malloc error.

Any ideas to avoid it ?