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

Doesn't trace static initialization #6

Open
Erhannis opened this issue Oct 19, 2018 · 2 comments
Open

Doesn't trace static initialization #6

Erhannis opened this issue Oct 19, 2018 · 2 comments

Comments

@Erhannis
Copy link

I'm currently dealing with a bug which happens to occur in a static initializer. The stack trace shows the stack extends past java.lang.Class.forName(), and crashes in the loaded class, but ODB does not step into the classloading, so I can't see the exact circumstances of the crash. (I'm using Java 8.)

@madhephaestus
Copy link
Member

Do you have code examples you could link to?

@Erhannis
Copy link
Author

Sure.

public class Main2
{
   public static class SomeClass
   {
      static
      {
         Double notNull = null;
         notNull.doubleValue();
      }
   }

   public static void main( String[] args )
   {
      SomeClass sc = new SomeClass();
   }
}

ODB shows that there was a crash, but only that it originated from somewhere on the SomeClass sc = new SomeClass(); line. It does not show the execution of the static initializer lines.

Having delved a little into the code of ODB, I now suspect fixing this to be very difficult. I could be mistaken, though.

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

No branches or pull requests

2 participants