Re: Mechanic on Eclipse Luna- restart is prompting a fix that has already been appied

118 views
Skip to first unread message

Robert Konigsberg

unread,
Jul 27, 2014, 9:14:30 PM7/27/14
to workspacemechanic
-issues list, +correct list.

Also, I cannot figure out how to get Luna installed on my Mac. I hate
installing Eclipse for Mac. Look, I'm just going to have to get to
this when I can. Sorry.

On Sun, Jul 27, 2014 at 8:21 PM, Omar I <allen.gu...@gmail.com> wrote:
> I am using 1.7 but also tried 1.6 with no success in either.
>
>
> On Saturday, July 26, 2014 4:59:50 PM UTC-7, Robert Konigsberg wrote:
>>
>> I don't think this matters, but what version of Java are you using to
>> run Eclipse?
>>
>> On Sat, Jul 26, 2014 at 5:41 PM, Flávio Albuquerque Camilo
>> <flavio...@gmail.com> wrote:
>> > The same occurs here.
>> >
>> > My environment is an OS X 10.9.4, Eclipse Luna, Workspace Mechanic
>> > 0.4.0,
>> > but with only one preferencies file.
>> >
>> >
>> > On Thursday, July 24, 2014 2:03:39 PM UTC-3, Omar I wrote:
>> >>
>> >> I am running on Mac OS X 10.9.2
>> >> I downloaded eclipse kepler SR2 standard now, installed workspace
>> >> mechanic
>> >> 0.4.0 and loaded the two epf files
>> >> Upon closing and restarting, the issue doesn't appear.
>> >> This issue only seems to exist in the luna release of eclipse
>> >>
>> >> Let me know if you have further questions and if you were able to
>> >> replicate the issue.
>> >>
>> >> On Wednesday, July 23, 2014 6:45:54 PM UTC-7, Robert Konigsberg wrote:
>> >>>
>> >>> Can you verify that this problem does not occur in a pristene Kepler
>> >>> environment? Which operating system are you using?
>> >>>
>> >>>
>> >>>
>> >>> On Wed, Jul 23, 2014 at 5:49 PM, Omar I <allen.gu...@gmail.com> wrote:
>> >>> > Hi Robert, can you confirm you are experiencing the same issue?
>> >>> >
>> >>> >
>> >>> > On Wednesday, July 23, 2014 11:18:43 AM UTC-7, Omar I wrote:
>> >>> >>
>> >>> >> I have upgraded my eclipse from kepler to luna (4.4.0 standard
>> >>> >> edition)
>> >>> >> and I am experiencing something that is quite peculiar which I
>> >>> >> never
>> >>> >> encountered in kepler
>> >>> >>
>> >>> >> The best way to explain is by example, if I have 2 mechanic
>> >>> >> settings
>> >>> >> in 2
>> >>> >> different .epf files, one that sets the default editor of HTML and
>> >>> >> the
>> >>> >> other
>> >>> >> CSS.
>> >>> >> I then apply the two settings and I can verify the settings are all
>> >>> >> correctly applied, and the mechanic displays that all settings have
>> >>> >> been
>> >>> >> applied.
>> >>> >> However, upon closing eclipse and restarting, the mechanic alerts
>> >>> >> me
>> >>> >> that
>> >>> >> one of the settings have not been set correctly even though if I
>> >>> >> manually
>> >>> >> check the preferences they all seem to be correctly configured.
>> >>> >> Again,
>> >>> >> apply
>> >>> >> that one setting it is alerting me about, seems fine, close
>> >>> >> eclipse,
>> >>> >> restart, and again it prompts with that same remaining setting.
>> >>> >>
>> >>> >> In another case, if I have, say 10 settings, it would fix all 10
>> >>> >> but
>> >>> >> upon
>> >>> >> restarting it would show that one of them wasn't applied even
>> >>> >> though
>> >>> >> all 10
>> >>> >> have been applied.
>> >>> >>
>> >>> >> To my knowledge you can have an arbitrary number of settings, but
>> >>> >> only
>> >>> >> 1
>> >>> >> will show it hasn't been configured.
>> >>> >>
>> >>> >> To duplicate, 1) you must have luna installed 2) you can simply
>> >>> >> create
>> >>> >> two
>> >>> >> .epf files like my first example 3) apply the fixes of the 2 epf
>> >>> >> files
>> >>> >> 4)
>> >>> >> restart eclipse
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> > --
>> >>> > You received this message because you are subscribed to the Google
>> >>> > Groups
>> >>> > "workspacemechanic-issues" group.
>> >>> > To unsubscribe from this group and stop receiving emails from it,
>> >>> > send
>> >>> > an
>> >>> > email to workspacemechanic-...@googlegroups.com.
>> >>> > For more options, visit https://groups.google.com/d/optout.
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Robert Konigsberg
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "workspacemechanic-issues" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to workspacemechanic-...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Robert Konigsberg
>
> --
> You received this message because you are subscribed to the Google Groups
> "workspacemechanic-issues" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to workspacemechanic-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Robert Konigsberg

