Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hxd.File.browse crashes on drag'n'drop with VSCode debugger #783

Open
deepnight opened this issue Apr 9, 2020 · 2 comments
Open

hxd.File.browse crashes on drag'n'drop with VSCode debugger #783

deepnight opened this issue Apr 9, 2020 · 2 comments

Comments

@deepnight
Copy link
Contributor

If you start dragging any file/folder inside a File Open dialog (ie. hxd.File.browse), it crashes HL.

Steps to reproduce:

  1. Create an Open File dialog:
hxd.File.browse( function(browser) {
	trace("open: "+browser.fileName);
});
  1. Run the app with VScode debugger linked
  2. Drag any file/folder inside this dialog
  3. Boom
hl.UI.chooseFile (c:\projects\haxetools\haxe\std\hl\UI.hx:209)
hl.UI.loadFile (c:\projects\haxetools\haxe\std\hl\UI.hx:168)
hxd.File.browse (c:\projects\haxetools\haxe\lib\heaps\deepnight\hxd\File.hx:100)
<local function> (c:\projects\labs\fileBrowser\src\Main.hx:12)
<local function> (c:\projects\haxetools\haxe\std\haxe\Timer.hx:143)
<local function> (c:\projects\haxetools\haxe\std\haxe\Timer.hx:76)
haxe.MainLoop.tick (c:\projects\haxetools\haxe\std\haxe\MainLoop.hx:174)
hxd.System.runMainLoop (c:\projects\haxetools\haxe\lib\heaps\deepnight\hxd\System.hl.hx:134)
<local function> (c:\projects\haxetools\haxe\std\haxe\Timer.hx:143)
<local function> (c:\projects\haxetools\haxe\std\haxe\Timer.hx:76)
haxe.MainLoop.tick (c:\projects\haxetools\haxe\std\haxe\MainLoop.hx:174)
haxe.EntryPoint.processEvents (c:\projects\haxetools\haxe\std\haxe\EntryPoint.hx:99)
haxe.EntryPoint.run (c:\projects\haxetools\haxe\std\haxe\EntryPoint.hx:125)
@MSGhero
Copy link
Contributor

MSGhero commented Mar 4, 2023

I just got the same issue. The error is "Access violation" which I also got when I tried to load a file during its load callback by mistake. Is the issue then in hashlink?

@nspitko
Copy link
Contributor

nspitko commented Mar 11, 2023

I took a quick peek and am fairly sure this is cursed.

First, it happens in HL without heaps, so this probably needs to be re-filed on the hashlink repo.

Second, it only happens when the HL debugger is attached. I've tried to catch it with the VS debugger, but you can't have both attached and it works fine in that case, so getting a stack has eluded me thus far

Third... none of this should even matter?! The drag ang drop operation here is a windows internal interaction and should be invisible to HL. The function being called here does not return during a drag operation, so HL shouldn't even be involved here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants