Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

gpus_ReturnGuiltyForHardwareRestart crash (consistently reproducible). #1509

Closed

Description

@mb12

I had filed a bug for this issue earlier (Issue #1198 #1198). At that time I did not have consistent steps to reproduce the issue. I've finally isolated the problem to a very trivial style file and a vector source that consistently reproduces the problem.
This crash is consistently reproducible with the following configuration:

  1. iPhone 5 running iOS 8.1.3 (It reproduces only on iPhone 5 and this OS version).

It does not reproduce on other device/OS configurations. I've tested on iPhone 4s(7.x) , iPhone 6(8.3), iPad(8.1.3) and iPad Air (8.3)

Steps to reproduce:

  1. In you git repo with sample test app copy over the style file at this link to an existing existing style (say emerald-v7.json)

http://54.227.241.87/static_html/test_grid_pbfs/style.json
2. Launch the sample test app. Switch to the new style.
3. Go to zoom level 4.
4. Pan / pan with flick.

Testapp crashes within a few seconds.

Details on what the style/source does.

  1. This style draw a grid of 8x8 squares at zoom level 4.
  2. The tile pbf is very trivial. It has 64 areas for each square. It also has lines marking the boundary of each square.

Activity

  1. 1ec5 commented on May 11, 2015

    @1ec5
    Contributor

    ref #1460

  2. added
    iOS
    on May 11, 2015
  3. mb12 commented on May 11, 2015

    @mb12
    Author

    #1460 is a different issue. #1460 is related to open gl calls not being disabled when app moves to background.

    This issue consistently causes a crash when rendering a trivial grid of squares on iPhone 5.

  4. mb12 commented on May 11, 2015

    @mb12
    Author

    Even on devices where it does not crash, the fill-color is inaccurate. The expected behavior is that all grid squares would be rendered with yellow translucent color. But only half of the grid squares are rendered with this color.
    If I change the opacity to 1, then all the grid squares are rendered with yellow color. It looks like there is an issue with rendering fill areas with translucency (opacity < 1).

  5. mb12 commented on May 14, 2015

    @mb12
    Author

    I was able to get hold of a different iPhone 5 with a slightly different OS version (iOS 8.1.2) and it crashes on that device as well. Is it possible for someone to do some analysis on this? I have hit a dead end on this one.

  6. friedbunny commented on May 14, 2015

    @friedbunny
    Contributor

    I'm inclined to blame this on a bug in the GPU driver for the PowerVR SGX543 series (with RC2 seeming to mean "Release Candidate 2"?). The actual name of the iPhone 5 GPU is SGX543MP3.

    But this crash doesn't reproduce on the iPad mini (SGX543MP2), iOS 8.3, which is a very similar GPU but with two cores (versus three for SGX543MP3). SGX543MP2 was also used in iPhone 4S and iPad 2, so I'd expect those not to crash, either.

    Also does not reproduce on iPhone 4 (SGX535), iOS 7.1.2.

  7. mb12 commented on May 14, 2015

    @mb12
    Author

    @friedbunny Thanks for the comment.

    However on the same hardware where the crash reproduces, the following causes it go away:

    • If I reduce the number of fill bucket /styles to a small number. The current style I have provided renders a grid of 64 squares (8x8 grid) at zoomlevel four. If I reduce this number to 4, the crash goes away.
    • This particular style also uses a translucent opacity (0.5 in all the cases). If I increase it to 1, the crash goes away (when there is only one vector Source). The reason I mention one vector source here is because that is what I've provided in the test case.
    • The crash happens almost instantaneously only during panning / changing device orientation (that forces re-render).

    This leads me to believe there is some issue with alpha rendering for fill buckets.

    PS: I upgraded one of the iPhone 5 devices to 8.3. The crash still reproduces on that device.

  8. mb12 commented on May 21, 2015

    @mb12
    Author

    @incanus Is it possible to add this to list of issues for analysis in ios beta 2? This is a consistently reproducible crash in gl-core.

  9. jfirebaugh commented on Oct 2, 2015

    @jfirebaugh
    Contributor

    Does this still happen?

  10. mb12 commented on Oct 2, 2015

    @mb12
    Author

    Yes. It crashed the last time I tried it (a couple of weeks back).

  11. ohlsont commented on Apr 1, 2016

    @ohlsont

    Is this the same bug? Also iPhone 5 but on iOS 9.3. I have a few thousand polygons and a few thousand point annotations in the form of a building so the zoom is ~18 when crashing. I don't get this on iPhone 6 or 6s.

    image

  12. 1ec5 commented on Apr 1, 2016

    @1ec5
    Contributor

    @Hinken, what version of the Mapbox iOS SDK are you using? Also, does this crash occur when the application is in the foreground or when it's in the background or background mode? The crash trace looks a bit different than the one @mb12 posted in #1198.

  13. ohlsont commented on Apr 3, 2016

    @ohlsont

    Im using a bit modified version where I use the stylesheet for styling instead of the delegate callbacks. But the rest is merged with your master branch with the latest release. It happens in the foreground. I realise I should have mentioned that, but maybe you have some use of this anyway :). Thanks for your great work here

  14. Ta-Boy commented on Sep 3, 2016

    @Ta-Boy

    Im using iOS sdk version 3.3.1,and this issue is still exist,It happened too many times in foreground.The stack trace is same to @ohlsont .Our app just draw a ployline based on real time location then update user heading with method -[MGLMapView setCamera] and update mapview's center coordinate use method -[MGLMapView setCenterCoordinate:animated:].I post a stack trace catched in fabric below ,please review this ,thank you.
    stack track image

  15. friedbunny commented on Sep 21, 2016

    @friedbunny
    Contributor

    Here’s another stack trace, from an iPhone 5 running iOS 9.3.5, with Mapbox iOS SDK v3.3.4:

    * thread #1: tid = 0x7a34f, 0x3246633a libGPUSupportMercury.dylib`gpus_ReturnGuiltyForHardwareRestart + 10, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1)
        frame #0: 0x3246633a libGPUSupportMercury.dylib`gpus_ReturnGuiltyForHardwareRestart + 10
        frame #1: 0x32466e12 libGPUSupportMercury.dylib`gpusSubmitDataBuffers + 118
        frame #2: 0x3534168c IMGSGX543RC2GLDriver`<redacted> + 140
        frame #3: 0x35956186 GLEngine`gliPresentViewES_Exec + 178
        frame #4: 0x359560ba GLEngine`gliPresentViewES + 70
        frame #5: 0x278dc004 OpenGLES`-[EAGLContext presentRenderbuffer:] + 60
        frame #6: 0x00634474 libglInterpose.dylib`EAGLContext_presentRenderbuffer(EAGLContext*, objc_selector*, unsigned int) + 360
        frame #7: 0x2d14f588 GLKit`-[GLKView _display:] + 336
        frame #8: 0x0009df20 crashingapp`-[MGLMapView updateFromDisplayLink] + 148
        frame #9: 0x00633ab0 libglInterpose.dylib`-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 272
        frame #10: 0x281ba9a6 QuartzCore`CA::Display::DisplayLinkItem::dispatch() + 106
        frame #11: 0x281ba7f6 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 594
        frame #12: 0x27893512 IOMobileFramebuffer`IOMobileFramebufferVsyncNotifyFunc + 86
        frame #13: 0x25d735e4 IOKit`IODispatchCalloutFromCFMessage + 256
        frame #14: 0x25acfe8c CoreFoundation`__CFMachPortPerform + 132
        frame #15: 0x25ae419a CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
        frame #16: 0x25ae38ae CoreFoundation`__CFRunLoopDoSource1 + 342
        frame #17: 0x25ae1cc0 CoreFoundation`__CFRunLoopRun + 1704
        frame #18: 0x25a301c8 CoreFoundation`CFRunLoopRunSpecific + 516
        frame #19: 0x25a2ffbc CoreFoundation`CFRunLoopRunInMode + 108
        frame #20: 0x2704caf8 GraphicsServices`GSEventRunModal + 160
        frame #21: 0x2a16a434 UIKit`UIApplicationMain + 144
        frame #22: 0x00087332 crashingapp`main(argc=1, argv=0x00456af0) + 106 at main.m:14
        frame #23: 0x256dc872 libdyld.dylib`start + 2
    

    This crash appears to be exacerbated by large numbers of polylines. So far, it remains isolated to the iPhone 5.

  16. friedbunny commented on Sep 22, 2016

    @friedbunny
    Contributor

    #6275 was on an iPhone 4S and crashed with IMGSGX543GLDriver.

  17. jfirebaugh commented on Nov 9, 2016

    @jfirebaugh
    Contributor

    This may have been fixed by #6972 -- my hunch is it was, or it has been fixed by other changes in master. Please comment here if you see it in recent builds.

  18. RomainQuidet commented on Nov 14, 2018

    @RomainQuidet
    Contributor

    Hi, this issue is poping up again: #13372

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashiOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions