Skarred
Skarred

Reputation: 31

Hashlink hlsdl failed to create window

I'm trying to run a simple hello world script using the haxe language with hashlink and hlsdl on linux.

I've managed to squeeze out more errors from visual code, not just Failed to create window.

Could not start debugger on port 6112ERROR : TypeError: Cannot read property 'stop' of undefined

Called from /home/enchilada/.vscode/extensions/haxefoundation.haxe-hl-0.8.2/adapter.js line 6925 column 12
Called from /home/enchilada/.vscode/extensions/haxefoundation.haxe-hl-0.8.2/adapter.js line 411 column 12
Called from /home/enchilada/.vscode/extensions/haxefoundation.haxe-hl-0.8.2/adapter.js line 350 column 11
Called from events.js line 200 column 13
Called from internal/child_process.js line 1021 column 16
Called from internal/child_process.js line 430 column 11
Called from events.js line 200 column 13
Called from net.js line 586 column 12
Called from module.exports.loopWhile (/home/enchilada/.vscode/extensions/haxefoundation.haxe-hl-0.8.2/node_modules/deasync/index.js line 71 column 23)
Called from /home/enchilada/.vscode/extensions/haxefoundation.haxe-hl-0.8.2/adapter.js line 13907 column 27

The same errors gets printed with the newest 0.9.0 hashlink debugger version. When i run it from cmd it prints an error at window.hl.hx line 42 which is the following:

window = new sdl.Window(title, width, height);

At this line with a breakpoint height and width gets replaced with huge random numbers. Here is my full code which is just the sample from the heaps site:

import hxd.App;
import hxd.res.DefaultFont;

class Main extends App
{
    override function init(){       
        var tf = new h2d.Text(hxd.res.DefaultFont.get(), s2d);
        tf.text = "hello";
    }
    static function main() 
    {
        new Main();
    }

}

And here is the compile.hxml I run visual code with:

-lib heaps
-lib hlsdl
-hl hello.hl
-main Main

And the generated launch.json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "HashLink (launch)",
            "request": "launch",
            "type": "hl",
            "hxml": "compile.hxml",
            "cwd": "${workspaceFolder}",
            "preLaunchTask": {
                "type": "haxe",
                "args": "active configuration"
            }
        },
        {
            "name": "HashLink (attach)",
            "request": "attach",
            "port": 6112,
            "type": "hl",
            "hxml": "compile.hxml",
            "cwd": "${workspaceFolder}",
            "preLaunchTask": {
                "type": "haxe",
                "args": "active configuration"
            }
        },
        {
            "name": "Lime",
            "type": "lime",
            "request": "launch"
        }
    ]
}

Upvotes: 1

Views: 499

Answers (0)

Related Questions