Yanrishatum / HLCC

A Hashlink tool to compile hlc output
The Unlicense
23 stars 3 forks source link

Uncaught exception: Access violation ( using hlcc.exe from release) #2

Closed flashultra closed 5 years ago

flashultra commented 5 years ago

When run hlcc.exe hlc.json I've got the error : "Uncaught exception: Access violation" I'm using HL 1.8.0 with haxe 4.0.0-preview.5 I also try some other things like : 1) Download latest source and trying to compile:

Called from haxelib/Data.hx line 225 Called from haxelib/client/Main.hx line 1316 Called from haxelib/client/Main.hx line 1353 Called from haxelib/client/Main.hx line 422



The only thing which works was running hlcc.hl ( download from Release ) with command : 
 hl  hlcc.hl   hlc.json
Yanrishatum commented 5 years ago

What OS (I tested only on Win10)? What version hlc.json is (I only tested against 4000)? What libs field in hlc.json contains?

As of hxml_parser - it is on purpose, because modern Haxe does not like when there's a library under a name hxml, so I had to rename it as hxml_parser. Hence installing it via haxelib git hxml_parser https://github.com/Yanrishatum/hxml instead of changing build.hxml was a solution.

flashultra commented 5 years ago

OS : Win 10 , hlc.json -> "version" : 4000, "libs" : ["std"],
I'm testing just simple trace(...) Change to hxml_parser. This is the new error: hxml_parser/git/hxml/Hxml.hx:14: characters 34-62 : Uncaught exception Invalid regex operation because no match was made

Yanrishatum commented 5 years ago

Hm. Is haxe.exe available from PATH? This library assumes it is. To build list of available targets and arguments It calls Sys.command("haxe", ["-help"]); via macro. What haxe -help outputs in console?

flashultra commented 5 years ago

Yes, I set all path as is was write in Configuration section. About haxe -help in console

Haxe Compiler 4.0.0-preview.5+7eb789f54 - (C)2005-2018 Haxe Foundation
Usage: haxe.exe <target> [options] [hxml files...]

Target:
  --js <file>                   compile code to JavaScript file
  --lua <file>                  compile code to Lua file
...................

It's too long, so that is only part of output

Yanrishatum commented 5 years ago

Okay, found it. Pushed update to hxml library, issue was in slightly changed format in help print (headers now had : character). hxml/ArgMacro.hx:53:

        var targetReg:EReg = ~/Target:?\r?\n((?:.*\r?\n)+)Compilation:?\r?\n/gm;

As for Access violation in hlcc.exe: It was because I uploaded .exe file without bundling it libhl.dll which provided std library. I've updated release page to include zip file with .exe and .dll file and it should work now. Alternatively you can just copy libhl.dll from you Hashlink installation.

Thanks for the help.