SublimeText / ColdFusion

ColdFusion Sublime Text Package
MIT License
197 stars 64 forks source link

System hangs and ST3 CPU usage rockets #131

Open jbuda opened 11 years ago

jbuda commented 11 years ago

I recently upgraded to ST3 due to this problem occurring on ST2. However, this issue seems to still happen.

I am creating fully scripted CFC's and every so often 1 component always causes my system to hang and CPU usage goes through the roof. My system is completely unresponsive and requires me to force reset it with the power. When I remove the Coldfusion package from Sublime, then I am able to edit the CFC again. Obviously not ideal as there is no CFML syntax colouring.

I have noticed that this *only occurs when I try to edit my cfc by adding a new function inbetween 2 existing ones.

untitled-1

If i try and add a new function on line 56, starting with 'private', then the hang occurs. I have left the console open and purposely forced the crash, but the console does not output anything when it occurs.

Im pretty sure that the CF Package is the issue as once removed I am able to continue work with no problems.

Im running Windows7 (64-bit), ST3 and the development CF Package.

atomi commented 11 years ago

Sorry for the late reply. I think you're right. It's likely an issue with your code causing the parser to go into infinite recursion.

I'm going to try and replicate this with the code in your screenshot. Thanks.

atomi commented 11 years ago

Okay, I typed out what I could make out in the screenshot. But I wasn't able to reproduce it.

If you can, send me the complete file that is causing the issue - otherwise I can't really do much about it.

Thanks.

jbuda commented 11 years ago

I have just sent an email to atomi@lavabit.com with the Component attached.

atomi commented 11 years ago

Sorry, Lavabit was shutdown. I'm not using email anymore.

jbuda commented 11 years ago

Ah ok, no worries. Just pasting the file in here.

atomi commented 11 years ago

Okay got it.

atomi commented 11 years ago

It seems fine, though I do see an issue with syntax coloring in getBlogLayouts(), though I don't believe that is what is causing your issue.

sublime-text-crash-test

jbuda commented 11 years ago

Thanks for checking it.

Is there anything I can do to debug it a little myself when this occurs? I had the console open when the crash occurred, but nothing was output. Apart from that, is there anything else that you know I could do?

atomi commented 11 years ago

Yeah. What I do is remove the part of the syntax file that is relevant to the code that is causing the crash. Then start rewriting the syntax definition for that code and testing along the way until I get the crash.

By the way, you probably already know but you should be using the Development branch on Sublime Text 3.

jbuda commented 11 years ago

Thanks, but I am not sure what you mean about the "Syntax File"? Is that part of the CF Plugin?

Yep, It was occurring on the master of the plugin and I did uninstall that one and change the version to the development branch. But still happens on my system. There isn't even a conflict on any other plugins as it was a clean install of ST3 and the only plugin is the CF one.

atomi commented 11 years ago

Yeah, in the CF Plugin the relevant file for cfscript based cfc's ( the file that handles the syntax coloring ) is Cfscript.tmLanguage. The regex that handles cfscript functions starts on Line 122 https://github.com/SublimeText/ColdFusion/blob/development/Cfscript.tmLanguage#L122

jbuda commented 11 years ago

Ok great... thanks.

When i am back onto that project I'll try and debug it a little more and provide some extra information if possible. Although, its going to take me time to understand how the plugins work as I have not created any before for ST.

I will keep this thread updated when/if i find anything.

atomi commented 11 years ago

Thanks!

cryptoquick commented 10 years ago

I hit this issue pretty regularly with certain files. @atomi would you like to update your email so I can send you a copy of something that crashes this plugin?

atomi commented 10 years ago

@cryptoquick atomi@inbox.com