Code Monkey home page Code Monkey logo

maplibre / maplibre-native Goto Github PK

View Code? Open in Web Editor NEW
837.0 47.0 255.0 319.15 MB

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.

Home Page: https://maplibre.org

License: BSD 2-Clause "Simplified" License

Python 0.06% CMake 1.15% Java 12.68% C++ 50.55% Shell 0.16% Swift 0.48% Objective-C 6.98% JavaScript 1.54% HTML 0.01% Objective-C++ 10.80% PowerShell 0.01% Makefile 0.10% C 0.01% Ruby 0.02% Rich Text Format 0.01% Kotlin 12.28% EJS 1.05% Starlark 0.87% GLSL 1.25% Dockerfile 0.01%
vector-tiles maplibre maps

maplibre-native's Introduction

MapLibre Logo

MapLibre Native

codecov

MapLibre Native is a free and open-source library for publishing maps in your apps and desktop applications on various platforms. Fast displaying of maps is possible thanks to GPU-accelerated vector tile rendering.

This project originated as a fork of Mapbox GL Native, before their switch to a non-OSS license in December 2020. For more information, see: FORK.md.

Android device with MapLibre iOS device with MapLibre

Getting Started

To get started with MapLibre Native, go to your platform below.

Documentation

The documentation of MapLibre Native is a work in progress. To get an architectural overview and to learn about the current state of the project and its path forward read the MapLibre Native Markdown Book. See below for platform-specific documentation.

Platforms

Platforms with a ⭐️ are MapLibre Core Projects and have a substantial amount of financial resources allocated to them. Learn about the different project tiers.

Renderer Modularization & Metal

image-metal

MapLibre Native for iOS 6.0.0 with Metal support has been released. See the news announcement.

Contributing

To contribute to MapLibre Native, see CONTRIBUTING.md and (if applicable) the specific instructions for the platform you want to contribute to.

Getting Involved

Join the #maplibre-native Slack channel at OSMUS. Get an invite at https://slack.openstreetmap.us/

Bounties 💰

Thanks to our sponsors, we are able to award bounties to developers making contributions toward certain bounty directions. To get started doing bounties, refer to the step-by-step bounties guide.

We thank everyone who supported us financially in the past and special thanks to the people and organizations who support us with recurring donations!

Read more about the MapLibre Sponsorship Program at https://maplibre.org/sponsors/.

Gold:

Logo AWS

Logo Meta

Silver:

Logo MIERUNE

Logo komoot

Logo JawgMaps

Logo Radar

Logo Microsoft

Logo mappedin

Backers and Supporters:

License

MapLibre Native is licensed under the BSD 2-Clause License.

maplibre-native's People

Contributors

1ec5 avatar alexshalamov avatar ansis avatar artemp avatar bleege avatar boundsj avatar brunoabinader avatar chrisloer avatar dependabot[bot] avatar fabian-guerra avatar friedbunny avatar guardiola31337 avatar incanus avatar ivovandongen avatar jfirebaugh avatar jmkiley avatar julianrex avatar kkaefer avatar ljbade avatar louwers avatar lukaspaczos avatar mikemorris avatar mwilsnd avatar petr-pokorny-1 avatar pozdnyakov avatar timsylvester avatar tmpsantos avatar tobrun avatar zmiao avatar zugaldia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maplibre-native's Issues

iOS 14.5 / Xcode 12.5 Build Issue: Semantic Issue (Comparison of distinct pointer types)

There is a compiler error when building the scheme dynamic with Xcode.

Tested against:

  • Version 12.5 (12E262) released on Apr 20, 2021
  • Version 12.5 beta 3 (12E5244e) released on Mar 2, 2021.
  • Version 12.5 beta 2 (12E5234g) released on Feb 16, 2021.
  • Version 12.5 Beta (12E5220o) released on Feb 1, 2021.

This same file (NSExpression+MGLAdditions.mm) compiles fine with Xcode Version 12.4 (12D4e) & Xcode Version 11.7 (11E801a)


Xcode reports Semantic Issue

Comparison of distinct pointer types ('NSString *' and 'Class')


https://github.com/maptiler/maplibre-gl-native/blob/72692d6305bb4df1d64dab450e0d49e2c8d5c943/platform/ios/platform/darwin/src/NSExpression%2BMGLAdditions.mm#L1272


Error in Xcode 12.5 Beta

image


Other parameters of note:

  • SDK iOS 14.5 (released as Beta on Feb 1, 2021)

image

WatchOS Support?

Hi, have you considered to add the support for WatchOS? I think it would open a gigantic market of outdoors the possibility to use vector maps on the Watch.

Flutter bindings

Mapbox have a set of Flutter bindings to Mapbox GL Native: https://github.com/tobrun/flutter-mapbox-gl

It began life as an official Mapbox repo. It's now "community driven and is not an official Mapbox product... we welcome feedback and contributions". Mapbox devs still appear to be active in the project: there's a project status discussion at flutter-mapbox-gl/maps#517

It would be good to have Flutter bindings for MapLibre. The Mapbox bindings are still BSD-licensed, so it should be possible to base them off the latest version, obviously without bindings to any post-licence change MBGL features.

Putting this here as a placeholder and gathering point for now - I may look at this when I need the bindings but obviously won't be disappointed if someone else gets there before me!

Fatal error in Swift UI apps with `metal-support`

Issue

Using binaries built from the metal-support branch, a Swift UI test application will have a fatal error: Thread 1: signal SIGABRT. The source of the error is when the Map View constructor is instantiated with frame: .zero. This fatal error does not happen in non-MetalANGLE builds.

let mapView = MGLMapView(frame: .zero) // .zero is a CGRect convenience

The log

iosapp-swiftui CAMetalLayer ignoring invalid setDrawableSize width=0.000000 height=0.000000
iosapp-swiftui CAMetalLayer ignoring invalid setDrawableSize width=0.000000 height=0.000000
iosapp-swiftui CAMetalLayer ignoring invalid setDrawableSize width=0.000000 height=0.000000
iosapp-swiftui CAMetalLayer ignoring invalid setDrawableSize width=0.000000 height=0.000000


Research & Workaround

Swapping out the frame: to a reasonable initial CGRect is a reasonable short term workaround. But it also has side effects (unwanted flashing animations).

