Skip to content

Program crashes when I try to use VisualVM to profile it. #377

@Angular-Angel

Description

@Angular-Angel

Describe the bug
When I run my application and start profiling it with Visualvm while it's on it's menu screen, it works okay, but I get a bunch of warnings in console:

OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended Profiler Agent: Waiting for connection on port 5140 (Protocol version: 20) Profiler Agent: Established connection with the tool *** Profiler engine warning: Cannot use ClassLoader.findLoadedClass() and/or ClassLoader.findBootstrapClass() in ClassLoaderManager

If I then try and launch the actual game, the game crashes:

Profiler Agent: Local accelerated session *** Profiler engine warning: class jdk.internal.reflect.GeneratedMethodAccessor49 loaded by *** Profiler Agent Communication Thread java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "java.lang.StackWalker$StackFrame.getFileName()" is null

VisualVM continues just fine. I was able to use VisualVM to profile the game before - but that was when I was building it with Maven. I recently switched to building it with Gradle. The game includes Lombok - I think that may be the issue, that lombok is changing things during runtime, or something? Not sure why this happens with Gradle but didn't happen with Maven.

To Reproduce
Steps to reproduce the behavior:

  1. Build the maven branch of: https://gitlab.com/AngularAngel/devilutil
  2. Build the gradle branch of: https://gitlab.com/AngularAngel/omnicraft,
  3. Run the game
  4. Run VisualVM and start profiling the game.
  5. Click 'Local Game' and then 'Play'

Expected behavior
The game continues running and I am able to profile it.

Desktop (please complete the following information):

  • OS: Xubuntu 20.04
  • Graal 17
  • Lombok Version 1.18.22

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions