Code Monkey home page Code Monkey logo

Comments (13)

embeddedt avatar embeddedt commented on June 18, 2024 1

@Speiger The root cause of this crash seems to be that randomNumberGenerator is set back to null in SoundSystem when the sound device goes missing (presumably causing SoundSystem.cleanup to be called). The SoundSystem.quickXXXX family of methods seem to be the only ones that make use of that field, and are presumably only used by IC2C, which is why the crash happens.

We can fix vanilla to not shutdown the SoundSystem in this scenario, but I would recommend adding a try-catch block inside IC2C so that failure to play the sound does not result in an immediate game crash.

from tekkit-2.

blakangel avatar blakangel commented on June 18, 2024

Looks like disabling IC2 sounds in the settings fixes this for me. No crashes when using tree tap.

from tekkit-2.

xJon avatar xJon commented on June 18, 2024

I'm unable to reproduce this, but if you can reliably cause a crash I'll refer this to the IC2 Classic developer.
Do you have any unique information about your system you can share?

from tekkit-2.

Speiger avatar Speiger commented on June 18, 2024

Looks like your game doesn't support quick play of sounds.
(Playing sounds only once)

That can be either due to old hardware or I dunno?

from tekkit-2.

JS19000 avatar JS19000 commented on June 18, 2024

@xJon I'm having the exact same issue. Here's the log. https://mclo.gs/Dco6c1o
I've also installed OptiFine 1.12.2 HD U G5
The log shows that I'm using Windows 8.1 but I'm actually using Windows 10 21H2 build 19044.1889.

from tekkit-2.

Speiger avatar Speiger commented on June 18, 2024

@JS19000 IC2Classic doesn't support optifine. Sooo please repeate without Optifine

from tekkit-2.

JS19000 avatar JS19000 commented on June 18, 2024

@Speiger It behaves the same with or without OptiFine but I think I just figured out the issue. I have an external USB Amp/DAC so if I turn it off Windows will switch to a new default device. If I turn it back on it will become the default device again but there will still be no sound in Minecraft. It doesn't switch back even though that's what it was using originally. If I go to output devices in Minecraft under the music & sound options and either click on my USB DAC or default devices to get the sound back and then click on a rubber tree it will crash. It will continue to crash until the application is restarted. It won't crash with or without OptiFine if the sound device isn't changed before then.

from tekkit-2.

blakangel avatar blakangel commented on June 18, 2024

My issue seems similar to @JS19000 's - I'm using a Denon Home Theater Receiver as my audio output (HDMI from GPU -> Denon -> LCD). My crashes were probably related to the default device going away and coming back. I also lose sound in minecraft if I mute/unmute speakers in windows. To get sound back I have to select the correct sound device in minecraft settings as opposed to "default device".

I'll re-enable IC2 sounds today and try to replicate above scenarios.

from tekkit-2.

Speiger avatar Speiger commented on June 18, 2024

Yeah I am not adding a try catch for that. That is not a fix to the system. It is just treating a symptom.
I think I know how to fix this but this will take time since the 1.19 beta is right now running and i am 100% utilized during that.

What the fix is going to be, since the old sound system is ditched that would mean a new one was created. So I can test for a ditched sound system and fetch the new one.

But yeah this is like a really bad edge case that I couldn't have known of....

from tekkit-2.

Speiger avatar Speiger commented on June 18, 2024

Also looking through the code.
A Resource Reload refreshes the sound system. So F3+T will fix it if you sound system changed.
That is a Temp fix for anyone having this issue. If the sound system breaks just use do texture reload.

from tekkit-2.

embeddedt avatar embeddedt commented on June 18, 2024

What the fix is going to be, since the old sound system is ditched that would mean a new one was created. So I can test for a ditched sound system and fetch the new one.

This does not seem to happen on Linux. The game is not smart enough to properly reset the system so it can play any other sounds. You just get no sound unless you restart (or use F3+T, see below).

Maybe there is a new SoundSystem instance created, but the instance doesn't actually function.

A Resource Reload refreshes the sound system. So F3+T will fix it if you sound system changed.

This does fix the issue but resource reloads often take several minutes in modded games. I don't think this is a very practical solution.

from tekkit-2.

Speiger avatar Speiger commented on June 18, 2024

@embeddedt until i publish a proper fix the F3+T is your temp solution from preventing crashes.
You either take it or leave it until my patch comes out in a couple weeks.

from tekkit-2.

xJon avatar xJon commented on June 18, 2024

Resolved in 1.0.1 thanks to @embeddedt's mixin fix, as a temporary solution until IC2C updates :)

from tekkit-2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.