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

Crash in CompoundExpression::evaluate due iOS Maps SDK XCTests #16251

Closed
julianrex opened this issue Feb 29, 2020 · 4 comments
Closed

Crash in CompoundExpression::evaluate due iOS Maps SDK XCTests #16251

julianrex opened this issue Feb 29, 2020 · 4 comments
Labels
crash iOS Mapbox Maps SDK for iOS

Comments

@julianrex
Copy link
Contributor

julianrex commented Feb 29, 2020

Detected some crashes from device testing a nightly build generated from mapbox/mapbox-gl-native-ios@e403a069f0 (post 5.7.0-beta.1) / PR mapbox/mapbox-gl-native-ios#179.

The above pins mapbox-gl-native at d85ce77 (on release-unicorn branch).

5 tests out of 545 tests failed (over 5 devices), attached 3 symbolicated crashes below:

Some of the crashes look to have happened as the associated XCTest is being shutdown; this feels like a thread clean-up issue. Although the crashes appear expression evaluation related, the offsets are large, and I suspect that there might have been an issue with the symbolication.

  • From Crash 1, Crash 2:

    mbgl::style::expression::CompoundExpression::evaluate(mbgl::style::expression::EvaluationContext const&) const + 1858788 (compound_expression.cpp:1158)
    Crash 1 is identified as a segfault

  • From Crash 3:

    mbgl::style::expression::BasicComparison::evaluate(mbgl::style::expression::EvaluationContext const&) const + 1809700 (comparison.cpp:105)

/cc @tmpsantos @pozdnyakov

@julianrex julianrex added crash gl-ios iOS Mapbox Maps SDK for iOS and removed gl-ios labels Feb 29, 2020
@1ec5
Copy link
Contributor

1ec5 commented Feb 29, 2020

Any idea what expression may have been evaluated at the time of the crash? The offsets are large, but the file names and line numbers seem to check out.

@alexshalamov
Copy link
Contributor

@julianrex is there a way to run tests / reproduce an issue locally?

@julianrex
Copy link
Contributor Author

I have not tried locally; I'll send you more info.

@julianrex
Copy link
Contributor Author

I'm 95% certain this was due to a retain cycle that kept the MGLMapView alive as the tests were shutting down. Going to close this issue as solved, but should we able to support calling exit while a map is still active @tmpsantos ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crash iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

3 participants