var frame = CGRect(x: 0, y: 0, width: 10, height: 20)

Background

The docs for the MapView constructor MGLMapView:

Initializes and returns a newly allocated map view with the specified frame and the default style.

// Workaround
var frame = CGRect(x: 0, y: 0, width: 10, height: 20)

// causes SIGABRT
frame = .zero

let mapView = MGLMapView(frame: frame)

Android textField do not work

Migrating from MapBox to MapLibre, I found that SymbolLayer's PropertyFactory.textField(Expression.get("xxxx") does not work, if set prop for feature, the geomerty and label can not show!

My code as this:

Style.Builder bd = new Style.Builder();
bd.fromJson("{}");
mapboxMap.setStyle(bd, new Style.OnStyleLoaded() {
    @Override
    public void onStyleLoaded(@NonNull Style style) {
		GeoJsonSource source = new GeoJsonSource("mysource");
		style.addSource(source);
		Layer labelLayer = new SymbolLayer("label-layer","mysource");
        labelLayer.setProperties(PropertyFactory.textField(Expression.get("name")),
                PropertyFactory.textColor(Color.RED),
                PropertyFactory.textSize(18f)
              );
	     JsonObject prop = new JsonObject();
		 prop.addProperty("name","mytext");
		 List<Feature> features = new ArrayList<>();
         Feature feature =  Feature.fromGeometry(Point.fromLngLat(113,21),prop );
         features.add(feature);
         FeatureCollection featureCollection = FeatureCollection.fromFeatures(features);
         source.setGeoJson(featureCollection);
        }
    });
})

Continuous Integration is failing on `metal-support` branch

  • The build step make ios-test fails on GitHub Actions at step 12, Line 1318
  • make ios-test builds fine on a local dev machine.
  • The error in the logs "Failed To call eglInitialize()" is a reference in the MetalANGLE code, and basically is saying that the eglDisplay failed. Link to Display.mm#L28,L37
    • The GitHub Actions build machine builds on an iPhone 8: Log entries SimDevice: iPhone 8, iOS 14.4

Proposal: improvements to local MBTiles FileSource

Context: I'm working on Python bindings to build a self-hosted static renderer similar to mbgl-renderer that I built on top of the (now unmaintained?) mapbox-gl-native NodeJS bindings and was starting to build up a similar FileSource for local mbtiles when I discovered it was already implemented here (thanks!).

I use a somewhat different approach to resolving local mbtiles files to tileJSON and tiles: e.g., "mbtiles://land/{z}/{x}/{y}.pbf" => /<mbtiles root path>/land.mbtiles tile request.
(style JSON example)

though I am open to other alternatives of resolving this that don't require full filesystem paths in the style JSON files; an approach like is used for assets is more appropriate. Style JSON strings are sent by client applications to the static renderer; the root path containing the mbtiles files is set as a property for running the static renderer server.

It looks like the current implementation only resolves absolute file paths? I couldn't find a full request URL or test that would reveal this in the codebase, but from inspection of the code a tile request looks something like /<absolute mbtiles file path>?file={x}/{y}/{z}.pbf

Is there more documentation / examples for this FileSource anywhere?

I'd like to make the following changes to the MBTiles FileSource, but wanted to be sure that the overall direction seems reasonable:

  • rename MaptilerFileSource => MBTilesFileSource
  • move implementations of tileJSON construction and tile unzipping to separate utility files
  • add property to ResourceOptions to set root path containing local MBTiles files, similar to asset path
  • make resolving tileJSON / tile request URLs more configurable
  • add tests for MBTilesFileSource and a couple small mbtiles files as test fixtures; I don't see that there are any tests now, so it's a bit hard to know if the above changes would break any downstream usage

self.mapboxMap.userTrackingMode = .followWithHeading causes crash

I'm getting a crash momentarily after setting .followWithHeading

As soon as you set it, you immediately get:

[Assert] UIView animation API is being called from a background thread. Performing any operation from a background thread on UIView or a subclass is not supported and may result in unexpected and insidious behavior.

Then after a minute or two, you will get:

