Debugger freezes when you type 'G' with completion on

Open
#2,217 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Domain
devtools

Research direction

Reproduce the freeze with flixel tpl -n test, lime test neko -debug, and typing g in the debugger. Start at line 147 of flixel/system/debug/completion/CompletionHandler.hx, where ConsoleUtil.runCommand(command) is called, and trace the eager FlxG completion. Done means suggestions appear promptly and the program no longer freezes.

Written by the indexing model from the issue text.

Description

  • Haxe version: 3.4.7
  • Flixel version: 4.6.1
  • OpenFL version: 8.9.0
  • Lime version: 7.3.0
  • Affected targets:
    all? (tested on neko + html5)

Code snippet reproducing the issue:

flixel tpl -n test
cd test
lime test neko -debug

Then open the debugger and type 'g'.


Observed behavior:
Entire program freezes

Expected behavior:
Debugger should display a list of suggestions in a timely manner and also program should not freeze


I believe the cause of the bug is the following line (L147) in flixel/system/debug/completion/CompletionHandler.hx:

var output = ConsoleUtil.runCommand(command);

When typing 'G', the first autocompletion suggestion is FlxG, which is executed eagerly and takes a ridiculous amount of time to complete.

I think the most obvious way to fix this is to disable the eager command previews (though those are cool). It seems like it would be good to limit the execution time within hscript, if that's at all possible.

Dominant language
Haxe
Stars
2.2k
Forks
522
Avg merge
34m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HaxeFlixel/flixel

All issues in HaxeFlixel/flixel

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.