Problem with starting win10 app at paths with non-ASCII chars

Situation:

  • cpp-compliled application, win10 platform (Haxe 4.2.4, hxcpp: 4.2.1, lime: 8.0.0)

  • App starts normaly when double-clicked in Explorer. And works without problems

  • BUT if path to appmain.exe contain non-ASCII chars - then double-click on icon do nothing.
    just nothing, no new window, no console, no process

  • BUT if i start cmd.exe first, and then run appmain.exe from cmd console - app starts as usual! No errors, just usual start, despite on non-ASCII chars in path.

According to ProcessMon (from sysinternals) double-click actually starts app too. But app exits immediately with some unknown code (-1073741819), look at screenshot. It happens before any app-related code executed. And never happen when app reside within ASCII-only path. Is this a problem with Lime or something deeper?

Is there a way to fix such behaviour? It is a game, simple double click should start app without console. Any help welcome

Seems -1073741819 is “C0000005” (according to https://www.rapidtables.com/convert/number/decimal-to-hex.html)

A C0000005 error is memory error. Specifically, a C0000005 error is an access violation error caused by a buffer overrun

So it definitely something messed up in app startup code… Is it a Lime`s issue?

Or is it about HXCPP?

Digged further, this is definitely HXCPP problem with ParseCommandLine from StdLibs.cpp

Filed an issue: Crash with executables for windows target when non-ASCII chars present in exe path · Issue #1019 · HaxeFoundation/hxcpp · GitHub

It`s a real pity… as indie dev i get some complaints that game does not even start on windows, and was never able to reproduce it clearly… but now seems the mistery is solved. Hoping HXCPP devs will take a look at this

Followup: seems this is now fixed in master :slight_smile:

4 Likes