mapbox / mapbox/mapbox-maps-flutter

crash on iphone 15 pro, MTLTextureDescriptor has width of zero.

Open
#378 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
380
Forks
204
PR merge metrics
No merged PRs in 30d

Description

version: mapbox_maps_flutter: ^0.5.1

-[MTLTextureDescriptorInternal validateWithDevice:] > -[MTLTextureDescriptorInternal validateWithDevice:]:1357: failed assertion `Texture Descriptor Validation
MTLTextureDescriptor has width of zero.
MTLTextureDescriptor has height of zero.
'

d: failed assertion `%s'
error > Texture Descriptor Validation
MTLTextureDescriptor has width of zero.
MTLTextureDescriptor has height of zero.


my code

Widget mapWidget() {
    var mapboxMap = MapWidget(
        cameraOptions: CameraOptions(
            center: Point(coordinates: Position(74.0060, 40.7128)).toJson(),
            zoom: 12.0),
        styleUri: "mapbox://styles/hzfanfei/clp6vni1d00hf01pwaheqb076",
        onMapCreated: _onMapCreated,
    );
    return mapboxMap;
}

_onMapCreated(MapboxMap mapboxMap) {
    this.mapboxMap = mapboxMap;

    mapboxMap.scaleBar.updateSettings(ScaleBarSettings(
      position: OrnamentPosition.TOP_LEFT,
      enabled: false,
      marginBottom: 20,
      marginLeft: 10,
      marginTop: 10,
      marginRight: 20,
    ));
  }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided MapWidget code, mapbox_maps_flutter 0.5.1, and the MTLTextureDescriptor assertion. Reproduce the crash on an iPhone 15 Pro using the supplied style URI and map configuration, then trace which map lifecycle or sizing condition produces the zero dimensions. Done means the crash is reproduced, its cause is identified, and a verified fix or precise reproduction details are available.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.