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

[FABRIC] Crash when using a Ticker to join a server too early (Screen cannot be NULL) #941

Open
NextRaven10 opened this issue Sep 20, 2024 · 3 comments
Labels
bug Something isn't working can't fix on my end

Comments

@NextRaven10
Copy link

NextRaven10 commented Sep 20, 2024

Describe the bug
When I add a Ticker to my main menu that checks if a variable is true and if my server is online and then joins the server using my serverip variable

To Reproduce
I will use the $ sign to indicate a variable
Steps to reproduce the behavior (e.g.):

  1. Create a new Instance of Minecraft 1.20.1 with the following mods: Cloth Config API; Drippy Loading Screen; Entity Culling; Fabric API; FancyMenu; FerriteCore; ImmediatelyFast; Indium; Iris Shaders; Konkrete; Lithium; Melody; Mod Menu; ModernFix; Sodium; Sodium Extra; (I am not sure if you need these mods to reproduce the bug, its just the mods I have installed when it crashes)
  2. Add the Variables: $autojoinserver:false & $serverip:modpack.nextraven.de
  3. In the main menu: Open the Editor of the Layout and add a new ticker that checks if the $autojoinserver variable is true and that checks if the server with the ip of $serverip is online. If both true it joins the server with the ip of $serverip
  4. Add a Button to toggle the $autojoinserver variable
  5. Crash when you leave the Editor or when you press the button (seems to be random)

Expected behavior
That when I start the game, $autojoinserver is true and my server is online that I would automatically join the server
but instead it crashes :(

Game Log
Here is the link: https://mclo.gs/NtYfgHM

Screenshots
If screenshots would help to explain the issue, please include these.

Basic Informations (please complete the following information):

  • OS: Windows 10
  • FancyMenu Version: 3.2.3-1.20.1-fabric
  • Forge/Fabric Version: 0.16.5
  • Minecraft Version: 1.20.1
  • Active Mods Cloth Config API; Drippy Loading Screen; Entity Culling; Fabric API; FancyMenu; FerriteCore; ImmediatelyFast; Indium; Iris Shaders; Konkrete; Lithium; Melody; Mod Menu; ModernFix; Sodium; Sodium Extra;
@NextRaven10 NextRaven10 added the bug Something isn't working label Sep 20, 2024
@Keksuccino
Copy link
Owner

Keksuccino commented Sep 24, 2024

Lautsprecher (High Definition Audio Device)

Good old Lautsprecher of the fellow Deutsche Kartoffel :D


The issue seems to be related to Fabric's API, but that error shouldn't happen anymore. I thought I fixed that. Could be related to another mod OR the way you try to join the server is somehow bugged. Can you join the server with a normal button or does that also causes the game to crash?

//Edit: Oh I think I know what's happening. Your Ticker element joins the server the moment the Title screen opens, right? Yeah well, I think at that point the Fabric API has not finished doing its thing yet, so it thinks the screen is NULL instead of the Title screen. I don't know if I can fix that tbh.

@Keksuccino Keksuccino changed the title [BUG] Game crashed when using a Ticker [FABRIC] Crash when using a Ticker to join a server too early (Screen cannot be NULL) Sep 24, 2024
@NextRaven10
Copy link
Author

Yes, the good old Deutsche Kartoffel xD


So it just isn´t possible? Or is there another way I can make the user join a server when a variable is true?

@NextRaven10
Copy link
Author

The issue seems to be related to Fabric's API, but that error shouldn't happen anymore. I thought I fixed that. Could be related to another mod OR the way you try to join the server is somehow bugged. Can you join the server with a normal button or does that also causes the game to crash?

Yes, I can join a server when I just press a button that joins it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can't fix on my end
Projects
None yet
Development

No branches or pull requests

2 participants