This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes.
Stack:(
0 CoreAutoLayout 0x00000001b16e5548 BFA41672-E375-33C9-8533-AA1936F46191 + 62792
1 CoreAutoLayout 0x00000001b16e5318 BFA41672-E375-33C9-8533-AA1936F46191 + 62232
2 CoreAutoLayout 0x00000001b16e4e78 BFA41672-E375-33C9-8533-AA1936F46191 + 61048
3 CoreAutoLayout 0x00000001b16e0b58 BFA41672-E375-33C9-8533-AA1936F46191 + 43864
4 UIKitCore 0x000000019fe59f9c 3405666F-F281-3F71-BA86-83E5A27AB5B0 + 16932764
5 Mapbox 0x0000000108aa2ea4 -[MGLMapView layoutSubviews] + 72
6 UIKitCore 0x000000019fe6c448 3405666F-F281-3F71-BA86-83E5A27AB5B0 + 17007688
7 QuartzCore 0x00000001a0371f2c ADD890C7-5758-36E3-A0E8-A6DFC67111E0 + 1400620
8 QuartzCore 0x00000001a03784d0 ADD890C7-5758-36E3-A0E8-A6DFC67111E0 + 1426640
9 QuartzCore 0x00000001a0383820 ADD890C7-5758-36E3-A0E8-A6DFC67111E0 + 1472544
10 QuartzCore 0x00000001a02cf160 ADD890C7-5758-36E3-A0E8-A6DFC67111E0 + 733536
11 QuartzCore 0x00000001a02f9324 ADD890C7-5758-36E3-A0E8-A6DFC67111E0 + 906020
12 QuartzCore 0x00000001a02f9b30 ADD890C7-5758-36E3-A0E8-A6DFC67111E0 + 908080
13 libsystem_pthread.dylib 0x00000001e5832110 D5035724-3CF4-33BE-B3C1-4F5502A9130F + 57616
14 libsystem_pthread.dylib 0x00000001e582db98 D5035724-3CF4-33BE-B3C1-4F5502A9130F + 39832
15 libsystem_pthread.dylib 0x00000001e582f8a0 D5035724-3CF4-33BE-B3C1-4F5502A9130F + 47264
16 libsystem_pthread.dylib 0x00000001e582f634 _pthread_wqthread + 416
17 libsystem_pthread.dylib 0x00000001e5832874 start_wqthread + 8

To be very sure I have wrapped the call in a DispatchQueue but it has no imapct.

DispatchQueue.main.async { self.mapboxMap.userTrackingMode = .followWithHeading }

For Mobile SDKs, Create a Documentation website or GH-Pages

Starting a GitHub Project for a Documentation web site for GL Native docs (similar to maplibre/maplibre-gl-js-docs).

Examples of how it could be designed:

  • MapLibre.org/docs/android
  • MapLibre.org/docs/ios

or,

  • docs.maplibre.org/mobile/ios
  • etc.

or, it could simply be hosted on the branch gh-pages

  • maplibre.github.io/maplibre-gl-native/ios
  • maplibre.github.io/maplibre-gl-native/android

Tasks

  • Review existing docs and rebrand for MapLibre
  • Setup hosting (determine web site architecture, CNAME, GH-pages, etc)
  • Update GitHub Actions to publish based on a release

Notes on making docs

Android

iOS

image

[Android] - Disable mapbox access token

At the moment it seems the Android SDK will crash when you provide an invalid access token (defined as it being NULL or not starting with either PK or SK). Since we're not using Mapbox but our own tileset we don't really need a Mapbox token.

Current behaviour
App crashes when not entering a Mapbox token

Expected behaviour
App doesn't crash when leaving an empty Mapbox token

Unnecessary sorting of features if `sort-key` is constant, but not `undefined`

(This is a reminder about 2 performance bugs discovered and discussed in maplibre/maplibre-gl-js#78)


I checked if the sorting-bug is also present in maplibre-gl-native.

This should already be avoiding bug “1.“, but bug “2.” is still present:

https://github.com/maplibre/maplibre-gl-native/blob/cd8d56467962cfb4c99418b0226d9ea2adb48c30/src/mbgl/layermanager/line_layer_factory.cpp#L30

- it can probably be modified to ![...].isConstant().

Other instances exist, too: Just look for circleSortKey, symbolSortKey, lineSortKey, fillSortKey.

For circles and symbols it’s also in the renderer:

https://github.com/maplibre/maplibre-gl-native/blob/cd8d56467962cfb4c99418b0226d9ea2adb48c30/src/mbgl/renderer/layers/render_circle_layer.cpp#L128

I’m currently not willing (or able) to spend time to send a PR though

Ionic framework turn by turn navigation

Hi, I am working on a navigation application in Ionic (Angular), OpenStreetMap and I use Valhalla as a routing machine, now I wonder if there is a possibility to get navigation similar to the image below?
115017358-b7cf8880-9eb6-11eb-9b75-cb46a2a0ccfa

Mac Catalyst support

Looks like this hard fork has already made some awesome progress towards addressing long standing issues in the old Mapbox SDK, like offline vector mbtiles, and XCFramework support.

Now that you already support XCFrameworks, supporting Mac Catalyst should be relatively straightforward. Binary components with custom build scripts will need the following additional architectures:

  • x86_64-apple-ios14.0-macabi
  • arm64-apple-ios14.0-macabi

You'll need to target macOS 11.0 (for Mac Catalyst / iOS 14.0) or higher for OpenGL ES support.

Cheers!

Flickering/flashing labels while camera is moving

Using MapLibre @ v5.11.0

I'm seeing a problem with flickering/flashing labels while the camera is tracking the user's location and moving. I understand #34 was merged and looks to solve a similar problem, but it seems it is still persisting.

Video of the problem:

generic-example-four.mov

Example code:

import UIKit
import Mapbox

class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let mapView = MGLMapView(frame: view.bounds)
        mapView.styleURL = URL(string: "https://your-style.json")!
        mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
        mapView.showsUserLocation = true
        mapView.userTrackingMode = .followWithCourse
        view.addSubview(mapView)
    }
}

Then set your location to Freeway Drive in the simulator.

/cc @petr-pokorny-1

Offline MBTiles support?

I haven't been able to find in the repository and/or documentation if there's support for offline vector (and raster too) MBTiles?

I admit I don't know if that was possible in the original Mapbox implementation, so if it wasn't there, it's quite likely it isn't in this project at the moment.

Aside from this, is there any documentation for how to use the library? So far I've seen how to set it up, but not how to interact with it. E.g.: add markers, draw paths, etc.

Thank you in advance and apologies if this isn't the proper place where to ask about this. I'd more than happy to move this question somewhere else.

Xcode tools to measure Metal Performance

Xcode has a set of tools with excellent documentation on how to Optimize Performance with GPU Counters for measuring performance of our Metal based engine.

Opening this issue for any Game Developers or teams that want to aid in measuring the performance of the MapLibre solution.

Items to review


Measuring FPS on a device with the MapLibre Swift UI app iosapp-swiftui
image

UI API called from background thread

Calling MGLMapView.locationManager.delegate.locationManager(manager, didUpdate:heading) causes an "API called from background thread" issue:

  • [UIView convertPoint:toView:] must be used from main thread only
  • [UIView superview] must be used from main thread only
  • [UIView bounds] must be used from main thread only
  • [UIView setCenter:] must be used from main thread only

This happens with a custom MGLAnnotationView that is returned if annotation is MGLUserLocation from the mapView(mapView:,viewFor:) delegate method call.

Wrapping the update heading call in DispathQueue.main.async does not work around the issue.

