Kode / Kha

Ultra-portable, high performance, open source multimedia framework.
http://kha.tech
zlib License
1.48k stars 174 forks source link

Crash on Windows with d3d11 target #1367

Closed posxposy closed 2 years ago

posxposy commented 2 years ago

Describe the bug App crashing on d3d11 target when trying to render an image. Tested on Windows 11 and Windows 10 machines. But runs fine with OpenGL renderer.

To Reproduce Just load an image and try to draw it:

System.start({title: 'Playground', width: 1280, height: 720}, (_) -> {
    Assets.loadEverything(() -> {
        final img = Assets.images.items;

        System.notifyOnFrames((buffers) -> {
            final g2 = buffers[0].g2;

            g2.begin();
            g2.drawImage(img, 0, 0);
            g2.end();
        });
    });
});

Expected behavior The app should not crash.

Screenshots Exception when running in debug mode via VS2019: image

Execution Environment:

Build time: 0m 10s Starting Kinc


- Application output (if it runs): no output

**Additional context**
Looks like this is the last commit which works for me fine: 
bfc592f6678a4cc1344b27b84b7c5fb10ce8fd8f

Thank you! 
RobDangerous commented 2 years ago

Can't reproduce that. What shader is it that it's trying to parse?

posxposy commented 2 years ago

I'm not sure how to check the name of the shader, because today it's crashing in a bit different place:

image

So, looks like it coming from ImageShaderPainter

RobDangerous commented 2 years ago

That is a different issue which I fixed last night, not related to shaders at all.

posxposy commented 2 years ago

Ah, did not see your latest commit. Looks like it works now 👍🏻 Not sure why it was crashing on a shaders stage yesterday. Probably, some kind of computers magic.

Thank you, sir!