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

Command line results window problem #375

Closed
loonies opened this issue Feb 17, 2014 · 12 comments
Closed

Command line results window problem #375

loonies opened this issue Feb 17, 2014 · 12 comments
Labels

Comments

@loonies
Copy link
Contributor

loonies commented Feb 17, 2014

Sometimes I get the problem with command line results window.

It moves up or the size gets to one line where it should be more than
one line.

It occurs when I'm using unsaved file.

Example with :marks and :reg. Window size shrinks to one line, where
it should be more lines:

  • open file 1, modify, do not save
  • open file 2
  • try :marks or :reg

Example with search/replace goes something like this (could not reproduce,
but I remember occuring). Window moves up to 2/3 of the editor:

  • open file 1, modify, do not save
  • try search/replace

If I try to close Eclipse (if you open any popup window probably, didn't
try), it will reset the window size, but only for the current command.

Screenshots of :marks and :reg commands:

vrapper-registers
vrapper-marks

Screenshot of exit (view gets redrawn):

vrapper-exit

I'll post the screenshot of search/replace once it occurs.

@albertdev
Copy link
Member

I'm afraid I can't reproduce it using Eclipse Juno, Vrapper 0.41 and using Xubunto / XFCE as OS / Window manager.

  • What version of Eclipse are you using, which OS (and possibly which window manager)?
  • Does it happen every time using unsaved files, or is it then just x% of the time?
  • Does Vrapper send any errors in the Error log view?

I'm not saying there isn't a bug here. It's just that the UI layout code is a bit of a hack and is pretty fickle, so any extra info would help. If there is a clear error in the log, this might even be a small fix.

@loonies
Copy link
Contributor Author

loonies commented Feb 19, 2014

I was unable to isolate the problem. I had some 3rd party plugins
installed when error occurred. I deinstalled everything and created a
vanilla setup as described below but could not reproduce the problem.
Reverted back to my standard setup and was not able to reproduce again.
At this point I'm not sure what and how is happening.

Setup details:

  • OS, WM, Eclipse: Arch Linux; Xfce; Eclipse 4.3.1
  • Vrapper version: the latest unstable 0.41.20140215, Core and Split
    Editor Plugin intalled
  • error log pasted below

Eclipse intalled using package manager, Vrapper using install site.

I'll keep an eye on this and report back. Maybe attched error log gives
some insight.

!SESSION 2014-02-19 11:20:29.864 -----------------------------------------------
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.ui 4 0 2014-02-19 11:23:05.627
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
    at org.eclipse.swt.SWT.error(SWT.java:4397)
    at org.eclipse.swt.SWT.error(SWT.java:4312)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3717)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3366)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
    at org.eclipse.jface.window.Window.open(Window.java:802)
    at org.eclipse.ui.internal.about.AboutHandler.execute(AboutHandler.java:32)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
    at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:420)
    at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3363)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
    at org.eclipse.jface.window.Window.open(Window.java:802)
    at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:334)
    at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:114)
    at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:209)
    at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:218)
    at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.preWindowShellClose(IDEWorkbenchWindowAdvisor.java:171)
    at org.eclipse.ui.internal.WorkbenchWindow$6.close(WorkbenchWindow.java:474)
    at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer$12.shellClosed(WBWRenderer.java:612)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1416)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1401)
    at org.eclipse.swt.widgets.Shell.closeWidget(Shell.java:646)
    at org.eclipse.swt.widgets.Shell.gtk_delete_event(Shell.java:1228)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2082)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:5467)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4569)
    at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8742)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1243)
    at org.eclipse.swt.internal.gtk.OS._gtk_enumerate_printers(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_enumerate_printers(OS.java:9801)
    at org.eclipse.swt.printing.Printer.getPrinterList(Printer.java:101)
    at org.eclipse.jface.text.TextViewer.print(TextViewer.java:4554)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor$12.run(AbstractDecoratedTextEditor.java:1394)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
    at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:285)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:504)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:555)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:376)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:322)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:84)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1554)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1391)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1416)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1401)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1428)
    at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:829)
    at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3236)
    at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:758)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2096)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:5467)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4569)
    at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8742)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1243)
    at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
    at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2288)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3361)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: org.eclipse.swt.SWTException: Widget is disposed
    at org.eclipse.swt.SWT.error(SWT.java:4397)
    at org.eclipse.swt.SWT.error(SWT.java:4312)
    at org.eclipse.swt.SWT.error(SWT.java:4283)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:481)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:418)
    at org.eclipse.swt.custom.StyledText.computeSize(StyledText.java:1707)
    at net.sourceforge.vrapper.eclipse.ui.EclipseCommandLineUI.updateUISize(EclipseCommandLineUI.java:391)
    at net.sourceforge.vrapper.eclipse.ui.EclipseCommandLineUI$5.run(EclipseCommandLineUI.java:187)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    ... 116 more

@albertdev
Copy link
Member

The error log you attached does contain an error, and it comes right from the command line code.

I can only wonder how it got there, but if I can reproduce it and fix it, we got (part of) your problem.

albertdev added a commit that referenced this issue May 3, 2014
As documented in issue #375, at very rare moments calls could be made
when the command line widget was disposed, triggering a RuntimeException
as a result.
@albertdev
Copy link
Member

@loonies I changed the code so that it would log a simple error instead of that long and unclear stack trace. I still don't know how you ran into this problem though, so I'm going to mark this issue as unconfirmed for now. If you have any new info about this problem, please tell.

@keforbes
Copy link
Contributor

keforbes commented May 4, 2014

I've updated the unstable update site with a new build (0.43.20140504) which includes @albertdev's changes. @loonies, let us know if you can provide any more info. Thanks!

@loonies
Copy link
Contributor Author

loonies commented Aug 2, 2014

Looks like result window will move if page moves. Try search/replace on a content bigger than one page size (make sure you have text to replace at top and bottom of the page).

Can anyone confirm this?

@keforbes
Copy link
Contributor

keforbes commented Aug 2, 2014

If I do a search and replace with the confirm flag, then yes, I can reproduce this. I opened a Java file and did :s/public/private/gc and I saw your issue.

@skybber
Copy link

skybber commented Aug 31, 2014

This problem disappears if the gtk3 is used. Use following command to run eclipse:

export SWT_GTK3=1; eclipse

The gtk3 should be used by default but probably there is some fallback if gtk3 version >=3.9

edit: Works only in eclipse Eclipse 4.3 with gtk3 is broken.

@albertdev
Copy link
Member

@skybber
@loonies
Skybber got me thinking of potential problems with the command line, so I did some digging and found out that I didn't force a repaint, I merely requested it.

In the mean time I found that you can force a repaint and started using it. This seems to fix the problem with "Confirm substitution mode" both in Eclipse Juno as well as in Luna. Tested on XUbuntu 14.04, which supposedly uses GTK 2 or 3. Please check out the code and feel free to reopen this issue should it reappear.

@loonies
Copy link
Contributor Author

loonies commented Nov 23, 2014

Is this included in the latest unstable 0.49.20141118?

@albertdev
Copy link
Member

Yes, though someone else reported in #567 that the command line might not show the first time you open an editor. I could only reproduce that one on Windows though, so you might have no problems when using version 0.49.20141118 on Linux.

@keforbes
Copy link
Contributor

I've updated the unstable update site with a new build (0.49.20141123) which includes the fix for #567 so if you update to that build you hopefully won't see any more issues with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants