question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version: 4.0.0-rc1

Steps to reproduce

  • Create a ScatterplotLayer
  • Zoom and pan

Observed result

Once per minute or so, it crashes with the following error:

Uncaught TypeError: Cannot read property 'model' of null
    at ScatterplotLayer.setUniforms (webpack:///./~/deck.gl/dist/lib/layer.js?:767:21)
    at ScatterplotLayer.getPickingInfo (webpack:///./~/deck.gl/dist/lib/layer.js?:201:14)
    at ScatterplotLayer.pickLayer (webpack:///./~/deck.gl/dist/lib/layer.js?:590:19)
    at eval (webpack:///./~/deck.gl/dist/lib/draw-and-pick.js?:152:20)
    at Array.forEach (native)
    at eval (webpack:///./~/deck.gl/dist/lib/draw-and-pick.js?:141:20)
    at glContextWithState (webpack:///./~/luma.gl/dist-es6/webgl/context.js?:188:13)
    at pickLayers (webpack:///./~/deck.gl/dist/lib/draw-and-pick.js?:63:32)
    at LayerManager.pickLayer (webpack:///./~/deck.gl/dist/lib/layer-manager.js?:188:42)
    at DeckGL._onMouseMove (webpack:///./~/deck.gl/dist/react/deckgl.js?:215:45)
    at EventsProxy.mousemove (webpack:///./~/luma.gl/dist-es6/core/event.js?:352:24)
    at HTMLCanvasElement.eval (webpack:///./~/luma.gl/dist-es6/core/event.js?:160:26)

I couldn’t find a reliable way to reproduce this, but it happens frequently.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ibgreencommented, Mar 22, 2017

@dcposch - Yes this is a very interesting idea, we have actually considered this. As an example we have played with the idea of using separate invisible support layers (with the same data) to provide wider hit areas for picking (e.g. we have a z coordinate based Voronoi layer that we have experimented with for point picking - it works exactly as you describe by rendering a “cone” facing away from the viewer for each point, so the z buffer automatically determines which data point is nearest any screen pixel).

Improving picking could be a good theme for deck.gl v4.1 / v5. It needs some thought though - for really small objects it makes sense to have a wider target area but for bigger objects I think being pixel precise is desirable, at least in some apps.

In some cases there might be other good solutions that can provide good results (e.g. for the icon layer one could consider supporting a second bit mask used during picking to avoid not being able to pick inside transparent parts of icons?).

0reactions
dcposchcommented, Mar 23, 2017

@Pessimistress yeah, that’s a cool idea. dunno if you have to “traverse in a spiral”, but regardless of the exact way it’s done, once you’ve already rendered the whole picking buffer, it should be negligible extra computation to:

  • check a neighborhood around a given pixel coordinate
  • see if there are any objects within some small radius
  • if so, return the closest object
Read more comments on GitHub >

github_iconTop Results From Across the Web

The Adult Form of the “Harvest Bug” | Nature
THE adult form of the larval mite known as the “Harvest Bug” (Leptus autumnalis Shaw), which causes so much annoyance in many rural...
Read more >
Picking scabs: Complications, contacting a doctor, treatment ...
Compulsive scab picking may be a symptom of a health condition known as dermatillomania. Although picking a scab might seem harmless, ...
Read more >
What Is Excoriation, or Skin-Picking? - Child Mind Institute
When kids, usually teens, can't stop picking at skin or cuticles, it's not just a bad habit. Excoriation disorder causes embarrassment and social...
Read more >
Hand Picking, Aspirators, and Tweezers - Bug Hunter
Hand picking. Most medium sized to larger insects can be picked up by hand, provided the species does not pose a threat or...
Read more >
How to Stop Picking Scabs and Heal Scars - Healthline
Most people find it tempting to pick at scabs on their skin, especially when they're dry, peeling at the edges, or beginning to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found