Loading Code Coverage Data window is spawning multiple windows

Issue #491 resolved
John De Santiago created an issue

When attempting to display code coverage after executing a test I noticed the "Loading Code Coverage Data" window was flashing and the process seemed to be taking longer than it should.

It would then seem to stop with no results and then start over again. I end up having to force quit IntelliJ.

It is difficult to describe the issue even with a screen shot so I attached a video as well of what I see on my end.

I am on the most current version of both IntelliJ and Illuminated Cloud running on a Macbook Pro 15" (2016) OSX Sierra.

Comments (13)

  1. Scott Wells repo owner

    Whoa! Okay, so that's bad. Let me look at why that might be happening. I was already going to put out a small patch in this area soon, so let me see if I can figure that one out while I'm in the area. Thanks for the CRAZY screenshot!

  2. Scott Wells repo owner

    John, so far I'm unable to reproduce this behavior. Would you mind adding the following under Help>Debug Log Settings and reproducing it:

    #com.illuminatedcloud.intellij.coverage.ApexCoverageSuite
    

    Then please send me your idea.log using Help>Show Log in Finder. Hopefully that'll allow me to see how it's getting into this state.

  3. John De Santiago reporter

    I attached the debug logs. I noticed it generated a handful of files so I zipped them all up and sent them. I made sure the log directory was clean before running the code coverage tool so all of these logs should pertain specifically to this method.

    Also, I should point out that I have other projects that do not have this issue and I have even created a new project for this same instance and it works just fine. So my guess is there is some kind of corruption that occurred to the project itself.

  4. Scott Wells repo owner

    John, I can see an infinite recursion in the logs you sent that's causing this odd behavior. Basically IntelliJ is calling into IC for some coverage info and then some of the IntelliJ APIs that IC is calling ends up causing the recursion. Ultimately this results in a StackOverflowError. I'll dig in and see why this is happening and what I can do to avoid/short circuit it. Thanks for providing the logs!

  5. John De Santiago reporter

    Thanks for the update Scott. I also noticed this happening to another project that previously didn't have an issue. I did notice one additional thing, though. If I collapse the Project sidebar window while loading code coverage, multiple windows do not get spawned but it still fails. If I attempt to open the Project sidebar window the code coverage window starts up again and then the UI becomes unresponsive and I have to force quit.

  6. John De Santiago reporter

    Hi Scott, thanks for the update. That seemed to address the issue. It did, however, display a new message which I attached. I retrieved and refreshed my metadata and then re-ran the code coverage tool and the error went away.

    I have run it several times now and it seems to perform very well. Including with the Project sidebar window open (if that had any bearing on the issue).

    2016-12-19_12-05-38.png

  7. Scott Wells repo owner

    Thanks for verifiying, John. That message you saw is expected when lines are reported by the API that don't exist in the corresponding local source file, and as you saw, refreshing from the server should get those back in alignment. This fix will be included in the next official release which will come out this week, but feel free to hang onto that one for the moment since it's just 1.7.5.8 with this fix and perhaps one or two other small ones. You'll still be prompted to update when 1.7.5.9 comes out.

    Oh, and having the Project sidebar open was definitely a contributor to the issue as the recursion was happening when it was trying to render coverage information in the Project view while loading which was triggering another load.

  8. John De Santiago reporter

    Since I am on the hotfix version I wasn't sure where to report this issue I am seeing. If I need to post a new bug let me know.

    But I noticed that I haven't been able to get error information when saving classes and pages. I consistently get the message "Error(1:1) <unknown>". I am not sure what causes it. I seem to get valid error messages and then at some point it stops working and I get this error message. I have to paste my code into Salesforce directly to see what the error message is. The errors vary in causes from misspellings, syntax errors, etc.

    I even looked at the event log but it just shows a deployment failure with the message "unknown".

    I tried refreshing, retrieving, and rebuilding the global symbol cache.

  9. Scott Wells repo owner

    John, I just uploaded 1.7.5.9. Please update to it and see if the problem still occurs. If it does, please add the following under Help>Debug Log Settings:

    #com.illuminatedcloud.intellij.builder.ForceComBuilder
    #com.illuminatedcloud.intellij.builder.ForceComToolingApiDeployer
    #com.illuminatedcloud.intellij.builder.ForceComMetadataApiDeployer
    

    and reproduce the issue, then send me your idea.log using Help>Show Log in Explorer/Finder. I'll try to see what's going on.

  10. Scott Wells repo owner

    Delivered in 1.7.5.9. If the other issue with deployment is still happening, please open a new issue for that with the requested log.

  11. Log in to comment