Screenshot image
Stacktrace
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView convertPoint:toView:]
PID: 1057, TID: 219955, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x00000001088be74c -[MGLMapView convertLatLng:toPointToView:] + 84
5   Mapbox                              0x00000001088be6a8 -[MGLMapView convertCoordinate:toPointToView:] + 88
6   Mapbox                              0x00000001088cbf88 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 280
7   Mapbox                              0x00000001088ce974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
8   libdispatch.dylib                   0x0000000106658064 _dispatch_call_block_and_release + 32
9   libdispatch.dylib                   0x0000000106659d90 _dispatch_client_callout + 20
10  libdispatch.dylib                   0x000000010665c8c8 _dispatch_queue_override_invoke + 1008
11  libdispatch.dylib                   0x000000010666dde0 _dispatch_root_queue_drain + 396
12  libdispatch.dylib                   0x000000010666e79c _dispatch_worker_thread2 + 136
13  libsystem_pthread.dylib             0x00000001d68e2768 _pthread_wqthread + 216
14  libsystem_pthread.dylib             0x00000001d68e974c start_wqthread + 8
2021-05-17 13:44:30.442833+0200 Connect[1057:219955] [reports] Main Thread Checker: UI API called on a background thread: -[UIView convertPoint:toView:]
PID: 1057, TID: 219955, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x00000001088be74c -[MGLMapView convertLatLng:toPointToView:] + 84
5   Mapbox                              0x00000001088be6a8 -[MGLMapView convertCoordinate:toPointToView:] + 88
6   Mapbox                              0x00000001088cbf88 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 280
7   Mapbox                              0x00000001088ce974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
8   libdispatch.dylib                   0x0000000106658064 _dispatch_call_block_and_release + 32
9   libdispatch.dylib                   0x0000000106659d90 _dispatch_client_callout + 20
10  libdispatch.dylib                   0x000000010665c8c8 _dispatch_queue_override_invoke + 1008
11  libdispatch.dylib                   0x000000010666dde0 _dispatch_root_queue_drain + 396
12  libdispatch.dylib                   0x000000010666e79c _dispatch_worker_thread2 + 136
13  libsystem_pthread.dylib             0x00000001d68e2768 _pthread_wqthread + 216
14  libsystem_pthread.dylib             0x00000001d68e974c start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView superview]
PID: 1057, TID: 219955, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x00000001088cbfac -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 316
5   Mapbox                              0x00000001088ce974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
6   libdispatch.dylib                   0x0000000106658064 _dispatch_call_block_and_release + 32
7   libdispatch.dylib                   0x0000000106659d90 _dispatch_client_callout + 20
8   libdispatch.dylib                   0x000000010665c8c8 _dispatch_queue_override_invoke + 1008
9   libdispatch.dylib                   0x000000010666dde0 _dispatch_root_queue_drain + 396
10  libdispatch.dylib                   0x000000010666e79c _dispatch_worker_thread2 + 136
11  libsystem_pthread.dylib             0x00000001d68e2768 _pthread_wqthread + 216
12  libsystem_pthread.dylib             0x00000001d68e974c start_wqthread + 8
2021-05-17 13:44:40.393465+0200 Connect[1057:219955] [reports] Main Thread Checker: UI API called on a background thread: -[UIView superview]
PID: 1057, TID: 219955, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x00000001088cbfac -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 316
5   Mapbox                              0x00000001088ce974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
6   libdispatch.dylib                   0x0000000106658064 _dispatch_call_block_and_release + 32
7   libdispatch.dylib                   0x0000000106659d90 _dispatch_client_callout + 20
8   libdispatch.dylib                   0x000000010665c8c8 _dispatch_queue_override_invoke + 1008
9   libdispatch.dylib                   0x000000010666dde0 _dispatch_root_queue_drain + 396
10  libdispatch.dylib                   0x000000010666e79c _dispatch_worker_thread2 + 136
11  libsystem_pthread.dylib             0x00000001d68e2768 _pthread_wqthread + 216
12  libsystem_pthread.dylib             0x00000001d68e974c start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 1057, TID: 219955, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x00000001088cc024 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 436
5   Mapbox                              0x00000001088ce974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
6   libdispatch.dylib                   0x0000000106658064 _dispatch_call_block_and_release + 32
7   libdispatch.dylib                   0x0000000106659d90 _dispatch_client_callout + 20
8   libdispatch.dylib                   0x000000010665c8c8 _dispatch_queue_override_invoke + 1008
9   libdispatch.dylib                   0x000000010666dde0 _dispatch_root_queue_drain + 396
10  libdispatch.dylib                   0x000000010666e79c _dispatch_worker_thread2 + 136
11  libsystem_pthread.dylib             0x00000001d68e2768 _pthread_wqthread + 216
12  libsystem_pthread.dylib             0x00000001d68e974c start_wqthread + 8
2021-05-17 13:44:40.535415+0200 Connect[1057:219955] [reports] Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 1057, TID: 219955, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x00000001088cc024 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 436
5   Mapbox                              0x00000001088ce974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
6   libdispatch.dylib                   0x0000000106658064 _dispatch_call_block_and_release + 32
7   libdispatch.dylib                   0x0000000106659d90 _dispatch_client_callout + 20
8   libdispatch.dylib                   0x000000010665c8c8 _dispatch_queue_override_invoke + 1008
9   libdispatch.dylib                   0x000000010666dde0 _dispatch_root_queue_drain + 396
10  libdispatch.dylib                   0x000000010666e79c _dispatch_worker_thread2 + 136
11  libsystem_pthread.dylib             0x00000001d68e2768 _pthread_wqthread + 216
12  libsystem_pthread.dylib             0x00000001d68e974c start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView setCenter:]
PID: 1057, TID: 219955, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x0000000108867b00 -[MGLAnnotationView setCenter:] + 72
5   Mapbox                              0x00000001088cc138 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 712
6   Mapbox                              0x00000001088ce974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
7   libdispatch.dylib                   0x0000000106658064 _dispatch_call_block_and_release + 32
8   libdispatch.dylib                   0x0000000106659d90 _dispatch_client_callout + 20
9   libdispatch.dylib                   0x000000010665c8c8 _dispatch_queue_override_invoke + 1008
10  libdispatch.dylib                   0x000000010666dde0 _dispatch_root_queue_drain + 396
11  libdispatch.dylib                   0x000000010666e79c _dispatch_worker_thread2 + 136
12  libsystem_pthread.dylib             0x00000001d68e2768 _pthread_wqthread + 216
13  libsystem_pthread.dylib             0x00000001d68e974c start_wqthread + 8
2021-05-17 13:44:40.643654+0200 Connect[1057:219955] [reports] Main Thread Checker: UI API called on a background thread: -[UIView setCenter:]
PID: 1057, TID: 219955, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x0000000108867b00 -[MGLAnnotationView setCenter:] + 72
5   Mapbox                              0x00000001088cc138 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 712
6   Mapbox                              0x00000001088ce974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
7   libdispatch.dylib                   0x0000000106658064 _dispatch_call_block_and_release + 32
8   libdispatch.dylib                   0x0000000106659d90 _dispatch_client_callout + 20

