badlands icon indicating copy to clipboard operation
badlands copied to clipboard

Received an error while rendering: "Rats! WebGL hit a snag."

Open mbruzek opened this issue 9 years ago • 3 comments

I was trying to use the badlands generator on Google Chrome Version 57.0.2987.133 (64-bit) and I got an error, twice! badlands_error Reloading fixed the problem but I was able to get this error two times in only about 7 consecutive renderings.

mbruzek avatar Apr 04 '17 02:04 mbruzek

Yeah I also got this same error (twice) on my Windows machine, Chrome browser Version 56.0.2924.87 (64-bit). I don't know how to debug Javascript when it comes to this error.

I see the following in the console:

WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost
bundle.js:7218 Error: (regl) context lost
    at Function.raise (bundle.js:7217)
    at ProgressiveRenderer.REGLCommand [as cmd] (bundle.js:16420)
    at ProgressiveRenderer.render (bundle.js:17203)
    at Object.<anonymous> (bundle.js:17118)
    at Generator.next (<anonymous>)
    at step (bundle.js:17174)
    at bundle.js:17174
raise @ bundle.js:7218
bundle.js:7217 Uncaught (in promise) Error: (regl) context lost
    at Function.raise (bundle.js:7217)
    at ProgressiveRenderer.REGLCommand [as cmd] (bundle.js:16420)
    at ProgressiveRenderer.render (bundle.js:17203)
    at Object.<anonymous> (bundle.js:17118)
    at Generator.next (<anonymous>)
    at step (bundle.js:17174)
    at bundle.js:17174

Looks pretty straight forward you go to line 17174 and figure out where you fail, then fix it. It is that easy! According to my console this is the line in error:

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

mbruzek avatar Apr 04 '17 03:04 mbruzek

I got the error a third time on Windows, and this time I was up-to-date. Version 57.0.2987.133 (64-bit)

Google Chrome is up to date.

mbruzek avatar Apr 04 '17 04:04 mbruzek

This may help: https://www.khronos.org/webgl/wiki/HandlingContextLost

mickdekkers avatar Apr 04 '17 10:04 mickdekkers