Open Daburnell112 opened 1 year ago
That's an odd place for a crash. Note that even for command-line tools, you still need to do the full init()/runCallback()/shutdown() cycle. For example, this is how it looks like in our tool:
SteamAPI.init();
SteamAPI.printDebugInfo(System.out);
ugc = new SteamUGC(ugcCallback);
utils = new SteamUtils(utilsCallback);
utils.setWarningMessageHook((severity, message) -> LOG.warn("({}) {}", severity, message));
if (config.publishedFileID == 0) {
// kick off the item creation process
ugc.createItem(CONSUMER_APPID, WorkshopFileType.Community);
} else {
// update an existing item
submitItemUpdate(new SteamPublishedFileID(config.publishedFileID), true);
}
while (!DONE) {
SteamAPI.runCallbacks();
try {
Threads.sleep(250, 0);
} catch (InterruptedException e) {
throw new SteamException(e);
}
}
ugc.dispose();
utils.dispose();
SteamAPI.shutdown();
Any more logic is done inside the callbacks, and that DONE
flag is raised at the end of everything.
i might have the exact same issue ... has this ever been sorted out?
this is from my console output:
A fatal error has been detected by the Java Runtime Environment:
_EXCEPTION_ACCESSVIOLATION (0xc0000005) at pc=0x00007ffaa6ac1764, pid=21172, tid=6680
JRE version: OpenJDK Runtime Environment Temurin-17.0.8+7 (17.0.8+7) (build 17.0.8+7) Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.8+7 (17.0.8+7, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64) Problematic frame: _C [steamworks4j64.dll+0x11764]:
No core dump will be written. Minidumps are not enabled by default on client versions of Windows
An error report file with more information is saved as: _C:\Users\micro\processing-4.3\hs_errpid21172.log
If you would like to submit a bug report, please visit: https://github.com/adoptium/adoptium-support/issues The crash happened outside the Java Virtual Machine in native code. See problematic frame for where to report the bug.
when calling the api like so (please excuse the messy code!! i'm in the fiddling around phase of it...)
try {
SteamAPI.loadLibraries(dataPath("steam"));
//SteamAPI.loadLibraries();
// Prevent app restart if necessary
//if (SteamAPI.restartAppIfNecessary(2873990)) {
// System.out.println("Restarting app for Steam.");
// return;
//}
Thread.sleep(500);
println("calling init");
if ( SteamAPI.init() ) {
println("steam init success");
SteamAPI.printDebugInfo(System.err);
} else {
println("steramworks init fail");
SteamAPI.printDebugInfo(System.err);
}
Thread.sleep(500);
println("calling isRunning");
if ( SteamAPI.isSteamRunning(true) ) {
println("running steam client detected");
} else {
println("no running steam client detected");
exit();
}
Thread.sleep(500);
println("init utils");
clientUtils = new SteamUtils(clUtilsCallback);
println("run callbacks");
SteamAPI.runCallbacks();
println("get sappid");
int sappid = clientUtils.getAppID();
println("SAPPID: " + sappid );
Thread.sleep(500);
println("steam user stuff now");
SteamUser su = new SteamUser( new SteamUserCallbackImpl() );
SteamAPI.runCallbacks();
if( su != null ) {
println("su: " + su);
SteamID sid = su.getSteamID();
if( sid != null ) {
println("sid: " + sid);
//println("steam user id: " + sid.getAccountID());
} else {
println("sid is null");
}
} else {
println("su is null");
}
}
catch (Exception e) {
println("error while initializing steamworks API: " + e);
// Error extracting or loading native libraries
}
Attempting to write a command line tool to upload a mod for a game on the Steam Workshop. The game is not yet purchasable on Steam and has not been approved for release, yet. Part of the approval process is to upload a single mod to the workshop.
This is the code I'm attempting to use:
This is the error that is resulting:
Stack/Thread frame information:
Example JVM crash log is attached.
hs_err_pid8744.log