9   libdispatch.dylib                   0x000000010665c8c8 _dispatch_queue_override_invoke + 1008
10  libdispatch.dylib                   0x000000010666dde0 _dispatch_root_queue_drain + 396
11  libdispatch.dylib                   0x000000010666e79c _dispatch_worker_thread2 + 136
12  libsystem_pthread.dylib             0x00000001d68e2768 _pthread_wqthread + 216
13  libsystem_pthread.dylib             0x00000001d68e974c start_wqthread + 8

iOS version: 14.5.1
MapLibre GL Native version: 5.11.0

[ios] cocoapods support

Hey, thank you for the great work of keeping this lib fixed and alive, filed a few PRs in original for improvements so far in the past and them are still there... will plan to send here too so we can have them working.

Was wondering if you have any plan of support cocoapods, having a repo to replace the old lib as framework and avoid any manual build and drag and drop.

Basically build with

make xcframework BUILDTYPE=Release

And catch the dynamic result in a pod?

Mapbox attribution

What are the Mapbox attribution requirements when using maplibre-gl-native on iOS & Android?

Mapbox stated the following (same applies for both Android and iOS): "You must include the Mapbox wordmark and attribution notice on any map that uses the Mapbox Maps SDK for Android".

Maplibre is still based on the Mapbox SDK which would suggest that attribution is required.

Automated UI Tests for iOS

Initial Automated UI Tests demo for Xcode

  • Create initial UITest scaffolding for iOS
  • Add UITests based on XCTest with deployment target of iOS 9.0
  • Save a PNG screenshot to the UITest results. Add XCTest extension for screenshots
  • Provide PNG & Video .MOV samples to demonstrate automated UITests running in Xcode
  • Add flag to make iproj CI=1 to run in headless mode (for GitHub Actions & Xcode Server Bots)
  • Add UITests for the Scheme iosapp
  • Enable UITests for the Scheme bench while in the iosapp scheme
  • For the Scheme bench, Write the Benchmark log to the Documents Directory of the Simulator or Device to facilitate testing of many Benchmarking runs and iterations for testing FPS. Useful for Metal versus Open GL testing.
  • Review tests for for FPS performance (for example, for Metal)
  • Add Zero Configuration (Zeroconf) Styles to the Scheme iosapp to facilitate automated testing without an access token nor secrets (for GitHub Actions & Xcode Server Bots).
    • Add tests for other tile providers and TileJSON sources
  • Demonstrate automated UITests running in GitHub Actions
  • Demonstrate with Xcode Server Bots (XCS) for locally made builds.
  • Determine where Xcode xcresult result bundles should be stored (for example, attached as part of a release)
  • Test with command line builds (xcodebuild & make test)
  • Demonstrate running automated UI Tests in AWS Device Farm
  • Submit PR from working branch https://github.com/roblabs/maplibre-gl-native/commits/uitests

Sample Test PNG & MOV

Sample output file saved in .xcresult
MapLibre-Screenshot-Null Island Tiles-iPhone 6s-13.7.png



[android] ci builds randomly fails on MapboxGLAndroidSDK:jacocoDebug task

MapboxGLAndroidSDK:jacocoDebug task randomly fails in CI/CD builds.

From build log:

> Task :MapboxGLAndroidSDK:jacocoDebug FAILED
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':MapboxGLAndroidSDK:jacocoDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > java.lang.ExceptionInInitializerError (no error message)

Example: https://github.com/maplibre/maplibre-gl-native/runs/1934842406?check_suite_focus=true

Symbol layer flickering after zooming out

Mapbox 6.0 got an update for this (unfortunately after license change):

