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

{Worker}[Sprite]: Can't find sprite named 'dot.sdf' #1877

Closed
friedbunny opened this issue Jul 10, 2015 · 26 comments
Closed

{Worker}[Sprite]: Can't find sprite named 'dot.sdf' #1877

friedbunny opened this issue Jul 10, 2015 · 26 comments
Labels

Comments

@friedbunny
Copy link
Contributor

Console spew when using the satellite style. Other styles have different spew — think I saw failed marsh-16 loads on Streets. Will post when I see it again.

17:49:13.494 Mapbox GL [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'
17:49:13.496 Mapbox GL [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'
17:49:13.499 Mapbox GL [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'
17:49:13.500 Mapbox GL [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'
17:49:13.509 Mapbox GL [ERROR] {Map}[OpenGL]: stencil mask overflow
17:49:13.560 Mapbox GL [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'
17:49:13.572 Mapbox GL [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'
17:49:13.573 Mapbox GL [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'
17:49:13.574 Mapbox GL [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'
17:49:13.575 Mapbox GL [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'
17:49:13.798 Mapbox GL [ERROR] {Map}[OpenGL]: stencil mask overflow
17:49:25.812 Mapbox GL [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'

/cc @tmpsantos @incanus @kkaefer @ansis

@friedbunny friedbunny added the bug label Jul 10, 2015
@1ec5
Copy link
Contributor

1ec5 commented Jul 10, 2015

This is because the Satellite style lacks a sprite sheet. The workaround for now is to have -mapView:imageForAnnotation: return an image when the Satellite style is active.

@picciano
Copy link

I can confirm the "marsh-16" spewing when using Streets...

2015-07-13 09:54:10.837 TallyGo[38640:15692583] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-13 09:54:10.837 TallyGo[38640:15692583] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-13 09:54:10.837 TallyGo[38640:15692583] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-13 09:54:10.837 TallyGo[38640:15692583] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'

@kkaefer
Copy link
Member

kkaefer commented Jul 13, 2015

This is an intentional message informing you that the stylesheet/data references an image that is not available in the sprite.

@1ec5
Copy link
Contributor

1ec5 commented Jul 13, 2015

@picciano, this is distinct from the issue @friedbunny reports above. It’s surprising, too, because a “marsh-16” sprite is defined in the Mapbox Streets sprite sheet.

@picciano
Copy link

I built from source (master) this morning. This is seen using the default style.

Does https://www.mapbox.com/mapbox-gl-styles/sprites/mapbox-streets.json somehow get cached on the client?

@picciano
Copy link

I removed the app and reinstalled. The warning went away. Something must be getting cached somewhere.

@picciano
Copy link

Warning came back after a couple more launches. Something is definitely a bit off.

@tmpsantos
Copy link
Contributor

@picciano I think I know what is going on. The sprites are loaded asynchronously, so you get something on the screen and later when the sprites arrive we trigger an update and everything is rendered normally (and “marsh-16” is found).

Maybe we should print the warning only after the sprites are loaded/parsed, otherwise the warning is misleading.

@friedbunny
Copy link
Contributor Author

marsh-16 problems → #1885

@picciano
Copy link

That makes sense...i am seeing it with other sprites as well now. It does appear to be timing related.

2015-07-13 13:53:05.066 TallyGo[2648:906379] [INFO] {Worker}[Sprite]: Can't find sprite named 'camera-11'
2015-07-13 13:53:05.081 TallyGo[2648:906383] [INFO] {Worker}[Sprite]: Can't find sprite named 'camera-11'
2015-07-13 13:53:12.530 TallyGo[2648:906381] [INFO] {Worker}[Sprite]: Can't find sprite named 'camera-11'
2015-07-13 13:53:12.531 TallyGo[2648:906381] [INFO] {Worker}[Sprite]: Can't find sprite named 'camera-11'

@1ec5
Copy link
Contributor

1ec5 commented Jul 15, 2015

It looks like all these messages are related. In #1877 (comment), I suggested that Satellite was missing a sprite sheet, but that causes a different message, and only when attempting to display a pin annotation on the map. Let’s track the console output here in #1885.

@1ec5 1ec5 closed this as completed Jul 15, 2015
@vinod1988
Copy link

i have this message on log console, why this come i don't know

[INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-22 20:43:09.938 SwiftMenu[16266:206335] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-22 20:43:09.938 SwiftMenu[16266:206335] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-22 20:43:09.939 SwiftMenu[16266:206335] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-22 20:43:12.731 SwiftMenu[16266:206335] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-22 20:43:12.731 SwiftMenu[16266:206335] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-22 20:43:12.731 SwiftMenu[16266:206335] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-22 20:43:12.731 SwiftMenu[16266:206335] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-22 20:43:12.871 SwiftMenu[16266:206335] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-22 20:43:12.871 SwiftMenu[16266:206335] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
2015-07-22 20:43:12.871 SwiftMenu[16266:206335] [INFO] {Map}[Sprite]: Can't find sprite named 'marsh-16'
...

@1ec5
Copy link
Contributor

1ec5 commented Jul 22, 2015

@vinod1988, those console messages are harmless. They should be fixed by #1885 in the next release.

@iceman201
Copy link

I got same problem as [INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'
Do you guys know how to fix it?

@1ec5
Copy link
Contributor

1ec5 commented Nov 30, 2015

@iceman201, what version of the iOS SDK are you using, and what style? In the past, the Satellite style (specifically, satellite-v7) has been known to trigger this console output. However, in recent versions of the iOS SDK, satellite-v8 no longer refers to dot.sdf.

@kkaefer
Copy link
Member

kkaefer commented Nov 30, 2015

@iceman201 these messages are informational (hence INFO) telling you that you might be referencing a sprite that can't be found; the map should be displayed regardless of these messages.

@iceman201
Copy link

@1ec5 Mapbox-iOS-SDK (3.0.0) is the version I using now

I setup up as mapView = MGLMapView(frame: view.bounds, styleURL: MGLStyle.hybridStyleURL())
just this one

@iceman201
Copy link

@1ec5 it's mapbox://styles/mapbox/satellite-hybrid-v8

@1ec5
Copy link
Contributor

1ec5 commented Nov 30, 2015

Ah, the Hybrid style does refer to dot.sdf.

@kkaefer, although that console message is harmless, it’d be nice to eliminate any unnecessary console output. Does the style need to be modified, or gl-native?

@1ec5 1ec5 reopened this Nov 30, 2015
@iceman201
Copy link

@1ec5 how can I refer a sprite by swift coding?
[INFO] {Worker}[Sprite]: Can't find sprite named 'dot.sdf'

@1ec5
Copy link
Contributor

1ec5 commented Nov 30, 2015

@iceman201, the reference to dot.sdf can’t be accessed from Swift (or Objective-C); it’s baked into the style you’re using. It may be possible to modify the Hybrid style to stop referring to this sprite, using Mapbox Studio.

@kkaefer
Copy link
Member

kkaefer commented Nov 30, 2015

The style needs to be modified, by changing the name of the referenced image to one that actually exists, or by adding the image.

@iceman201
Copy link

@kkaefer mapView = MGLMapView(frame: view.bounds, styleURL: MGLStyle.hybridStyleURL())
in this sentence? or how?

@1ec5
Copy link
Contributor

1ec5 commented Nov 30, 2015

It looks like the style in the mapbox/mapbox-gl-styles project needs to be corrected. For now, the easiest fix is to design your own custom style:

  1. In Mapbox Studio, create a new style based on the “Satellite Streets” template.
  2. Judging from where “dot.sdf” occurs in the style’s JSON code, select the “place_label_city_medium” layer under the “Place labels” folder.
  3. Switch to the Icon tab.
  4. You should see a warning on the Image field. Clear that field.
  5. Hit Publish, then copy the style URL.
  6. Back inside your view controller, change that line of code to:
mapView = MGLMapView(frame: view.bounds, styleURL: NSURL(string: "mapbox://styles/iceman201/asdfghjkl"))
# or whatever the style URL happens to be

@andrewcar
Copy link

I've deleted all of the missing sprites such as "marsh-16," "dot-9," "dot-10," "circle-12," "airport-11" and "us-interstate-3-small" in various Icon tab -> Image fields or Pattern fields indicated by the warnings in orange. I still get a bunch of logs after publishing and building now for some new missing sprites I've never heard of such as "park-11," "us-interstate-2-small," "rail-11," "cemetery-11," "college-11," and a couple of old favorites like "airport-11" and "us-interstate-3-small."

I don't know where these missing sprites are being referenced in Mapbox Studio but I have gone through every tab. I tried waiting a bit to see if the Publish hadn't kicked in but a few minutes later and I still get several logs. I can tell that it looking for these missing files is lowering performance and responsiveness in the map because as soon as I stop adding the annotation to the view, the map runs smoothly.

@friedbunny
Copy link
Contributor Author

We're good here.

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

No branches or pull requests

8 participants