I'm using this library with dwm. Here's the draw code that runs in a draw loop.
canvas.onDraw = (ctx) => {
ctx.reset();
ctx.fillStyle = "pink";
ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
ctx.fillStyle = "blue";
ctx.font = "30px Arial";
ctx.textBaseline = "top";
ctx.fillText("Hello World", 10, 10);
};
I see a black screen instead of the drawing:
| Actual result |
Expected result |
 |
 |
I also see a crash when I add ctx.reset(). Here are the logs:
Logs
PS C:\Users\ajits\ghq\unknown-source\unknown-author\deno-skia-check> deno run --allow-ffi --allow-write --allow-env --allow-read main.ts
<--- Last few GCs --->
e start of marking 763 ms) (average mu = 0.40[33656:0000020A53DA4000] 70094 ms: Mark-Compact (reduce) 4095.2 (4097.2) -> 4095.2 (4097.2) MB, pooled: 0 MB, 658.01 / 0.00 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 760 ms) (average mu = 0.40[33656:0000020A53DA4000] 71181 ms: Mark-Compact (reduce) 4095.2 (4097.2) -> 4095.2 (4097.2) MB, pooled: 0 MB, 1086.64 / 0.00 ms (average mu = 0.201, current mu = 0.000) last resort; GC in old space requested
#
# Fatal JavaScript out of memory: CALL_AND_RETRY_LAST
#
==== C stack trace ===============================
CrashForExceptionInNonABICompliantCodeRange [0x00007FF7D0090D2B+1370827]
node_api_get_module_file_name [0x00007FF7CFD1CF97+20724103]
node_api_get_module_file_name [0x00007FF7CFD4D51A+20922122]
node_api_get_module_file_name [0x00007FF7CFCFA7FA+20582890]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF7D02879AC+3430220]
node_api_get_module_file_name [0x00007FF7CFDD462F+21475359]
node_api_get_module_file_name [0x00007FF7CFDED79C+21578124]
node_api_get_module_file_name [0x00007FF7CFDED735+21578021]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF7D006F6AD+1233997]
node_api_get_module_file_name [0x00007FF7CFE32FB4+21862820]
simdutf::get_active_implementation [0x00007FF7D0445838+651288]
(No symbol) [0x00007FF7711F5EFA]
Details
OS: Windows 11
Repro code: link
I'm using this library with dwm. Here's the draw code that runs in a draw loop.
I see a black screen instead of the drawing:
I also see a crash when I add
ctx.reset(). Here are the logs:Logs
Details
OS: Windows 11
Repro code: link