Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when filing a bug from a screen that contains an MKMapView #8

Open
NickEntin opened this issue Jun 12, 2021 · 4 comments
Open
Labels
bug Something isn't working

Comments

@NickEntin
Copy link
Collaborator

NickEntin commented Jun 12, 2021

When we try to generate an attachment from a screen that contains an MKMapView in the view hierarchy, the app crashes with an EXC_BAD_ACCESS. I've created a commit that add a map view to the sample app to demonstrate this.

@NickEntin NickEntin added the bug Something isn't working label Jun 12, 2021
@NickEntin
Copy link
Collaborator Author

From the backtrace, the crash appears to be coming from the Reveal server:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x117c24000)
    frame #0: 0x0000000186920650 CoreGraphics`ERROR_CGDataProvider_BufferIsNotReadable + 24
    frame #1: 0x0000000186920404 CoreGraphics`CGDataProviderRetainBytePtr + 268
    frame #2: 0x0000000186920aa8 CoreGraphics`CGDataProviderRetainData + 80
    frame #3: 0x0000000186b25e04 CoreGraphics`CGAccessSessionCreate + 108
    frame #4: 0x0000000186a02b4c CoreGraphics`img_data_lock + 2380
    frame #5: 0x0000000186a00724 CoreGraphics`CGSImageDataLock + 1064
    frame #6: 0x000000018681f2bc CoreGraphics`ripc_AcquireRIPImageData + 716
    frame #7: 0x0000000186a2125c CoreGraphics`ripc_DrawImage + 1152
    frame #8: 0x0000000186a8be28 CoreGraphics`CG::DisplayList::executeEntries(std::__1::__wrap_iter<std::__1::unique_ptr<CG::DisplayListEntry const, std::__1::default_delete<CG::DisplayListEntry const> >*>, std::__1::__wrap_iter<std::__1::unique_ptr<CG::DisplayListEntry const, std::__1::default_delete<CG::DisplayListEntry const> >*>, CGContextDelegate*, CGRenderingState*, CGGStack*, CGRect const*, __CFDictionary const*, bool) + 732
    frame #9: 0x00000001869bd3cc CoreGraphics`CGDisplayListDrawInContextDelegate + 456
    frame #10: 0x0000000186856870 CoreGraphics`rip_auto_context_rasterization_loop + 1800
    frame #11: 0x0000000186856134 CoreGraphics`rip_auto_context_create_image + 56
    frame #12: 0x0000000187525e1c UIKitCore`-[UIGraphicsImageRendererContext currentImage] + 40
    frame #13: 0x00000001875268d0 UIKitCore`__44-[UIGraphicsImageRenderer imageWithActions:]_block_invoke + 40
    frame #14: 0x00000001875292d8 UIKitCore`-[UIGraphicsRenderer runDrawingActions:completionActions:format:error:] + 468
    frame #15: 0x00000001875290d0 UIKitCore`-[UIGraphicsRenderer runDrawingActions:completionActions:error:] + 124
    frame #16: 0x0000000187526810 UIKitCore`-[UIGraphicsImageRenderer imageWithActions:] + 196
  * frame #17: 0x0000000104d399a8 RevealServer`IBAGraphicsRenderImage + 224
    frame #18: 0x0000000104d5caec RevealServer`IBACALayerRender + 172
    frame #19: 0x0000000104d5c914 RevealServer`IBACALayerCaptureSnapshotWithScale + 972
    frame #20: 0x0000000104d5c51c RevealServer`IBACALayerCaptureSnapshot + 88
    frame #21: 0x0000000104d370ec RevealServer`-[IBACALayerSerializer imageRepresentationForObject:includingChildren:] + 92
    frame #22: 0x0000000104d47ba4 RevealServer`__29-[IBAObjectsController show:]_block_invoke + 88
    frame #23: 0x000000010519dde0 libdispatch.dylib`_dispatch_client_callout + 20
    frame #24: 0x00000001051af24c libdispatch.dylib`_dispatch_async_and_wait_invoke + 220
    frame #25: 0x000000010519dde0 libdispatch.dylib`_dispatch_client_callout + 20
    frame #26: 0x00000001051ae0a8 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1040
    frame #27: 0x0000000184f0c398 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
    frame #28: 0x0000000184f06270 CoreFoundation`__CFRunLoopRun + 2524
    frame #29: 0x0000000184f05360 CoreFoundation`CFRunLoopRunSpecific + 600
    frame #30: 0x000000019c543734 GraphicsServices`GSEventRunModal + 164
    frame #31: 0x0000000187980584 UIKitCore`-[UIApplication _run] + 1072
    frame #32: 0x0000000187985df4 UIKitCore`UIApplicationMain + 168
    frame #33: 0x0000000104881a44 AardvarkRevealDemo`main at AppDelegate.swift:21:13
    frame #34: 0x0000000184bc1cf8 libdyld.dylib`start + 4

I can also reproduce this by trying to connect to the app from the Reveal client. @tonyarnold are you already tracking this bug in Reveal, or any ideas for workarounds?

@tonyarnold
Copy link

Hey Nick, yes we are aware of this one.

One of the internal views of the MKMapView has an absurdly large frame, and we're not handling that well in the client (it should still serialise and save just fine).

Our goal is to fix this issue for Reveal version 30, but it will still likely be a couple of weeks before that's out.

@NickEntin
Copy link
Collaborator Author

Thanks Tony, makes sense. I figured the problem must be from either a very large view or a very large number of small views. I'll keep an eye out for 30.

@tonyarnold
Copy link

This crash is fixed in Reveal v30 ❤️ : https://revealapp.com/updates/30/

Thanks for letting me know about this crash - once we started looking at the specifics of the problem, there were a bunch of edge cases around oversized views like MKMapView's internals, big SwiftUI-based scroll view content views. They all needed a bit of love.

If anything in the new version is still triggering a crash here (or elsewhere), please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants