kayler-renslow / arma-intellij-plugin

A plugin for Intellij IDEA that allows for syntactical analysis, code inspections, and other nifty features for the SQF scripting language in Arma 3.
MIT License
41 stars 10 forks source link

Crash on large file editing #27

Closed darderik closed 7 years ago

darderik commented 7 years ago

Plugin Version

1.0.5_2

Summary

Crash on file editing

Detail

This file ,when edited,causes a freeze of the IDE. Big files will also cause this.

BangL commented 7 years ago

i managed to get those freezes in a small file, this finally shows what the actual problem is. i can tell pretty sure its somehow related to for-loops now.

pasting the following code snippet freezes my IDE 50% of the times... if thats not enough, just try to add a few more lines of code and your IDE will freeze.

for "_i" from 0 to PMC_itemCtrlCount - 1 do { private _ctrl = (_display displayCtrl (40000 + _i)); if (!isNull _ctrl) then {ctrlDelete _ctrl;}; };

kayler-renslow commented 7 years ago

Well I found the problem. It's an infinite loop. This shouldn't take long to fix now.

kayler-renslow commented 7 years ago

And it's fixed for 1.0.6