Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes when running basic iosapp from Xcode #522

Closed
hallahan opened this issue Oct 3, 2022 · 6 comments
Closed

Crashes when running basic iosapp from Xcode #522

hallahan opened this issue Oct 3, 2022 · 6 comments

Comments

@hallahan
Copy link
Contributor

hallahan commented Oct 3, 2022

I cloned the repo and built the basic iosapp in Xcode. The simulator launches, but the standard Maplibre tiles do not render properly. Then, the app crashes due to a segfault.

To Reproduce
Clone repo. Initialize submodules

cd platform/ios
make iproj

Xcode opens, and then we build the project.
Screen Shot 2022-10-03 at 10 01 46 AM

The simulator opens. After a while, I see rendered content, but it is a garbled result.
Screen Shot 2022-10-03 at 9 55 23 AM

After another 30 or so seconds, I get the following error:

Thread 1: EXC_BAD_ACCESS (code=1, address=0x25ff8ffc0)

This is in the draw function within render_line_layer.cpp.
Screen Shot 2022-10-03 at 10 09 29 AM

This is my stack:
Screen Shot 2022-10-03 at 10 10 29 AM

I am also seeing other errors such as:

'cyclone' is not a recognized processor for this target (ignoring processor)

2022-10-03 09:54:50.426402-0700 MapLibre GL[63245:1050115] Task <7C5A4AF5-E3F0-47E9-ABC7-65BF35ACCDB4>.<2> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2103, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <7C5A4AF5-E3F0-47E9-ABC7-65BF35ACCDB4>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <7C5A4AF5-E3F0-47E9-ABC7-65BF35ACCDB4>.<2>"
), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://demotiles.maplibre.org/style.json, NSErrorFailingURLKey=https://demotiles.maplibre.org/style.json, _kCFStreamErrorDomainKey=4}
2022-10-03 09:54:50.426814-0700 MapLibre GL[63245:1050115] Task <16448039-CAF4-4AF4-A4BE-BC2F580EEC6C>.<3> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2103, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <16448039-CAF4-4AF4-A4BE-BC2F580EEC6C>.<3>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <16448039-CAF4-4AF4-A4BE-BC2F580EEC6C>.<3>"
), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://demotiles.maplibre.org/tiles/tiles.json, NSErrorFailingURLKey=https://demotiles.maplibre.org/tiles/tiles.json, _kCFStreamErrorDomainKey=4}
2022-10-03 09:54:50.427107-0700 MapLibre GL[63245:1050115] Task <EC0EEFC5-E508-4562-91C9-94763C3A51BA>.<4> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2103, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <EC0EEFC5-E508-4562-91C9-94763C3A51BA>.<4>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <EC0EEFC5-E508-4562-91C9-94763C3A51BA>.<4>"
), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://demotiles.maplibre.org/tiles/0/0/0.pbf, NSErrorFailingURLKey=https://demotiles.maplibre.org/tiles/0/0/0.pbf, _kCFStreamErrorDomainKey=4}

Platform information (please complete the following information):

  • OS: MacBook Air (M1, 2020) macOS Monterey Version 12.5.1
  • Platform: iOS Simulator iPad (9th generation)
  • Version: Master branch

Additional context
I just want to build the project in xcode, have a simulator or Cocoa app, and be able to set breakpoints and debug core code. Is this the best way to do this? What is a better approach?

@hallahan
Copy link
Contributor Author

hallahan commented Oct 3, 2022

Another error that may shed some light:

2022-10-03 10:14:40.796693-0700 MapLibre GL[63715:1061248] [DEBUG] {}[Database](283): recovered 5 frames from WAL file /Users/n/Library/Developer/CoreSimulator/Devices/1E6257F1-3B49-4DB7-A932-3F213E3750B6/data/Containers/Data/Application/1A3FECC3-2F49-4DAC-863C-815E91848F41/Library/HTTPStorages/org.maplibre.maplibregl/httpstorages.sqlite-wal

@hallahan
Copy link
Contributor Author

hallahan commented Oct 3, 2022

I also checked out ios-v5.12.2, and I am having the same crash.

@roblabs
Copy link
Collaborator

roblabs commented Oct 3, 2022

@hallahan — Thank you for testing & submitting this issue.

This is a duplicate of #268 (comment), and my suggested workaround is posted there (and here for clarity):

Simulators running iOS 14 & 16 do not have an exception. iOS 15 does.

@hallahan
Copy link
Contributor Author

hallahan commented Oct 3, 2022

Interesting. Has anyone determined the actual root cause?

Upgrading my OS and installing Xcode 24. 🤞

@hallahan
Copy link
Contributor Author

hallahan commented Oct 3, 2022

The upgrade resolved the crashing. I am still seeing weird rendering artifacts, though they are less extreme. I attached a video showing the flashes and the odd fragrments.

Is there a different issue relating to this?

I will close this issue and open or add to another regarding the rendering artifact below.

Simulator.Screen.Recording.-.iPad.9th.generation.-.2022-10-03.at.16.09.24.mp4

@hallahan hallahan closed this as completed Oct 3, 2022
@roblabs
Copy link
Collaborator

roblabs commented Oct 4, 2022

Yes, the weird polygons you are reporting are similar to #268 (comment).

I recommend closing this and tracking progress on the other issues.

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

No branches or pull requests

2 participants