mapbox / mapbox/mapbox-navigation-ios-examples

objective-c issue:'-[NSString initWithBytes:length:encoding:] succeeds'

Open
#218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
63
Forks
32
Avg merge
5m
Merged PRs (30d)
1

Description

When I tried to initialize a mapview, there was something wrong with Exception info like this:

2024-01-15 16:55:35.360561+0800 MapboxDemo[97733:7192348] [Mapbox] [Info, threading]: com.mapbox.common.Worker 3 priority is now 17
2024-01-15 16:55:35.540727+0800 MapboxDemo[97733:7192359] [Mapbox] [Info, nav-native]: Async version config for mapbox/driving-traffic resolved with version 2024_01_07-03_00_07 [{"map":{"tileset_version":"2024_01_07-03_00_07"}}]
2024-01-15 16:55:35.542514+0800 MapboxDemo[97733:7192306] fopen failed for data file: errno = 2 (No such file or directory)
2024-01-15 16:55:35.542539+0800 MapboxDemo[97733:7192306] Errors found! Invalidating cache...
2024-01-15 16:55:35.591126+0800 MapboxDemo[97733:7192347] *** Assertion failure in static NSString * _Nonnull mapbox::bindgen::internal::String::toObjc(const std::string &)(), Marshal+Private.h:71
2024-01-15 16:55:39.614412+0800 MapboxDemo[97733:7192348] [Mapbox] [Warning, nav-native]: Got location timestamp from the past: 1705308936701956864ns <= 1705308938290210048ns. No status will be produced.
2024-01-15 16:55:39.630323+0800 MapboxDemo[97733:7192347] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[NSString initWithBytes:length:encoding:] succeeds'

Please check. Look forward to your help. Thank you so much.

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

The report reproduces during map-view initialization and points to the assertion at Marshal+Private.h:71; start by reproducing it in MapboxDemo and inspecting that conversion path alongside the logged cache and file errors. Done means initialization no longer terminates with NSInternalInconsistencyException and the failure is explained or covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.