clemos / haxe-sublime-bundle

Sublime Text bundle for Haxe programming language
Apache License 2.0
235 stars 86 forks source link

Sublime Text 3 hangs with any hx file #247

Closed RealJTG closed 8 years ago

RealJTG commented 8 years ago

Sublime Text 3 hangs when I trying to open any .hx file or executing "Haxe: Choose Build Targed". plugin_host.exe runs haxe --wait 6001 eating CPU and causes editor to become unresponsive. No any info in console.

image

I've tried ST3 clean installation and portable version, install bundle through Package Control and directly to /Packages from git — the problem still exists.

Sublime Text 3 build 3083 x86 on Windows 7 Haxe 3.1.3

UPD: ST2 also affected

ghost commented 8 years ago

Please try to edit line 991 in HaxeComplete.py:

while prev != f and ( project_folder is None or project_folder in f ):

To:

while False:
RealJTG commented 8 years ago

Yes, this helps Oops, nope, see below

ghost commented 8 years ago

Thanks, I'll try to fix that line.

ghost commented 8 years ago

Please test.

RealJTG commented 8 years ago

I'm able to reproduce this on another Windows machine and it's kinda weird :D

Drop large xml somewhere in file path (or just disk root) and you should see something like this:

self.find_hxml("D:\test\Breakout\source")
self.find_nmml("D:\test\Breakout\source")
self.find_yaml("D:\test\Breakout\source")
self.find_hxml("D:\test\Breakout")
self.find_nmml("D:\test\Breakout")

<Found D:\test\Breakout\Project.xml>

self.find_yaml("D:\test\Breakout")
self.find_hxml("D:\test")
self.find_nmml("D:\test")
self.find_yaml("D:\test")
self.find_hxml("D:\")
self.find_nmml("D:\")

<Found D:\large.xml - got stuck parsing it>
ghost commented 8 years ago

Interesting, :D. @clemos, should we check the size of *.xml files?

clemos commented 8 years ago

Yeah I guess it would be a good idea :/ 100k is probably already huge for a build file....

ghost commented 8 years ago

Long lines in xml files cause this issue. Added a limit in 200 characters per line.