flutter / flutter-intellij

Flutter Plugin for IntelliJ
https://flutter.dev/using-ide
BSD 3-Clause "New" or "Revised" License
1.98k stars 319 forks source link

exception when using the run button #554

Closed devoncarew closed 7 years ago

devoncarew commented 7 years ago

This happens after launching an app with the run button, when the console view is showing itself. The following exception is thrown, and the console only ever displays a white background.

This is for the Flutter plugin running in IntelliJ CE 2016.2.4 (not 2016.3).

[  75506]  ERROR - llij.ide.plugins.PluginManager - Editor is already disposed 
com.intellij.openapi.util.TraceableDisposable$DisposalException: Editor is already disposed
    at com.intellij.openapi.util.TraceableDisposable.throwDisposalError(TraceableDisposable.java:94)
    at com.intellij.openapi.editor.impl.EditorImpl.throwDisposalError(EditorImpl.java:871)
    at com.intellij.openapi.editor.impl.view.TextLayoutCache.checkDisposed(TextLayoutCache.java:181)
    at com.intellij.openapi.editor.impl.view.TextLayoutCache.getLineLayout(TextLayoutCache.java:140)
    at com.intellij.openapi.editor.impl.view.VisualLineFragmentsIterator.setFragmentIterator(VisualLineFragmentsIterator.java:159)
    at com.intellij.openapi.editor.impl.view.VisualLineFragmentsIterator.init(VisualLineFragmentsIterator.java:150)
    at com.intellij.openapi.editor.impl.view.VisualLineFragmentsIterator.<init>(VisualLineFragmentsIterator.java:102)
    at com.intellij.openapi.editor.impl.view.VisualLineFragmentsIterator.<init>(VisualLineFragmentsIterator.java:37)
    at com.intellij.openapi.editor.impl.view.VisualLineFragmentsIterator$1.iterator(VisualLineFragmentsIterator.java:43)
    at com.intellij.openapi.editor.impl.view.EditorCoordinateMapper.xyToVisualPosition(EditorCoordinateMapper.java:259)
    at com.intellij.openapi.editor.impl.view.EditorView.xyToVisualPosition(EditorView.java:189)
    at com.intellij.openapi.editor.impl.EditorImpl.xyToVisualPosition(EditorImpl.java:1272)
    at com.intellij.openapi.editor.impl.EditorImpl.xyToLogicalPosition(EditorImpl.java:1538)
    at com.intellij.execution.impl.EditorHyperlinkSupport.getHyperlinkInfoByPoint(EditorHyperlinkSupport.java:245)
    at com.intellij.execution.impl.EditorHyperlinkSupport$2.mouseMoved(EditorHyperlinkSupport.java:91)
    at java.awt.Component.processMouseMotionEvent(Component.java:6578)
    at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3342)
    at java.awt.Component.processEvent(Component.java:6302)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4538)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:793)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:625)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:385)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
pq commented 7 years ago

This is for the Flutter plugin running in IntelliJ CE 2016.2.4 (not 2016.3).

This is a good bit of context.

Any idea where to find a 2016.2.4 binary? Closest I could find is 2016.2.5. I'll see if I can repro on that.

pq commented 7 years ago

I'm not reproing this but I do see another exception which I can address and may be a clue as to what's up.