Bastian Echterhölter

unread,
Nov 4, 2014, 7:08:15 PM11/4/14
to workspac...@googlegroups.com
Hi, 
I experience a similar or the same issue on luna on mac. 

Another thing i saw which may be the reason for the problem is that i see an error when eclipse shuts down in the <workspacedir>/.metadata/.log file:

!ENTRY com.google.eclipse.mechanic 4 0 2014-11-04 15:55:17.591
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in com.google.eclipse.mechanic.plugin.core.MechanicPlugin.stop() of bundle com.google.eclipse.mechanic.
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:847)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:950)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:324)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1623)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1542)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:248)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:145)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:186)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:160)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4441)
at org.eclipse.swt.SWT.error(SWT.java:4356)
at org.eclipse.swt.SWT.error(SWT.java:4327)
at org.eclipse.swt.widgets.Display.error(Display.java:1083)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:840)
at org.eclipse.swt.widgets.Display.create(Display.java:823)
at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
at org.eclipse.swt.widgets.Display.<init>(Display.java:714)
at org.eclipse.swt.widgets.Display.<init>(Display.java:705)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1403)
at com.google.eclipse.mechanic.MechanicService.notifyListener(MechanicService.java:342)
at com.google.eclipse.mechanic.MechanicService.notifyListeners(MechanicService.java:331)
at com.google.eclipse.mechanic.MechanicService.setStatus(MechanicService.java:322)
at com.google.eclipse.mechanic.MechanicService.stop(MechanicService.java:150)
at com.google.eclipse.mechanic.plugin.core.MechanicPlugin.stop(MechanicPlugin.java:68)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:827)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:820)
... 13 more
Root exception:
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4441)
at org.eclipse.swt.SWT.error(SWT.java:4356)
at org.eclipse.swt.SWT.error(SWT.java:4327)
at org.eclipse.swt.widgets.Display.error(Display.java:1083)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:840)
at org.eclipse.swt.widgets.Display.create(Display.java:823)
at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
at org.eclipse.swt.widgets.Display.<init>(Display.java:714)
at org.eclipse.swt.widgets.Display.<init>(Display.java:705)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1403)
at com.google.eclipse.mechanic.MechanicService.notifyListener(MechanicService.java:342)
at com.google.eclipse.mechanic.MechanicService.notifyListeners(MechanicService.java:331)
at com.google.eclipse.mechanic.MechanicService.setStatus(MechanicService.java:322)
at com.google.eclipse.mechanic.MechanicService.stop(MechanicService.java:150)
at com.google.eclipse.mechanic.plugin.core.MechanicPlugin.stop(MechanicPlugin.java:68)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:827)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:820)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:950)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:324)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1623)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1542)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:248)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:145)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:186)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:160)
at java.lang.Thread.run(Thread.java:745)

Please let me know if that helps to get to the bottom of this issue.

Cheers,
Bastian

Alex Blewitt

unread,
Nov 4, 2014, 7:27:09 PM11/4/14
to workspac...@googlegroups.com
I suspect the error is coming from here:


    Display.getDefault().asyncExec(new NotificationDispatcher(listener, currentStatus));

If this is called after the Display has been disposed, you’ll get these messages. It looks like Display.getDefault() attempts to create a Display if one doesn’t already exist, and that’s failing. This probably isn’t serious (the framework is being shut down at the time) but if there were a try/catch block with no effect then it would reduce the errors being written to the console.

Display display = null;
try {
  display = Display.getDefauilt();
} catch (SWTException e) {
}
if(display != null) display.asyncExec(...)

I wonder also if it could be guarded with isStopped() or not - it seems like the bundle does stop the service when it’s going down, but events could still be sent to registered listeners after stopping.

Alex
--
You received this message because you are subscribed to the Google Groups "Workspace Mechanic for Eclipse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to workspacemecha...@googlegroups.com.

Robert Konigsberg

unread,
Nov 4, 2014, 9:13:58 PM11/4/14
to workspacemechanic
Alex, patches welcome, though that doesn't seem particularly valuable.

Guarding by isStopped() _seems_ wrong, since race conditions can happen.
--
Robert Konigsberg
Reply all
Reply to author
Forward
0 new messages