Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening multiple projects in a new window makes IDEA plug-in unresponsive #510

Closed
2 of 3 tasks
christopher-hopper opened this issue Jan 4, 2018 · 2 comments
Closed
2 of 3 tasks

Comments

@christopher-hopper
Copy link

christopher-hopper commented Jan 4, 2018

Prerequisites

  • Plugin is in the latest version
  • Issue was not reported yet
  • Stack trace (if provided) contains mobi.hsz.idea.gitignore package name

Description

Opening multiple projects into a new window, with the .ignore plugin (idea-ignore) enabled, causes my Mac to become unresponsive to the point where I can only force quit Jetbrains IntelliJ. This only happens after opening a second IntelliJ project in a new window.

Uninstalling the .ignore plugin resolves the issue.

Steps to Reproduce

  1. Launch a project using IntilliJ IDEA.
  2. Open a .gitignore file in the IntelliJ IDEA project.
  3. Click File > Open Recent then choose another project from the recent projects list.
  4. In the Open Project dialog, click the New Window button.
  5. Open a .gitignore file in the second, newly opened project.

Expected behavior: What you expect to happen

I should be able to switch between the two projects, allowing me to copy code from the .gitignore file in one project, to the .gitignore file in another project.

Actual behavior: What actually happens

The Mac OS pinwheel appears and IntelliJ IDEA becomes unresponsive. I cannot switch windows, from one project to the other. The IntelliJ IDEA menus become unresponsive, and I cannot click the Window Close buttons at the top of the window.

The only way to recover is to Force Quit IntelliJ IDEA from the Mac OS Dock.

Reproduces how often: What percentage of the time does it reproduce?

This happens almost always, when working with my current projects. I'm not sure if they have large file system trees that are being traversed, or large indexes. I have not tried with dummy projects containing very few indexed files.

Versions

Plugin:

.idea v2.3.2 (2017-11-17)

IDE:

IntelliJ IDEA 2017.3.2 (Ultimate Edition)
Build #IU-173.4127.27, built on December 26, 2017
Licensed to redacted
Subscription is active until July 14, 2018
JRE: 1.8.0_152-release-1024-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

OS:

System Software Overview:

System Version: macOS 10.12.6 (16G1114)
Kernel Version: Darwin 16.7.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: redacted
User Name: redacted
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 2 days 6:18

Additional Information

Hardware Overview:

Model Name: MacBook Pro
Model Identifier: MacBookPro11,4
Processor Name: Intel Core i7
Processor Speed: 2.2 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Memory: 16 GB
Boot ROM Version: MBP114.0172.B09
SMC Version (system): 2.29f24

@nicity
Copy link

nicity commented Jan 9, 2018

User reported us about freezing IDE due to .gitignore plugin
https://youtrack.jetbrains.com/issue/IDEA-184685
Investigation of the thread dumps identifies corruption of unsynchronized global hashmap via
multithreaded access during indexing, see stacktrace below.
All current .gitignore versions will be marked as incompatible starting from IDE's version 173.4301.10+.

"ApplicationImpl pooled thread 5" prio=0 tid=0x0 nid=0x0 runnable
     java.lang.Thread.State: RUNNABLE
	at java.util.WeakHashMap.getEntry(WeakHashMap.java:431)
	at java.util.WeakHashMap.containsKey(WeakHashMap.java:417)
	at mobi.hsz.idea.gitignore.util.Glob.createPattern(Glob.java:197)
	at mobi.hsz.idea.gitignore.util.Glob.createPattern(Glob.java:226)
	at mobi.hsz.idea.gitignore.util.Glob.createPattern(Glob.java:214)
	at mobi.hsz.idea.gitignore.indexing.IgnoreFilesIndex$1.visitEntry(IgnoreFilesIndex.java:100)
...
	at mobi.hsz.idea.gitignore.indexing.IgnoreFilesIndex.map(IgnoreFilesIndex.java:63)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:273)
	at com.intellij.util.indexing.VfsAwareMapReduceIndex.calculateUpdateData(VfsAwareMapReduceIndex.java:98)
	at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:213)
	at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1652)

SergeyZh pushed a commit to JetBrains/intellij-community that referenced this issue Jan 9, 2018
SergeyZh pushed a commit to JetBrains/intellij-community that referenced this issue Jan 9, 2018
@hsz hsz added the bug label Jan 11, 2018
@hsz hsz added this to the v2.4.0 milestone Jan 11, 2018
hsz added a commit that referenced this issue Jan 11, 2018
@hsz
Copy link
Member

hsz commented Jan 11, 2018

Thank you for this report. Indeed there was a problem with threads.
It's fixed and released with v2.4.0.

@hsz hsz closed this as completed Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants