Wikunia / brackets-FuncDocr

FuncDocr generates JS/PHPDoc annotations for your functions
101 stars 14 forks source link

Brackets freezes on certain code #68

Closed vinegarZombie closed 8 years ago

vinegarZombie commented 8 years ago

I have a small bit of code in my JS file such as:

var staticVar = {
    lactatingCow : 16.5,
    lactatingSuckler : 12.5,
    dryCow : 10,
    silage : 1,
    meals : 1,
    procOfBody : 0.02
};

If I do ctrl+alt+D or /* brackets completely freezes , and the process has to be killed with task manager I am also not sure if this is related but if I want to enter a comment above the function ctrl+alt+D works fine but /* displays the proper code for a second and then removes itself. This seams to be a issues since the latest update

Wikunia commented 8 years ago

The provided example is no function but yeah it should freeze but in my instance it doesn't.

Wikunia commented 8 years ago

Do you have any logs for the second part of the issue?

vinegarZombie commented 8 years ago

I also tried

function staticVar = {
    lactatingCow : 16.5,
    lactatingSuckler : 12.5,
    dryCow : 10,
    silage : 1,
    meals : 1,
    procOfBody : 0.02
};

and it freeze as well . When I finally did a proper function it was all ok. I also notice that after I removed that chunk of code completely, the /\ started to work properly. If you direct me to how to get the logs I can send them over

Wikunia commented 8 years ago

Oh yeah sure. Debug -> Show Dev Tools or on Linux,Windows (F12)

Wikunia commented 8 years ago

Okay which version of Brackets do you use?

vinegarZombie commented 8 years ago

Release 1.4 build 1.4.0-16380 (release 273804eb3) build timestamp: Mon Jul 27 2015 07:23:52 GMT+0100

Wikunia commented 8 years ago

Hmm that is strange it works on my machine with v1.5 and I checked your release as well. Hope there are some logs ;)

Wikunia commented 8 years ago

Does sth like:

$scope.getAllVersion=function(){

}

$scope.getAllVersion=function(asad){

}

work like in #67 ? Or does every function doesn't work properly?

vinegarZombie commented 8 years ago

I have lots of things going on in the console , don't really know which is relevant. I can see that I get sigKeys: ["indentation", "parameters", "returns", "throws", "description", getUnique: function, getCol: function] whenever its successful, I also noticed , that it unfreeze after around 1.30 - 2min but nothing is really displayed in the console. screenshot 2015-10-15 16 39 04 also sorry for not being more precise on the issues , as you can see I don't so this kind of reports often :)

vinegarZombie commented 8 years ago
$scope.getAllVersion=function(){

}

$scope.getAllVersion=function(asad){

}

Both work fine I get

/**
 * [[Description]]
 */

and

/**
 * [[Description]]
 * @param {[[Type]]} asad [[Description]]
 */
Wikunia commented 8 years ago

It's fine and reminds me that I have to remove the normal logs next time :D Can you move all your other extensions (you can go to the extension folder using: Help -> Show Extension Folder) to the folder disabled? (one folder above)

Wikunia commented 8 years ago

Yeah but not my extension ;) Then you have to reload brackets and hopefully the error disappears. Then we can check your extensions ;)

vinegarZombie commented 8 years ago

screenshot 2015-10-15 17 02 39 I moved everything other then FuncDocr to disabled , but it work the same around to min frozen and then its ok console is not showing nothing when that happens

Wikunia commented 8 years ago

Hmm and which version of FuncDocr worked for you?

vinegarZombie commented 8 years ago

screenshot 2015-10-15 17 11 40 I am not sure which was the previous version , I normally keep everything up to date but I saw a update , so I clicked that was on Tuesday

Wikunia commented 8 years ago

Wow that doesn't make any sense to me :/ There was a really small change from v0.8.30 to v0.8.31

vinegarZombie commented 8 years ago

I must say it is bizarre. Maybe it was there before but I never commented that code , now I am not sure myself. Does it do anything on your side, or just doesn't generate the comment ?

Wikunia commented 8 years ago
var staticVar = {
    lactatingCow : 16.5,
    lactatingSuckler : 12.5,
    dryCow : 10,
    silage : 1,
    meals : 1,
    procOfBody : 0.02
};

function staticVar = {
    lactatingCow : 16.5,
    lactatingSuckler : 12.5,
    dryCow : 10,
    silage : 1,
    meals : 1,
    procOfBody : 0.02
};

Doesn't generate any comments but doesn't break but well for me it's correct because it's not a function, right?

vinegarZombie commented 8 years ago

Yes absolutely , they are not functions. To make things more interesting , I checked it on my home machine and nothing like this happens. It seams that its only a issues on my work laptop. Don't know how much difference it makes but my work laptop is win 8 and home machine win 7.

Wikunia commented 8 years ago

"Unfortunately" I have Linux ;) Okay I'll add some logs and then you can install from url. Stay tuned!

Wikunia commented 8 years ago

Thanks for testing!

vinegarZombie commented 8 years ago

No problems , thanks for a great plugin :)

Wikunia commented 8 years ago

Can you send me the new logs please :)

vinegarZombie commented 8 years ago

I think I have it. I made a small file 29 lines with some code , and I couldn't see the code freezing. I did notice that the 'code:' section displays the entire file so 29 lines of code. The previous code where the freezing happens is over 300 lines and 'that' code is on the top of the file so the entire 300 lines are being parsed screenshot 2015-10-16 09 46 33

Wikunia commented 8 years ago

Oh okay, thanks. Now I can reproduce the error, at the moment I have no idea why this happens, but yeah I'll work on it!

Wikunia commented 8 years ago

I hope I have good news for you @vinegarZombie ;) Would be great if you can install the bugfix via url. Just close the issue, if everything works, then I'll register the new version. Thanks for your issue and help again!

vinegarZombie commented 8 years ago

@Wikunia I can confirm that it does fix the problem :) just in the console I saw that brackets isn't fully happy with the regexp , but nothing bad is happening. screenshot 2015-10-16 12 08 05

Wikunia commented 8 years ago

Well it's just a long long regexp which I printed out :D I'm so sorry that I use regexes for this kind of stuff, but there is no good parser which supports JS and PHP :(

vinegarZombie commented 8 years ago

Nah its nothing, As long as it works :) :+1: