dkandalov / scratch

Scratch is IntelliJ IDEs plugin to quickly open temporary text editor
http://plugins.jetbrains.com/plugin/?null&pluginId=4428
83 stars 8 forks source link

Hangs during startup on IDEA 13.1.3 on OS X #21

Closed pmoriarty closed 10 years ago

pmoriarty commented 10 years ago

Logs:

2014-06-22 14:34:48,486 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2014-06-22 14:34:48,510 [     24]   INFO -        #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IU-135.909, 23 May 2014 00:00)
2014-06-22 14:34:48,510 [     24]   INFO -        #com.intellij.idea.Main - OS: Mac OS X (10.9.3, x86_64)
2014-06-22 14:34:48,510 [     24]   INFO -        #com.intellij.idea.Main - JRE: 1.6.0_65-b14-462-11M4609 (Apple Inc.)
2014-06-22 14:34:48,510 [     24]   INFO -        #com.intellij.idea.Main - JVM: 20.65-b04-462 (Java HotSpot(TM) 64-Bit Server VM)
2014-06-22 14:34:48,514 [     28]   INFO -        #com.intellij.idea.Main - JVM Args: -Dfile.encoding=UTF-8 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djsse.enableSNIExtension=false -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Xverify:none -Xbootclasspath/a:../lib/boot.jar -Xms128m -Xmx1280m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=96m -XX:+UseCompressedOops -Didea.java.redist=NoJavaDistribution -Didea.paths.selector=IntelliJIdea13 -DCVS_PASSFILE=~/.cvspass -Dsun.java2d.noddraw=true -Didea.fatal.error.notification=disabled -Didea.max.intellisense.filesize=2500 -Didea.use.default.antialiasing.in.editor=false -Dcom.apple.mrj.application.live-resize=false -Dapple.awt.graphics.UseQuartz=true -Didea.no.launcher=false -Dapple.awt.fullscreencapturealldisplays=false -Dsun.java2d.pmoffscreen=false -Dapple.laf.useScreenMenuBar=true -Dswing.bufferPerWindow=false -Djava.endorsed.dirs= -Didea.smooth.progress=false -Didea.popup.weight=heavy -Didea.cycle.buffer.size=1024 -Dsun.java2d.d3d=false -Didea.xdebug.key=-Xdebug -Didea.dynamic.classpath=false
2014-06-22 14:34:48,551 [     65]   INFO -        #com.intellij.idea.Main - JNA library loaded (64-bit) in 37 ms
2014-06-22 14:34:48,580 [     94]   INFO -        #com.intellij.idea.Main - Snappy library loaded (1.0.5) in 29 ms
2014-06-22 14:34:48,583 [     97]   INFO -        #com.intellij.idea.Main - initializing environment
2014-06-22 14:34:48,584 [     98]   INFO - .intellij.util.EnvironmentUtil - loading shell env: /bin/zsh -l -i -c '/Applications/IntelliJ IDEA 13.app/bin/printenv.py' '/private/var/folders/j0/kstsn10d0r902txr_zvnxbrh0000gn/T/intellij-shell-env6365297305458233000.tmp'
2014-06-22 14:34:48,735 [    249]   INFO - .intellij.util.EnvironmentUtil - shell environment loaded (48 vars)
2014-06-22 14:34:49,355 [    869]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor flex-ide-specific.xml
2014-06-22 14:34:49,722 [   1236]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor intellilang-tapestry-support.xml
2014-06-22 14:34:50,311 [   1825]   INFO - llij.ide.plugins.PluginManager - 132 plugins initialized in 1343 ms
2014-06-22 14:34:50,313 [   1827]   INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: ASP (0.1), Android Support (10.0), Ant Support (1.0), Application Servers View (0.2.0), AspectJ Support (1.1), Byte Code Viewer (0.1), CFML Support (3.53), CSS Support, CoffeeScript (2.0), Commander (1.0.0), Copyright (8.1), Coverage, Cucumber for Groovy (999.999), Cucumber for Java (999.999), DSM Analysis (1.0.0), Database Support (1.0), Eclipse Integration (3.0), Emma, Flash/Flex Support (1.0), FreeMarker support (1.0), GWT Support (1.0), Gherkin (999.999), Git Integration (8.1), GitHub, GlassFish Integration (1.0), Google App Engine Integration (1.1.4), Gradle, Grails (9.0), Groovy (9.0), GuiceyIDEA (8.0), HAML, HTML Tools (2.0), Heroku integration (1.0), Hibernate Support (1.0), I18n for Java, IDEA CORE, IDEtalk (1.0), IntelliLang (8.0), J2ME (1.0), JBoss Drools Support (1.0), JBoss jBPM (2.0.0), JSR45 Integration (1.0), JUnit (1.0), Java EE: Bean Validation Support (1.1), Java EE: EJB, JPA, Servlets (1.0), Java EE: JMS, JSON Processing, Concurrency, Transaction  (1.0), Java EE: RESTful Web Services (JAX-RS) (1.0), Java EE: Web Services (JAX-WS) (1.9), Java EE: WebSockets (1.0), Java Server Pages Integration (1.0), JavaFX (1.0), JavaScript Debugger (1.0), JavaScript Intention Power Pack (0.9.4), JavaScript Support (1.0), Jetty Integration (1.0), LESS support, Maven Integration, Maven Integration Extension, OpenShift integration (1.0), Osmorc (1.4.4), Persistence Frameworks Support (1.0), Plugin DevKit (1.0), Properties Support, QuirksMode, REST Client, Refactor-X (2.01), Remote Hosts Access (0.1), Resin Integration (8.1), SASS support, SQL support (1.0), SSH Remote Run (0.1), Spring AOP/@AspectJ (1.0), Spring MVC Support (1.0), Spring Support (1.0), Spy-js (999.999), Structural Search (9.0), Stylus support (999.999), Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TestNG-J (8.0), Time Tracking (1.0), Tomcat and TomEE Integration (1.0), Type Migration, UI Designer, UML Support (1.0), Velocity support (1.0), W3C Validators (2.0), XPathView + XSLT Support (4), XSLT-Debugger (1.4), YAML, ZKM-Unscramble (1.0), hg4idea (10.0)
2014-06-22 14:34:50,313 [   1827]   INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: AngularJS (135.937), BashSupport (1.1beta23-idea13.1), Cursive (0.1.27), Jade (133.74), Karma (135.1027), Markdown (0.9.5), Scratch (1.01), Vagrant (0.2)
2014-06-22 14:34:50,313 [   1827]   INFO - llij.ide.plugins.PluginManager - Disabled plugins: CVS Integration (11), ClearCase Integration (2.0), Cloud Foundry integration (1.0), CloudBees integration (1.0), Geronimo Integration (1.0), JBoss Integration (1.0), JBoss Seam Pageflow Support (1.0), JBoss Seam Pages Support (1.0), JBoss Seam Support (1.0), Java EE: Batch Applications (1.0), Java EE: Contexts and Dependency Injection (1.1), Java EE: Java Server Faces (2.2.X.), Perforce Integration (2.0), Playframework Support (1.0), Spring Batch (1.0), Spring Data (1.0), Spring Integration Patterns (1.0), Spring OSGi (1.0), Spring Roo Console (1.0), Spring Security (1.0), Spring Web Flow (1.0), Spring Web Services (1.0), Struts 1.x (2.0), Struts 2 (1.0), TFS Integration (999.999), Tapestry support (1.0), Vaadin Support (1.0), Visual SourceSafe Integration (2.0), WebLogic Integration (1.0), WebSphere Integration (1.0), dmServer Support (0.9.5)
2014-06-22 14:34:50,783 [   2297]   INFO - ellij.vfs.persistent.FSRecords - Marking VFS as corrupted
2014-06-22 14:34:50,784 [   2298]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=1304428544
2014-06-22 14:34:50,809 [   2323]   INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: /Applications/IntelliJ IDEA 13.app/bin/fsnotifier
2014-06-22 14:34:50,823 [   2337]   INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational.
2014-06-22 14:34:51,449 [   2963]   INFO - .history.utils.LocalHistoryLog - FS has been rebuild, rebuilding local history...
2014-06-22 14:34:51,767 [   3281]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: []
2014-06-22 14:34:52,909 [   4423]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/macros.xml file is null
2014-06-22 14:34:52,915 [   4429]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/quicklists.xml file is null
2014-06-22 14:34:54,416 [   5930]   INFO -             plugin.repl.server - Started local REPL on port 64110
2014-06-22 14:34:54,446 [   5960]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/intentionSettings.xml file is null
2014-06-22 14:34:54,506 [   6020]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/scratch_config.xml file is null
2014-06-22 14:34:54,508 [   6022]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/scratch.xml file is null
(END)