[  15413]   WARN - tellij.ide.HackyRepaintManager - Access to realized (ever shown) UI components should be done only from the AWT event dispatch thread, revalidate(), invalidate() & repaint() is ok from any thread 
java.lang.Exception
    at com.intellij.ide.IdeRepaintManager.checkThreadViolations(IdeRepaintManager.java:107)
    at com.intellij.ide.IdeRepaintManager.addDirtyRegion(IdeRepaintManager.java:97)
    at javax.swing.JComponent.repaint(JComponent.java:4793)
    at java.awt.Component.repaint(Component.java:3356)
    at java.awt.Component.repaintParentIfNeeded(Component.java:2332)
    at java.awt.Component.reshape(Component.java:2320)
    at javax.swing.JComponent.reshape(JComponent.java:4207)
    at java.awt.Component.setBounds(Component.java:2263)
    at java.awt.Component.resize(Component.java:2186)
    at java.awt.Component.setSize(Component.java:2175)
    at java.awt.Component.resize(Component.java:2215)
    at java.awt.Component.setSize(Component.java:2206)
    at com.intellij.openapi.actionSystem.ex.ComboBoxAction$ComboBoxButton.updateButtonSize(ComboBoxAction.java:490)
    at com.intellij.openapi.actionSystem.ex.ComboBoxAction$ComboBoxButton$MyButtonSynchronizer.propertyChange(ComboBoxAction.java:342)
    at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
    at com.intellij.openapi.actionSystem.Presentation.setText(Presentation.java:162)
    at com.intellij.openapi.actionSystem.Presentation.setText(Presentation.java:172)
    at io.flutter.actions.DeviceSelectorAction.updateActions(DeviceSelectorAction.java:155)
    at io.flutter.actions.DeviceSelectorAction.access$000(DeviceSelectorAction.java:35)
    at io.flutter.actions.DeviceSelectorAction$1.selectedDeviceChanged(DeviceSelectorAction.java:93)
    at io.flutter.run.daemon.FlutterDaemonService.setSelectedDevice(FlutterDaemonService.java:141)
    at io.flutter.run.daemon.FlutterDaemonService.addConnectedDevice(FlutterDaemonService.java:149)
    at io.flutter.run.daemon.FlutterAppManager.eventDeviceAdded(FlutterAppManager.java:367)
    at io.flutter.run.daemon.FlutterAppManager.access$3500(FlutterAppManager.java:32)
    at io.flutter.run.daemon.FlutterAppManager$DeviceAddedEvent.process(FlutterAppManager.java:629)
    at io.flutter.run.daemon.FlutterAppManager.handleEvent(FlutterAppManager.java:169)
    at io.flutter.run.daemon.FlutterAppManager.processInput(FlutterAppManager.java:134)
    at io.flutter.run.daemon.FlutterDaemonService$1.daemonInput(FlutterDaemonService.java:41)
    at io.flutter.run.daemon.FlutterDaemonController.onTextAvailable(FlutterDaemonController.java:136)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.execution.process.ProcessHandler$4.invoke(ProcessHandler.java:226)
    at com.sun.proxy.$Proxy14.onTextAvailable(Unknown Source)
    at com.intellij.execution.process.ProcessHandler.notifyTextAvailable(ProcessHandler.java:200)
    at com.intellij.execution.process.BaseOSProcessHandler$SimpleOutputReader.onTextAvailable(BaseOSProcessHandler.java:291)
    at com.intellij.util.io.BaseOutputReader.sendText(BaseOutputReader.java:200)
    at com.intellij.util.io.BaseOutputReader.processInput(BaseOutputReader.java:184)
    at com.intellij.util.io.BaseOutputReader.readAvailableNonBlocking(BaseOutputReader.java:104)
    at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:82)
    at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:160)
    at com.intellij.util.io.BaseDataReader$1.run(BaseDataReader.java:61)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
devoncarew commented 7 years ago

I no longer see that exception, so perhaps it was related to my setup or environment. I'll close this -

devoncarew commented 7 years ago

(thanks for investigating!)

pq commented 7 years ago

Well, the cool thing is it did expose the issue in #555. So there's that! 👍

aChenspring commented 6 years ago

[4031137] WARN - tellij.ide.HackyRepaintManager - Access to realized (ever shown) UI components should be done only from the AWT event dispatch thread, revalidate(), invalidate() & repaint() is ok from any thread java.lang.Exception at com.intellij.ide.IdeRepaintManager.a(IdeRepaintManager.java:107) at com.intellij.ide.IdeRepaintManager.addDirtyRegion(IdeRepaintManager.java:97) at javax.swing.JComponent.repaint(JComponent.java:4793) at java.awt.Component.repaint(Component.java:3311) at javax.swing.plaf.basic.BasicProgressBarUI$Handler.propertyChange(BasicProgressBarUI.java:1258) at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:303) at java.awt.Component.firePropertyChange(Component.java:8448) at javax.swing.JComponent.firePropertyChange(JComponent.java:4491) at javax.swing.JProgressBar.setIndeterminate(JProgressBar.java:934) at com.jd.tig.jdos.gui.toolWindow.view.Compile_BuildToolWindowPanel.uploadFinished(Compile_BuildToolWindowPanel.java:327) at com.jd.tig.jdos.gui.toolWindow.view.Compile_BuildToolWindowPanel.access$1200(Compile_BuildToolWindowPanel.java:48) at com.jd.tig.jdos.gui.toolWindow.view.Compile_BuildToolWindowPanel$2$1.run(Compile_BuildToolWindowPanel.java:268) at java.lang.Thread.run(Thread.java:748)