-
Notifications
You must be signed in to change notification settings - Fork 8.9k
fix(deckgl): prevent crash on Intel integrated GPUs when satellite imagery layer fails #2696
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -357,6 +357,7 @@ export class DeckGLMap { | |||||||||||||||||||
| private aptGroups: import('@/types').APTGroup[] = []; | ||||||||||||||||||||
| private aptGroupsLoaded = false; | ||||||||||||||||||||
| private aptGroupsLayerFailed = false; | ||||||||||||||||||||
| private satelliteImageryLayerFailed = false; | ||||||||||||||||||||
| private iranEvents: IranEvent[] = []; | ||||||||||||||||||||
| private aisDisruptions: AisDisruptionEvent[] = []; | ||||||||||||||||||||
| private aisDensity: AisDensityZone[] = []; | ||||||||||||||||||||
|
|
@@ -833,6 +834,11 @@ export class DeckGLMap { | |||||||||||||||||||
| if (error.message.includes('apt-groups-layer')) { | ||||||||||||||||||||
| this.aptGroupsLayerFailed = true; | ||||||||||||||||||||
| } | ||||||||||||||||||||
| if (error.message.includes('satellite-imagery-layer')) { | ||||||||||||||||||||
| this.satelliteImageryLayerFailed = true; | ||||||||||||||||||||
| console.warn('[DeckGLMap] Satellite imagery layer failed (likely Intel GPU driver incompatibility) — rebuilding layer stack without it'); | ||||||||||||||||||||
| try { this.deckOverlay?.setProps({ layers: this.buildLayers() }); } catch { /* map mid-teardown */ } | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
Comment on lines
+837
to
+841
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
After setting Consider adding a
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. Added debouncedRebuildLayers() call immediately after setting satelliteImageryLayerFailed = true. The failed satellite imagery layer is now removed from deck.gl's render list on the very next frame, rather than waiting for the next moveend/zoomend event. Combined with the GPU-specific console.warn (addressing P1), this gives users immediate feedback and correct layer state. |
||||||||||||||||||||
| }, | ||||||||||||||||||||
| }); | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
@@ -1722,7 +1728,7 @@ export class DeckGLMap { | |||||||||||||||||||
| layers.push(this.createRenewableInstallationsLayer()); | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if (mapLayers.satellites && filteredImageryScenes.length > 0) { | ||||||||||||||||||||
| if (mapLayers.satellites && filteredImageryScenes.length > 0 && !this.satelliteImageryLayerFailed) { | ||||||||||||||||||||
| layers.push(this.createImageryFootprintLayer(filteredImageryScenes)); | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
showLayerWarning()shows the wrong message for a GPU shader failureshowLayerWarning(threshold)was built to tell users "You have more than {threshold} layers active, which may degrade performance" (seet('components.deckgl.layerWarningBody', { threshold })insrc/utils/layer-warning.ts). Calling it here for a GPU shader compilation failure will display a deeply misleading message — the user will believe they have too many layers active, when the real cause is an Intel GPU driver incompatibility.The
apt-groups-layerhandler deliberately does not callshowLayerWarning()(it only sets the flag), so this is also inconsistent with the existing pattern.A dedicated warning — even a simple
console.warnplus a toast/notification — that explains satellite imagery was disabled due to a GPU compatibility issue would be far more helpful to the user.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Removed the misleading showLayerWarning() call. Replaced with a descriptive console.warn targeting the Intel GPU driver incompatibility scenario. The onError callback now logs a clear GPU-specific message instead of incorrectly telling users they have too many layers active.