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.

Bug with drainQueue

See original GitHub issue

If a render function throws an exception when invoked via drainQueue future async renders are never triggered again. This occurs because the rafId is not reset until after all the render calls have been successfully run, and the exception aborts the entire function.

The most correct solution would seem to be to try/catch the render call:

try  { vm.redraw(true); } catch(err) { console.log("[DOMVM] Redraw Error:",err); }

Although it would be possible to move the rafId = 0 to before the loop, that will then leave the redrawQueue uncleared, which will accumulate redraw requests, continually fail at the same faulting component, and it would also fail to invoke the didRedraws hooks.

Whether to silently fail or log is an orthogonal question. Given that this will always be a programming failure, it seems very incorrect to silently fail. One option is to log only for the developer package, but I personally would hate that as I almost never think to revert to that package until I’ve expended hours trying to find a bug.

Stack Trace (ironically the Firefox trace included async precursor traces and as a result the problem was actually much harder to understand):

image

(@leeoniya – explicitly tagging you, per request)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
leeoniyacommented, Jul 26, 2022

merged my branch.

1reaction
leeoniyacommented, Feb 9, 2022

i’ve added you as a collaborator, feel free to make PR with proposed changes. a test for this scenario would also be helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSCvw04657 - CBR8 Queue ID Pending Drain ... - Cisco Bug
Symptom: Stuck queue drain happening on CBR8 with 16.7 - 16.12 code, while CLC flow control is NOT stuck at Xoff.
Read more >
Error: Can't add new command when connection is in closed stat
Describe the bug Error with reestablishing connection to mysql. [2020-06-12 21:30:21.465 +0000] ... drainQueues [as _onImmediate] ...
Read more >
403712 - Clean up py/utils dependency. - chromium - Monorail
DrainQueue. The DrainQueue function has been moved to cros.factory.utils.type_utils. BUG=chromium:403712. TEST=make test
Read more >
Getting an error on CLI resin preload, bug? - balena Forums
I have tried this with 2 diferrent apps and get the same error. $ resin version 7.1.0 $ npm -v 5.7.1 $ docker...
Read more >
Error on the anypoint-cli api-mgr portal copy
drainQueues (/usr/local/lib/node_modules/anypoint-cli/node_modules/bluebird/js/main/async.js:15:14). at runCallback (timers.js:666:20).
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