Konloch/bytecode-viewer · error · SecurityException
BCV is awesome, blocking System.exit(
Error message
BCV is awesome, blocking System.exit(
What it means
SecurityMan.checkExit throws SecurityException when System.exit (or Runtime.exit/halt) is called while Configuration.canExit is false. BCV blocks exit calls so plugin or analyzed code cannot terminate the whole viewer. The message includes the requested exit status.
Source
Thrown at src/main/java/the/bytecode/club/bytecodeviewer/util/SecurityMan.java:259
}
@Override
public void checkCreateClassLoader()
{
}
@Override
public void checkDelete(String file)
{
if (printing)
System.out.println("Deleting: " + file);
}
@Override
public void checkExit(int status)
{
if (!Configuration.canExit)
throw new SecurityException("BCV is awesome, blocking System.exit(" + status + ");");
}
@Override
public void checkLink(String lib)
{
if (printing)
System.out.println("Linking: " + lib);
}
@SuppressWarnings("deprecation")
public void checkMemberAccess(Class<?> clazz, int which)
{
}
@Override
public void checkMulticast(InetAddress maddr)
{
}View on GitHub (pinned to 31430e0033)
Solutions
- Remove/replace System.exit calls in the plugin or analyzed code with normal exception-based flow control
- Set Configuration.canExit = true only in a trusted context where VM shutdown is acceptable
- Catch the SecurityException at the boundary you control and translate it into an in-application error path
- Report the offending library behavior to its maintainers (calling exit from library code is bad practice)
Example fix
// before
System.exit(1); // throws SecurityException under BCV
// after
throw new RuntimeException("analysis failed"); // let BCV handle/report the failure Defensive patterns
Strategy: try-catch
Validate before calling
if (!the.bytecode.club.bytecodeviewer.Configuration.canExit)
throw new IllegalStateException("System.exit will be blocked under BCV"); Try / catch
try {
System.exit(status);
} catch (SecurityException e) {
if (e.getMessage().startsWith("BCV is awesome, blocking System.exit")) {
// convert to exception-based failure handling instead
} else throw e;
} Prevention
- Never call System.exit from plugin or library code
- Use exceptions/return codes for control flow
- Only set Configuration.canExit=true in trusted, controlled runs
- Audit third-party libraries used in plugins for exit() calls
When it happens
Trigger: Any code running under BCV's SecurityManager calls System.exit(status) while Configuration.canExit is false — typically plugin or analyzed code error-handling with exit().
Common situations: Analyzed libraries calling System.exit on failure; plugins using exit for flow control; embedded launchers that assume they own the JVM lifecycle.
Related errors
- BCV is awesome! Blocking exec:
- BCV is awesome, blocking write(
- BCV is awesome, blocking port
- Unknown constant pool tag ${tag}
- null key or factory
AI-assisted analysis of Konloch/bytecode-viewer@31430e0033 (2026-09-05).
Data as JSON: /api/errors/6134fb799e24d0f4.
Report an issue: GitHub.