Seeing thread dumps with the following:

"Alarm pool(shared)" prio=0 tid=0x0 nid=0x0 blocked
     java.lang.Thread.State: BLOCKED
 on com.intellij.openapi.application.impl.ApplicationImpl@22c249c5 owned by "AWT-EventQueue-1 13.1.3#IU-135.909, eap:false" Id=29
        at com.intellij.openapi.application.impl.ApplicationImpl.getStateStore(ApplicationImpl.java:197)
        at com.intellij.openapi.application.impl.ApplicationImpl.initializeComponent(ApplicationImpl.java:205)
        at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.initializeInstance(ServiceManagerImpl.java:164)
        at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter$1.compute(ServiceManagerImpl.java:147)
        at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)

"ApplicationImpl pooled thread 3" prio=0 tid=0x0 nid=0x0 waiting on condition
     java.lang.Thread.State: TIMED_WAITING
 on java.util.concurrent.SynchronousQueue$TransferStack@60505f8
        at sun.misc.Unsafe.park(Native Method)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:196)
        at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
        at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
        at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:955)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:917)
        at java.lang.Thread.run(Thread.java:695)
        at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

"ApplicationImpl pooled thread 2" prio=0 tid=0x0 nid=0x0 waiting on condition
     java.lang.Thread.State: TIMED_WAITING

        at java.lang.Thread.sleep(Native Method)
        at com.intellij.util.TimeoutUtil.sleep(TimeoutUtil.java:58)
        at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:105)
        at com.intellij.util.io.BaseDataReader$1.run(BaseDataReader.java:46)
        at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:695)
        at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

