Silently fails to to refactor (change method sig)

I can rename the method.  I can also rename the specific parameter. But I cannot remove the parameter (via change signature).

I've attached video showing the operation failing, both on a class and the underlying protocol.
What kind of logging / other can I attach here to help debug?



Attachment(s):
AppCode failing to change signature.mov
0

Aha. Found the log. Attached.



Attachment(s):
idea.log.zip
0

Did some more digging. Looking like hitting some hard coded limit?
I'm working with a large project. It's now started failing on other methods as well.

I did a search for related bugs; and eventually came across this code:
http://git.jetbrains.org/?p=idea/community.git;a=commitdiff;h=bb53ed77539bda7b5b8622d0d12ded9df3bfa378
Looks like the IDE is running into a problem based on number of events per second over a time window.

I don't know if AppCode is indeed instantiating a FrequencyEventDetector with fixed values, or if they are parameterized.

Is there a way to increase the limit on the FrequencyEventDetector?
This is now getting *bad* (tm) as I'm having to manually refactor things, which is no. fun. at. all. :(

0

Ignore the previous post. I was looking at an old log. Don't think it's relevant.

Here's a fresh run, and matching log + thread dump.



Attachment(s):
Archive.zip
0

Neil, thank you for the additional information. I appologize for the delay.

According to the last log file, you tried to introduce a parameter and AppCode failed to do it. Unfortunately there's not enough information to deternine the reason. Could you copy the method to an empty project and try to reproduce it there? If it's reproducible, you can attach this small project.

0

I've replicated the class structure, but I can't replicate the bug in a small project.

Any tips on what part is going wrong? My wild guess is that it's trying to find the parent of some structure (don't know if it's AST walking or what) and getNameWithParent() is returning nil, which then causes the fatal NPE explosion of doom.  Of course; i've no idea what's *really* happening.

It'd help me replicate with a small project if I knew if what the OCStructType instance object represented. A class? A type? That'd help me focus on trying to get my sample project "replicated" from the problematic project.

i.e:
what does (from OCStructType:613)
        StringBuilder builder = new StringBuilder(qualifiedName.getNameWithParent());


"qualifiedName" actually represent?


Oh; and don't appologize for the time delay, heck, it's christmas! I'm amazed you replied at all!

0

OCStructType is a C++ class type. According to the last log file, you tried to introduce a parameter and this parameter has a C++ class type. Please play a bit with this C++ class and try to identify the pattern.
If by any chance you can share your project with us, we'll be glad to discover the problem by ourselves.
Happy new year!

0

Odd.

The class is an Object-C one. There are two struct params (CMTime) and two NSObject based params.  Are C structs counted as C++ objects by AppCode? The return type is also a NSObject* based instance, and the introduced paramter was a BOOL.

Regarding discovering the bug - I could easily provide monitored access to a dev environment here (e.g: TeamViewer or some similar tool). More than that would require an NDA - and I'd have to see if it's even possible.  Would the former screensharing idea work at all?

0

So introduce parameter fails with parameters of type BOOL. According to the screencast above, when you removed a parameter, it also had type BOOL. So the problem is with type BOOL.
Does it work with other expressions of type BOOL (YES, NO, variable of type BOOL, etc)?
Does it work with expressions of other types (not BOOL)?
If you put the caret at BOOL and jump to definition, where does it jump? (should jump to "typedef signed char BOOL;")
Please try to execute the text search and find the "BOOL" string across your project, are there any BOOL redefinitions?

0

请先登录再写评论。