ColdFusion icon indicating copy to clipboard operation
ColdFusion copied to clipboard

System hangs and ST3 CPU usage rockets

Open jbuda opened this issue 10 years ago • 15 comments

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.

jbuda avatar Oct 16 '13 08:10 jbuda

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 avatar Oct 18 '13 22:10 atomi

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.

atomi avatar Oct 18 '13 23:10 atomi

I have just sent an email to [email protected] with the Component attached.

jbuda avatar Oct 19 '13 00:10 jbuda

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

atomi avatar Oct 19 '13 15:10 atomi

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

jbuda avatar Oct 19 '13 15:10 jbuda

Okay got it.

atomi avatar Oct 19 '13 15:10 atomi

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

atomi avatar Oct 19 '13 15:10 atomi

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?

jbuda avatar Oct 19 '13 15:10 jbuda

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.

atomi avatar Oct 19 '13 15:10 atomi

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.

jbuda avatar Oct 19 '13 16:10 jbuda

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

atomi avatar Oct 19 '13 16:10 atomi

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.

jbuda avatar Oct 19 '13 16:10 jbuda

Thanks!

atomi avatar Oct 19 '13 16:10 atomi

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?

cryptoquick avatar Feb 26 '14 17:02 cryptoquick

@cryptoquick [email protected]

atomi avatar Mar 08 '14 23:03 atomi