"ApplicationImpl pooled thread 1" prio=0 tid=0x0 nid=0x0 runnable
     java.lang.Thread.State: RUNNABLE

        at sun.nio.cs.StreamDecoder.ready(StreamDecoder.java:165)
        at java.io.InputStreamReader.ready(InputStreamReader.java:178)
        at com.intellij.util.io.BaseOutputReader.readAvailable(BaseOutputReader.java:54)
        at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:99)
        at com.intellij.util.io.BaseDataReader$1.run(BaseDataReader.java:46)
        at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:695)
        at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

"ApplicationImpl pooled thread 0" prio=0 tid=0x0 nid=0x0 waiting on condition
     java.lang.Thread.State: WAITING
 on java.lang.UNIXProcess@4c2f8262
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at java.lang.UNIXProcess.waitFor(UNIXProcess.java:115)
        at com.intellij.execution.process.ProcessWaitFor$1.run(ProcessWaitFor.java:30)
        at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:695)
        at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

"AWT-EventQueue-1 13.1.3#IU-135.909, eap:false" prio=0 tid=0x0 nid=0x0 waiting on condition
     java.lang.Thread.State: WAITING
 on java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync@2d7e51a9
        at sun.misc.Unsafe.park(Native Method)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireInterruptibly(AbstractQueuedSynchronizer.java:867)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1201)
        at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lockInterruptibly(ReentrantReadWriteLock.java:945)
        at com.intellij.openapi.application.impl.ApplicationImpl$WriteAccessToken.<init>(ApplicationImpl.java:1240)
        at com.intellij.openapi.application.impl.ApplicationImpl.acquireWriteActionLock(ApplicationImpl.java:1210)
        at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:993)
        at scratch.filesystem.FileSystem.createFile(FileSystem.java:117)
        at scratch.filesystem.FileSystem.createEmptyFile(FileSystem.java:113)
        at scratch.MrScratchManager.migrate(MrScratchManager.java:64)
        at scratch.ide.ScratchComponent.initComponent(ScratchComponent.java:51)
krasa commented 10 years ago

I would just drop that migration stuff.

dkandalov commented 10 years ago

I agree, although the problem is not with migration but with creating example scratches (and from more technical point of view it's because write action can deadlock if executed in application component initialization).

dkandalov commented 10 years ago

@pmoriarty thanks a lot reporting this, should be fixed in 1.05 version.

pmoriarty commented 10 years ago

Thanks for the quick response. I'll try it out when it's released.