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

Random crash while mining with a CC:T turtle #328

Open
3 tasks done
vico93 opened this issue Jul 5, 2024 · 7 comments
Open
3 tasks done

Random crash while mining with a CC:T turtle #328

vico93 opened this issue Jul 5, 2024 · 7 comments
Labels
bug Something isn't working mod compatibility it doesn't work with a specific mod or some mod combinations

Comments

@vico93
Copy link

vico93 commented Jul 5, 2024

Describe the bug
Basically i was casually mining in my basement with a CC:Tweaked turtle (robot block, not the sea mob) and the game crashed. Don't know if this have some relation, honestly.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new world in singleplayer
  2. Place a CC:T turtle and make it dig a tunnel
  3. "Hopefully" it will crash

Runtime info (please complete the following information):

  • OS: Windows 11 x64
  • Minecraft version: 1.21
  • Mod version: 0.2.0+alpha.11.106+1.21 (from Modrinth)

Crash reports / logs
HERE

Other mods
Mod List

Checklist

  • I am using the official version of the mod.
  • I tried the latest development version but the issue persists.
  • I searched for similar open issues and could not find an existing bug report on this.
@vico93 vico93 added the bug Something isn't working label Jul 5, 2024
@ishland
Copy link
Collaborator

ishland commented Jul 10, 2024

It looks like frozenlib isn't compatible with allowThreadedFeatures. It can only be fixed on their side.

@ishland ishland added the mod compatibility it doesn't work with a specific mod or some mod combinations label Jul 10, 2024
@vico93
Copy link
Author

vico93 commented Jul 10, 2024

@AViewFromTheTop @Treetrain1 sorry for another ping, but this is related to frozen lib

@AViewFromTheTop
Copy link

It looks like frozenlib isn't compatible with allowThreadedFeatures. It can only be fixed on their side.

Awe, dangit lol
Do you know what exactly we should change?

@ishland
Copy link
Collaborator

ishland commented Jul 12, 2024

Do you know what exactly we should change?

Threaded world generation assumes that calls to the chunk generator is mostly side-effect-free. It basically means the chunk generator shouldn't modify any global state, such as most static final fields with mutable objects (public static final List<Object> thing = new ArrayList();), and static non-final fields (see below).

EasyNoiseSampler is violating this assumption.

@AViewFromTheTop
Copy link

EasyNoiseSampler is violating this assumption.

Rip
How should we counter it?
This is used very frequently..

@AViewFromTheTop
Copy link

I’d prefer to not create a new instance every single time a feature samples noise, it would be nice if there were a similar enough way to how we have it currently

@ishland
Copy link
Collaborator

ishland commented Jul 13, 2024

You can create a new instance without actually trashing the heap if the object never escapes the method.

Also in your current implementation you are creating several instances that is definitely going to end up in the heap when setSeed is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mod compatibility it doesn't work with a specific mod or some mod combinations
Projects
None yet
Development

No branches or pull requests

3 participants