🐞 Bug fixes
Fixed an issue where symbols flickered when zooming out. (mapbox/mapbox-gl-native#16471, mapbox/mapbox-gl-native-ios/issues/273)

source 1: https://github.com/mapbox/mapbox-gl-native-ios/blob/master/platform/ios/CHANGELOG.md
source 2: mapbox/mapbox-gl-native#16473 (comment)

Found this issue in maplibre-gl-native android as well as ios.

Unfortunately I could not find any original commit in mapbox-gl-native repo for the mentioned fixes. I pretty sure its in the closed code therefore.

Perhaps someone has an idea where to begin for fixing this.
By the way: older versions of mapbox-gl-native-android (e.g. 8.6.7) does not have this issue (not yet tested for older ios versions).

[test] Results of testing MapLibre `android-v9.4.0` & `ios-v5.11.0`

Summary


Detailed Notes

Android Tests for Release

Using release — https://github.com/maplibre/maplibre-gl-native/releases/tag/android-v9.4.0

AWS Location Tests for MapLibre android-v9.4.0

Geography Class Tests for MapLibre android-v9.4.0

---

iOS Tests for Release

Using release — https://github.com/maplibre/maplibre-gl-native/releases/tag/ios-v5.11.0

  • Using Xcode Server Bots, build the test app iosapp for Simulators & local Wireless devices
  • Wireshark network traffic for telemetry on various tile sets

Geography Class Tests for MapLibre ios-v5.11.0

  • Upgrade MapLibre for iOS from 5.10.0 to 5.11.0 in the project https://github.com/roblabs/openmaptiles-ios-demo
  • Deploy Geography Class.app to a device
  • While adding MapLibre in Swift Packages to your project, use Up to Next Major: 5.11.0. Or something appropriate for your project
    • Verify in the Swift Packages Manager that MapboxEvents has been removed
  • Long press on the Info Button and note down its response, "Mapbox Maps SDK for iOS 5.11.0"
  • Verify Readme.md as it is shown in Xcode

While adding MapLibre in Swift Packages to your project, use Up to Next Major: 5.11.0.


Verify in the Swift Packages Manager that MapboxEvents has been removed


Geography Class running MapLibre 5.11.0 on an iPhone SE


AWS Location Tests for MapLibre 5.11.0

  • Upgrade MapLibre for iOS from 5.10.0 to 5.11.0 in the project https://github.com/roblabs/amazon-location-samples/tree/main/mapbox-gl-native-ios
  • Upgrade CocoaPods, as there may be references to MapboxEvents. It's a good idea to clear the pod cache, see pod -h for guidance. There may be build issues if you do not clear the pod cache.
  • While adding MapLibre in Swift Packages to your project, use Up to Next Major: 5.11.0.
  • Verify in the Swift Packages Manager that MapboxEvents has been removed
  • Enable the Info button, since this project disables it: mapView.attributionButton.isHidden = true
  • Long press on the Info Button and note down its response, "Mapbox Maps SDK for iOS 5.11.0"
  • Deploy Amazon Location Service Demo.app to a device

After: MapLibre 5.11.0 Swift Package in AWS


Before: MapLibre 5.10.0 Swift Package in AWS


While adding MapLibre in Swift Packages to your project, use Up to Next Major: 5.11.0.


Verify in the Swift Packages Manager that MapboxEvents has been removed


AWS Location running MapLibre 5.11.0 on an iPhone SE

Add `libwebp` for Decoding WebP raster tiles

WebP is an open source image format that provides smaller file sizes and lossy & lossless formats.

  • See the branch roblabs/maplibre-gl-native:webp-ios for details on how to bring WebP into MapLibre. The decision was made to document how to do this, rather than a formal PR at this time.

  • a basic style for adding a WebP raster layer for Joshua Tree National Park.

{
  "version": 8,
  "name": "Joshua Tree National Park...in WebP",
  "center": [-115.746, 33.866],
  "zoom": 7,
  "sources": {
    "jotr": {
        "tiles": [ "asset://joshuatree/{z}/{x}/{y}.webp" ],
        "type": "raster"
    }
  },
  "layers": [
    {
      "id": "background",
      "type": "background",
      "paint": {
        "background-color": "#ddeeff"
      }
    },
    {
        "id": "jotr",
        "type": "raster",
        "source": "jotr",
        "layout": {},
        "paint": {}
    }
  ]
}

This work is donated by ePi Rational, Inc. based on work initially done by mapbox/mapbox-gl-native

And updated over several versions of the iOS SDK.


Example of WebP rasters in MapLibre for Joshua Tree National Park

User Tracking Mode cause crash

Every time I set the user tracking mode to .followWithHeading I get a crash. I created a bare sample project below that replicated the error. I have tested on iPhone X, and iPad, both on 14.4.1 and both get the crash after a few seconds, maybe 20 at the most.

I am not calling it from a background thread.

https://github.com/paulsUsername/maplibre-error.git

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView superview]
PID: 9527, TID: 3803024, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x0000000103167fac -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 316
5   Mapbox                              0x000000010316a974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
6   libdispatch.dylib                   0x00000001067cbce4 _dispatch_call_block_and_release + 24
7   libdispatch.dylib                   0x00000001067cd528 _dispatch_client_callout + 16
8   libdispatch.dylib                   0x00000001067cfcc4 _dispatch_queue_override_invoke + 888
9   libdispatch.dylib                   0x00000001067df048 _dispatch_root_queue_drain + 376
10  libdispatch.dylib                   0x00000001067df970 _dispatch_worker_thread2 + 152
11  libsystem_pthread.dylib             0x00000001c9c51568 _pthread_wqthread + 212
12  libsystem_pthread.dylib             0x00000001c9c54874 start_wqthread + 8
2021-03-28 23:01:42.214336+0100 test-123[9527:3803024] [reports] Main Thread Checker: UI API called on a background thread: -[UIView superview]
PID: 9527, TID: 3803024, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x0000000103167fac -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 316
5   Mapbox                              0x000000010316a974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
6   libdispatch.dylib                   0x00000001067cbce4 _dispatch_call_block_and_release + 24
7   libdispatch.dylib                   0x00000001067cd528 _dispatch_client_callout + 16
8   libdispatch.dylib                   0x00000001067cfcc4 _dispatch_queue_override_invoke + 888
9   libdispatch.dylib                   0x00000001067df048 _dispatch_root_queue_drain + 376
10  libdispatch.dylib                   0x00000001067df970 _dispatch_worker_thread2 + 152
11  libsystem_pthread.dylib             0x00000001c9c51568 _pthread_wqthread + 212
12  libsystem_pthread.dylib             0x00000001c9c54874 start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 9527, TID: 3803024, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x0000000103168024 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 436
5   Mapbox                              0x000000010316a974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
6   libdispatch.dylib                   0x00000001067cbce4 _dispatch_call_block_and_release + 24
7   libdispatch.dylib                   0x00000001067cd528 _dispatch_client_callout + 16
8   libdispatch.dylib                   0x00000001067cfcc4 _dispatch_queue_override_invoke + 888
9   libdispatch.dylib                   0x00000001067df048 _dispatch_root_queue_drain + 376
10  libdispatch.dylib                   0x00000001067df970 _dispatch_worker_thread2 + 152
11  libsystem_pthread.dylib             0x00000001c9c51568 _pthread_wqthread + 212
12  libsystem_pthread.dylib             0x00000001c9c54874 start_wqthread + 8
2021-03-28 23:01:42.334464+0100 test-123[9527:3803024] [reports] Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 9527, TID: 3803024, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x0000000103168024 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 436
5   Mapbox                              0x000000010316a974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
6   libdispatch.dylib                   0x00000001067cbce4 _dispatch_call_block_and_release + 24
7   libdispatch.dylib                   0x00000001067cd528 _dispatch_client_callout + 16
8   libdispatch.dylib                   0x00000001067cfcc4 _dispatch_queue_override_invoke + 888
9   libdispatch.dylib                   0x00000001067df048 _dispatch_root_queue_drain + 376
10  libdispatch.dylib                   0x00000001067df970 _dispatch_worker_thread2 + 152
11  libsystem_pthread.dylib             0x00000001c9c51568 _pthread_wqthread + 212
12  libsystem_pthread.dylib             0x00000001c9c54874 start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView setCenter:]
PID: 9527, TID: 3803024, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x0000000103103b00 -[MGLAnnotationView setCenter:] + 72
5   Mapbox                              0x0000000103168138 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 712
6   Mapbox                              0x000000010316a974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
7   libdispatch.dylib                   0x00000001067cbce4 _dispatch_call_block_and_release + 24
8   libdispatch.dylib                   0x00000001067cd528 _dispatch_client_callout + 16
9   libdispatch.dylib                   0x00000001067cfcc4 _dispatch_queue_override_invoke + 888
10  libdispatch.dylib                   0x00000001067df048 _dispatch_root_queue_drain + 376
11  libdispatch.dylib                   0x00000001067df970 _dispatch_worker_thread2 + 152
12  libsystem_pthread.dylib             0x00000001c9c51568 _pthread_wqthread + 212
13  libsystem_pthread.dylib             0x00000001c9c54874 start_wqthread + 8
2021-03-28 23:01:42.464651+0100 test-123[9527:3803024] [reports] Main Thread Checker: UI API called on a background thread: -[UIView setCenter:]
PID: 9527, TID: 3803024, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x0000000103103b00 -[MGLAnnotationView setCenter:] + 72
5   Mapbox                              0x0000000103168138 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 712
6   Mapbox                              0x000000010316a974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
7   libdispatch.dylib                   0x00000001067cbce4 _dispatch_call_block_and_release + 24
8   libdispatch.dylib                   0x00000001067cd528 _dispatch_client_callout + 16
9   libdispatch.dylib                   0x00000001067cfcc4 _dispatch_queue_override_invoke + 888
10  libdispatch.dylib                   0x00000001067df048 _dispatch_root_queue_drain + 376
11  libdispatch.dylib                   0x00000001067df970 _dispatch_worker_thread2 + 152
12  libsystem_pthread.dylib             0x00000001c9c51568 _pthread_wqthread + 212
13  libsystem_pthread.dylib             0x00000001c9c54874 start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView frame]
PID: 9527, TID: 3803050, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x0000000103164278 -[MGLMapView edgePaddingForFollowingWithCourse] + 92
5   Mapbox                              0x0000000103168324 -[MGLMapView userLocationAnnotationViewCenter] + 252
6   Mapbox                              0x0000000103167f30 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 192
7   Mapbox                              0x000000010316a974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
8   libdispatch.dylib                   0x00000001067cbce4 _dispatch_call_block_and_release + 24
9   libdispatch.dylib                   0x00000001067cd528 _dispatch_client_callout + 16
10  libdispatch.dylib                   0x00000001067cfcc4 _dispatch_queue_override_invoke + 888
11  libdispatch.dylib                   0x00000001067df048 _dispatch_root_queue_drain + 376
12  libdispatch.dylib                   0x00000001067df970 _dispatch_worker_thread2 + 152
13  libsystem_pthread.dylib             0x00000001c9c51568 _pthread_wqthread + 212
14  libsystem_pthread.dylib             0x00000001c9c54874 start_wqthread + 8
2021-03-28 23:01:46.983259+0100 test-123[9527:3803050] [reports] Main Thread Checker: UI API called on a background thread: -[UIView frame]
PID: 9527, TID: 3803050, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   Mapbox                              0x0000000103164278 -[MGLMapView edgePaddingForFollowingWithCourse] + 92
5   Mapbox                              0x0000000103168324 -[MGLMapView userLocationAnnotationViewCenter] + 252
6   Mapbox                              0x0000000103167f30 -[MGLMapView updateUserLocationAnnotationViewAnimatedWithDuration:] + 192
7   Mapbox                              0x000000010316a974 __47-[MGLMapView locationManager:didUpdateHeading:]_block_invoke + 280
8   libdispatch.dylib                   0x00000001067cbce4 _dispatch_call_block_and_release + 24
9   libdispatch.dylib                   0x00000001067cd528 _dispatch_client_callout + 16
10  libdispatch.dylib                   0x00000001067cfcc4 _dispatch_queue_override_invoke + 888
11  libdispatch.dylib                   0x00000001067df048 _dispatch_root_queue_drain + 376
12  libdispatch.dylib                   0x00000001067df970 _dispatch_worker_thread2 + 152
13  libsystem_pthread.dylib             0x00000001c9c51568 _pthread_wqthread + 212
14  libsystem_pthread.dylib             0x00000001c9c54874 start_wqthread + 8

