#49 new
Dominik

Infinite loop of infinitest while searching for tests?

Reported by Dominik | June 30th, 2010 @ 10:14 PM

Hi,

I'm on Mac osx 10.6.4, eclipse 3.5.1, inifinitest has worked pretty well so far, but not sure what is causing the current behaviour. (i have the feeling that since upgrade to 10.6.4 caused the seen behaviour)

What i can see in .metadata/.log is that those lines are repeated in a very short time span

!ENTRY org.infinitest.eclipse 1 0 2010-06-30 16:08:28.332 !MESSAGE No tests to run in for change []

the changes, so basically it is checking all the workspace and can't see any changes, but it repeats this over and over again. This causes the eclipse process to be over 100% cpu and i have to forceful shut down the eclipse process. Though this doesn't happen all the time, after i restart eclipse inifinitest will run the tests as expected.

This is really a nuisance, could someone please tell me how to fix it?

Thanks

Comments and changes to this ticket

  • benrady (at gmail)

    benrady (at gmail) July 1st, 2010 @ 12:24 AM

    I know that Infinitest will try to re-run tests if it encounters an
    unexpected error, but that error is logged. Is there anything else in the
    logs that might indicate what's going on?

    Also, does this occur consistently? Is there a particular task or action
    that makes it more likely to occur?

    Thanks for the feedback!

  • Dominik

    Dominik July 1st, 2010 @ 03:45 PM

    Hi Ben,

    thanks for getting back to me on this issue.

    To be honest i don't see any reproducable test case that i could give you. For example i just started eclipse this morning, when i looked at it, eclipse was building the workspace (i had set build automatically yesterday to see if that was causing the problem, as before i had not been using the build automatically feature of eclipse), and when i looked at eclipse two minutes later infinitest was already running into an infinite loop, the yellow bar was flickering then between 0 tests found to run and some other message that disappeared pretty fast. When then trying to quit eclipse, the workspace would shut down, but show up with an error message telling me that an error occured and that i had to look into the .log file. When i looked into it i found beside all the log messages from infinitest that it was scanning all my projects repeatedly for tests to run then also a lot of error messages from eclipse (that i then had to forcefully shut down)

    !ENTRY org.eclipse.jface 4 0 2010-07-01 09:32:49.799 !MESSAGE Unhandled event loop exception during blocked modal context. !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:3884)
    at org.eclipse.swt.SWT.error(SWT.java:3799)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3405)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3102)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
    at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
    at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
    at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.disconnectFromWorkspace(IDEWorkbenchAdvisor.java:460)
    at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.postShutdown(IDEWorkbenchAdvisor.java:316)
    at org.eclipse.ui.internal.Workbench.shutdown(Workbench.java:2732)
    at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:939)
    at org.eclipse.ui.internal.Workbench.access$15(Workbench.java:856)
    at org.eclipse.ui.internal.Workbench$23.run(Workbench.java:1100)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.Workbench.close(Workbench.java:1098)
    at org.eclipse.ui.internal.Workbench.close(Workbench.java:1070)
    at org.eclipse.ui.internal.Workbench$57.handleEvent(Workbench.java:2276)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3543)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3536)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4368)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4188)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4386)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
    at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:75)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3094)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    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:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    

    Caused by: org.eclipse.swt.SWTException: Widget is disposed

    at org.eclipse.swt.SWT.error(SWT.java:3884)
    at org.eclipse.swt.SWT.error(SWT.java:3799)
    at org.eclipse.swt.SWT.error(SWT.java:3770)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:619)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:462)
    at org.eclipse.swt.widgets.Label.getText(Label.java:338)
    at org.infinitest.eclipse.trim.StatusBar$2.run(StatusBar.java:99)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
    ... 46 more
    

    I'm not sure that this might help you, but this error only occurs when i'm trying to shut down eclipse when infinitest has gotten into an inifite loop.

    You mentioned that infinitest will run again and again if an error occurs, could it be possible to just set some counter so that this doesn't go on and on?

    Thanks for any help that you can give me on that.

    Dominik

    P.S. some weird thing that i'm also noticing recently in eclipse is that sometimes the build directory of eclipse will not output all the class files and then complain that files are not found and all will be red so that i have to make a project clean. not sure if infinitest might be causing or be affected by that?

  • benrady (at gmail)

    benrady (at gmail) July 1st, 2010 @ 04:15 PM

    Dominik,

    Infinitest would definitely be affected by problems with class files not
    being output properly. It reads those class files to determine which tests
    to run. If the classes are missing or incomplete, that might explain why
    it's not finding any tests.

    As to why it appears to be stuck in a loop, I'm still not sure. It only
    reloads on error if the current error isn't the same as the last error.
    Otherwise it just stops. I suppose it's possible you're alternating between
    two errors, but again, that would show up in the logs in each iteration of
    the loop.

    Ben

  • Dominik

    Dominik July 5th, 2010 @ 03:34 PM

    Ben,

    thanks for getting back to me so quickly. I still have the above mentioned problem, I tried changing my maven configuration (I'm using the m2eclipse plugin) but to no avail, the inifinitest plugin still sometimes run into infinite loops. The only way i have found out to stop that is to explicitly introduce syntax error in some java class and save and trigger a build, this will then stop infinitest with the message that an error is in workspace. In the .log file i have found another message from infinitest

    !ENTRY org.infinitest.eclipse 1 0 2010-07-05 09:17:28.324 !MESSAGE Update complete. Status FAILING

    After that message inifinitest scans over and over again all projects in workspace, although it doesn't find any changes in any of those. To me it appears that there might be a racing condition between infinitest and perhaps another plugin i'm using, so right now it could be with m2eclipse or the GWT plugin? It also happens most of the time, that when infinitest runs into that infinite loop, also the project happens to have classnotfound errors as not all classes have been compiled in the build directory. So my guess is that somehow infinitest and another plugin are colliding while the classes are being compiled and then some error stops the compiling and infinitest runs into an infinite loop. Is there any way for you to be able to reproduce that? As mentioned i'm using Eclipse 3.5.1, GWT eclipse plugin and m2eclipse plugin.

    Any help would be very appreciated.

    Thanks

    Dominik

  • benrady (at gmail)

    benrady (at gmail) July 11th, 2010 @ 10:09 PM

    My guess would be some interaction between compiler for GWT and Infinitest.
    But I can't seem to reproduce this.

  • Dominik

    Dominik July 25th, 2010 @ 11:48 PM

    I have been waiting on some update on this issue, as I tried out several things in order to see which was causing the error. But to be honest every attempt failed, as infinitest would always run into some infinite loop after some time. (sometimes sooner and more regular, sometimes less often)

    What i did was first to disactivate the M2Maven plugin, then disactivate the GWT plugin, remove the plugins alltogether, changing the maven output from the eclipse output to some neutral output (as i was running maven from within the terminal and not from within eclipse, thinking that when maven was cleaning the eclipse output directory this might cause infinitest to run into infinite loops as it would not find the required class files - but even that didn't prove successfull)

    So after all that I concluded that without knowing how inifinitest works behind the scenes and not knowing the source code, i would not be able to find out why it would run into that infinite loop. So i had to put an error in some project in workspace in order to "disable" inifinitest.

    For me this is not a satisfying solution as you might see. So I think that two options arise:

    • being able to provide a fix for that inifinite loop behaviour
    • receiving back my money and stop using infinitest

    I would rather prefer the first option, i think that there must be a way to either put some counter into the workspace traversal loop in order to fix that problem or provide me with some more details, log possibilities, source code in order to see why such an error could happen.

    I want to also stress, that infinitest used to work well before for not so complex projects that were only based for example on GWT, and not GWT and maven, spring, but it has also prooved, that infinitest is not suitable for more advanced project setups, not providing any spring support and now even posing more problems than benefits.

    I hope that you can come up with a solution to this problem,

    thanks for your efforts so far

    Dominik

  • benrady (at gmail)

    benrady (at gmail) July 26th, 2010 @ 12:06 AM

    Dominik,

    I'm at a loss to reproduce your problem. We've tested infinitest with many
    different project configurations and plugin combinations, but I don't think
    we've run into this particular problem before.

    If you can reproduce this problem with a clean workspace, zipping up the
    workspace and attaching it to this issue might help us diagnose what's going
    on. But I can't guarantee that it will, and I can understand if you're
    reluctant to invest any more time in this problem. If you would like a
    refund, we can certainly do that. Just let us know which you prefer.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Continuous Test Runner for Java

Shared Ticket Bins

People watching this ticket

Pages