3

I migrated to java 8 in some of my projects, and noticed that every project that is set to run with java 8 breaks with no reason when debugging them..

When I run the project in debug mode, Eclipse just breaks in the class ClassLoader at line 436 which is the closing curly brace of a synchronized

Here is the part of the code of the class that is in the jre lib

protected Class<?> loadClass(String name, boolean resolve)
    throws ClassNotFoundException
{
    synchronized (getClassLoadingLock(name)) {
        // First, check if the class has already been loaded
        Class<?> c = findLoadedClass(name);
        if (c == null) {
            long t0 = System.nanoTime();
            try {
                if (parent != null) {
                    c = parent.loadClass(name, false);
                } else {
                    c = findBootstrapClassOrNull(name);
                }
            } catch (ClassNotFoundException e) {
                // ClassNotFoundException thrown if class not found
                // from the non-null parent class loader
            }

            if (c == null) {
                // If still not found, then invoke findClass in order
                // to find the class.
                long t1 = System.nanoTime();
                c = findClass(name);

                // this is the defining class loader; record the stats
                sun.misc.PerfCounter.getParentDelegationTime().addTime(t1 - t0);
                sun.misc.PerfCounter.getFindClassTime().addElapsedTimeFrom(t1);
                sun.misc.PerfCounter.getFindClasses().increment();
            }
        }
        if (resolve) {
            resolveClass(c);
        }
        return c;
    } // <-- This is line 436 where it breaks just right after I click on the debug mode
} 

Then I have to click on play and everything goes fine, but it is so anyonying to do this every time I want to debug an app that is driving me crazy.. Tried to find anything related to this but with no luck.

I also checked the breakpoints view and there are any. Also checked the Skip all breakpoints button but nothing seems to happen.

Also get to the point of downloading a new clean Eclipse and still happening.

Here is an screenshot:

debug breakpoint

Pablo Matias Gomez
  • 6,614
  • 7
  • 38
  • 72
  • Your description reminds me of Eclipse annoyingly stopping at (not really) uncaught exceptions as described in http://stackoverflow.com/questions/6290470/eclipse-debugger-always-blocks-on-threadpoolexecutor-without-any-obvious-excepti – halfbit Jan 23 '15 at 22:30
  • @halfbit Thanks, I solved doing that. You may post an answer so I could accept it. – Pablo Matias Gomez Feb 13 '15 at 15:12

1 Answers1

1

I fixed it by disabling Step Filtering

enter image description here

eeadev
  • 3,662
  • 8
  • 47
  • 100