Apple Silicon support

The Mapbox.xcframework here is missing a slice for arm64 iOS Simulator: https://github.com/maptiler/maplibre-gl-native/releases/download/ios-v5.10.0/Mapbox-5.10.0.zip

For whatever reason arm64 iOS Simulator is already present in MapboxMobileEvents.xcframework, just not in Mapbox.xcframework.

Screen Shot 2021-01-16 at 11 06 03 AM

Although it doesn't look like you support macOS binaries yet, they'll also need arm64 slices whenever that day comes. I'd suggest just adding macOS support to the existing XCFramework.

Performance issues on iOS 14

Hi. There are performance issues that appears when there's any Custom annotation in the current viewpoint on mapview. I guess these issues are critical for anyone who shows Custom annotations on mapview.

They are noticeable even in this simple example from mapbox doc.

Mapbox team fixed them in v6.2.0. These are two issues from mapbox/mapbox-gl-native-ios connected with them:

  1. On iOS 14 MGLAnnotationView slows down map significantly #350
  2. Fix map stuttering by switching render call to use setNeedsDisplay #411

This commit does not fix the issues I described.

Map opens "zoomed in" when app brought to foreground with `metal-support` -branch

Using iOS SDK built from the metal-support -branch, map opens "zoomed in" when bringing front from background, and then updates to correct zoom level. This causes visible flickering.

This doesn't happen with SDK built from master.

Steps to reproduce

  1. Start iOS SDK demo application built from metal-support -branch
  2. Move app to background (don't close it)
  3. Click app icon to bring back to foreground

Expected behavior

Map opens to correct zoom level without flickering

Actual behavior

Map opens zoomed in, then quickly shows actual zoom level causing flicker.

Following is a video showing the issue with the iOS SDK Demo App, first in normal speed and then slowed down for better view:

MapFlickerZoom.mov

Configuration

Maplibre iOS SDK version: metal-support -branch commit bae8d18
iOS/macOS versions: iOS 14.4
Device/simulator models: iPhone 11 Simulator
Xcode version: 12.4

iOS crash when device is locked while animation (zoom/pan) is ongoing

When panning/zooming map and locking device, iOS app with MapLibre SDK crashes occasionally. Likely same issue as this one with Mapbox iOS SDK.

Crash log:

Hardware Model:      iPhone13,3
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]

Date/Time:           2021-04-20 15:14:10.9909 +0300
Launch Time:         2021-04-20 15:11:46.5801 +0300
OS Version:          iPhone OS 14.5 (18E5154f)
Release Type:        Beta
Baseband Version:    1.60.01-2
Report Version:      104

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

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [6125]
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   libsystem_platform.dylib      	0x00000001ded94684 _platform_memmove + 132
1   AGXMetalA14                   	0x00000001dff7d07c AGX::Texture<(AGXTextureMemoryLayout)3, AGX::G13::Encoders, AGX::G13::Classes>::readRegion(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned... + 632 (agxa_texture_template.hpp:2122)
2   AGXMetalA14                   	0x00000001dff7cdf8 -[AGXA14FamilyTexture getBytes:bytesPerRow:bytesPerImage:fromRegion:mipmapLevel:slice:] + 88 (agxa_texture_objc.mm:654)
3   AppleMetalGLRenderer          	0x00000001df2c19a0 gldReadFramebufferData + 1260 (glr_framebuffer.mm:552)
4   GLEngine                      	0x00000001c7178620 glReadPixels_Exec + 924 (gl_read_pixels.c:329)
5   GLKit                         	0x00000001c5e074ec -[GLKView snapshot] + 252 (GLKView.m:728)
6   Mapbox                        	0x00000001038a6bd4 0x1034bc000 + 4107220
7   CoreFoundation                	0x0000000192dac9e4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:706)
8   CoreFoundation                	0x0000000192dac98c ___CFXRegistrationPost_block_invoke + 52 (CFNotificationCenter.c:173)
9   CoreFoundation                	0x0000000192dabef8 _CFXRegistrationPost + 440 (CFNotificationCenter.c:198)
10  CoreFoundation                	0x0000000192dab8b8 _CFXNotificationPost + 716 (CFNotificationCenter.c:1071)
11  Foundation                    	0x00000001940a3a3c -[NSNotificationCenter postNotificationName:object:userInfo:] + 64 (NSNotification.m:575)
12  UIKitCore                     	0x000000019582b808 -[UIApplication _deactivateForReason:notify:] + 1412 (UIApplication.m:1822)
13  UIKitCore                     	0x0000000194e8af38 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 988 (_UISceneLifecycleMultiplexer.m:686)
14  UIKitCore                     	0x00000001953f2978 _UIScenePerformActionsWithLifecycleActionMask + 104 (_UISceneLifecycleState.m:109)
15  UIKitCore                     	0x0000000194e8aac0 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 224 (_UISceneLifecycleMultiplexer.m:549)
16  UIKitCore                     	0x0000000194e8a580 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 484 (_UISceneLifecycleMultiplexer.m:501)
17  UIKitCore                     	0x0000000194e8a8d0 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 768 (_UISceneLifecycleMultiplexer.m:548)
18  UIKitCore                     	0x0000000194e8a10c -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340 (_UISceneLifecycleMultiplexer.m:454)
19  UIKitCore                     	0x0000000194e92650 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block... + 196 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:72)
20  UIKitCore                     	0x00000001953006e0 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 892 (BSAnimationSettings+UIKit.m:50)
21  UIKitCore                     	0x000000019540b788 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 276 (_UISceneSettingsDiffAction.m:23)
22  UIKitCore                     	0x0000000194e92348 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 384 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:57)
23  UIKitCore                     	0x0000000194cba1cc __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 776 (UIScene.m:1419)
24  UIKitCore                     	0x0000000194cb8b4c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256 (UIScene.m:1140)
25  UIKitCore                     	0x0000000194cb9df4 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 248 (UIScene.m:1386)
26  UIKitCore                     	0x000000019532a1f0 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 492 (UIApplicationSceneClientAgent.m:80)
27  FrontBoardServices            	0x00000001a284e004 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 484 (FBSScene.m:547)
28  FrontBoardServices            	0x00000001a287a740 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 152 (FBSWorkspaceScenesClient.m:533)
29  FrontBoardServices            	0x00000001a285c7f0 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:355)
30  FrontBoardServices            	0x00000001a287a66c __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 396 (FBSWorkspaceScenesClient.m:532)
31  libdispatch.dylib             	0x0000000192a3e878 _dispatch_client_callout + 20 (object.m:559)
32  libdispatch.dylib             	0x0000000192a42368 _dispatch_block_invoke_direct + 268 (queue.c:468)
33  FrontBoardServices            	0x00000001a28a13e4 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:184)
34  FrontBoardServices            	0x00000001a28a1074 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 448 (FBSSerialQueue.m:227)
35  FrontBoardServices            	0x00000001a28a15c8 -[FBSSerialQueue _performNextFromRunLoopSource] + 32 (FBSSerialQueue.m:258)
36  CoreFoundation                	0x0000000192dcbc98 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1967)
37  CoreFoundation                	0x0000000192dcbb94 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2011)
38  CoreFoundation                	0x0000000192dcaf04 __CFRunLoopDoSources0 + 376 (CFRunLoop.c:2056)
39  CoreFoundation                	0x0000000192dc4e78 __CFRunLoopRun + 820 (CFRunLoop.c:2925)
40  CoreFoundation                	0x0000000192dc4610 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
41  GraphicsServices              	0x00000001aa8f2734 GSEventRunModal + 164 (GSEvent.c:2259)
42  UIKitCore                     	0x000000019583111c -[UIApplication _run] + 1072 (UIApplication.m:3270)
43  UIKitCore                     	0x000000019583698c UIApplicationMain + 168 (UIApplication.m:4741)

Steps to reproduce

  1. Pan map
  2. While panning, lock device
  3. SDK crashes when unlocked (not every time though)

Expected behavior

No crashes

Actual behavior

App crashes occasionally when opening after described steps

Configuration
Maplibre iOS SDK version: ios-v5.11.0
iOS/macOS versions: iOS 14.5 Beta (18E5154f)
Device/simulator models: iPhone 12 Pro
Xcode version: 12.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.