getItemFromBlock / Create-Tweaked-Controllers

An addon for the Create Minecraft mod that adds a way of controlling contraptions using an advanced controller
https://www.curseforge.com/minecraft/mc-mods/create-tweaked-controllers
MIT License
8 stars 4 forks source link

The game freezes and crashes when opening the settings menu #24

Closed mister-proger closed 2 months ago

mister-proger commented 2 months ago

tl-logger14487823427168729603.txt

Initially, I thought that the problem was in Destroy, because I observed a similar error when using JEI. However, the replacement with REI fixed everything then. But now I have excluded Destroy, REI and addons, but the error still remains. I have no PS, no XBox, and no Nintendo. However, my joystick is compatible with other games, in particular from Wargaming (I played - everything was fine). I fully admit that the problem is with its bad drivers (because there are similar complaints about it in the reviews), but personally I have not noticed this in other games.

getItemFromBlock commented 2 months ago

The log you provided does not gives any informations about the crash, are you sure its the right one ? If it is, then you might need to search for a log or crash report that includes at least any kind of error related to my mod, so that I can have an idea of what is happening. While there is some parts of the code that I think could be the culprit, I don't even know if it can be fixed. Also, please tell me which version of the mod you are using. From the log I can see that you are on 1.20.1, but there is no informations about the version of my mod as far as I can see. I also suppose that you are on window, and not using some kind of virtual machine or anything that could interfere with the drivers ? I know that there was issues at some point with Apple computers and the drivers when I tested it a while ago, but this should be resoled by now.

mister-proger commented 2 months ago

Sorry for the delay, there was no network access. Your mod seems to be on the latest version, 1.2.4. I am attaching a full set of mods, including disabled ones:

Alex`s delight -> 1.5
Alex`s Mobs -> 1.22.8
Architectury -> 9.2.14
BellsAndWhistles -> 0.4.3
BiomesOPlenty -> 18.0.0.598
Born in Chaos -> 1.2
Botarium -> 2.3.3
CC - Create Bridge -> 1.6.3
CC - Tweaked -> 1.110.3
CC - VS -> 0.1.0
Chef`s delight -> 1.0.3
Citadel -> 2.5.0
Clockwork -> 0.1.16.f
ClothConfig -> 11.1.118
Create basic additions -> 1.0.2
Create Dreams-n-Desires -> 0.2c
Create NewAge -> 1.1.2
Create TweakedControllers -> 1.2.4
Create -> 0.5.1.f
CreateAddition (DISABLED) -> 1.0.0b
CreateBigCannons -> 0.5.4
CreateCasing -> 1.6.0
CreateConnected -> 0.8.2
CreateInteractive -> 1.0.2-beta.2
CreateMetallurgy -> 0.0.2
Destroy (DISABLED) -> 0.8
Dynamic lights -> 1.8.2
Eureka -> 1.5.1-beta.3
FarmersDelight -> 1.2.4
GeckoLIB -> 4.4.6
InventoryProfilesNext -> 1.10.10
JEI FarmersRecipes (DISABLED) -> 1.0.1
KotlinForForge -> 4.11.0
libIPN -> 1.20
Open Parties&Claims -> 0.22.0
Paladin furniture -> 1.2.1
REI (DISABLED) -> 12.1.725
sliceanddice-forge -> 3.2.0
Steam Rails -> 1.6.4
TerraBlender -> 3.0.1.6
TFMG -> 0.8.0b
Travelers backpack -> 9.1.14
ValkyrienSkies -> 2.3.0-beta.5
WorldEdit.jar -> la
XaerosMinimap -> 24.2.0
XaerosWorldMap -> 1.38.8
СreateArmory -> 0.6.1n

The game crashes both without disabled mods and when they are enabled. But what remains accurate is that it crashes when you open the menu of your joystick, if my controller is connected. If I turn it off, then everything works.

getItemFromBlock commented 2 months ago

Do the game generate crash reports ? The first log you sent does not include anything about a crash or error. I can't resolve the issue if I both don't know what cause it and can't reproduce it. By menu of your joystick, do you mean the "Controller configurations" menu ?

mister-proger commented 2 months ago

I mean the menu that opens on Shift in the game. (Sorry for my English). About crash reports: Launcher crash message:

Logs on folder:

I'll try another launcher.

getItemFromBlock commented 2 months ago

This is really strange, the only error that seems to be related to this has only 2 lines mentioning Create, but its not in a place that has a lot to do with my mod (I don't edit that part) which is in a mixin not done by me, and I am not even sure that this error is the cause of the crash The logs seems to interrupt abruptly without generating any error or crash report, which is strange as even low level errors usually cause some sort of logging to happen, and they usually instantly close the game. This might be some low lever driver issue, where the error does not happen on the game but rather on the driver itself, in which case I don't even know if it can be fixed or even avoided. The menu that cause the crash attempts to read data from the controller, if its the cause of the crash then it should also happens in the input config menu (in the options of the mod) and when you try to use the controller. If you can confirm that theses cases also trigger the crash, then I would be sure that its reading data from the controller that triggers the crash. However that does not means that I can fix it. At this level it would probably be either something that needs to be done on GLFW (the input library used by Minecraft) or directly on the faulty driver, neither of which I have access to. Another thing that could help is if you tried to use the mod "Controllables" which also uses a gamepad, and see if it causes a crash or not. I don't know if I can fix that issue, but I am interested to research it more and see whether or not I missed something in my code or if its something completely out of my hands.

mister-proger commented 2 months ago

I installed this: https://mrcrayfish.com/mods/controllable

My joystick is not displayed there, nothing breaks. However, in the documentation for this mod, I found a warning about problems if Steam is enabled. The problem with virtual controllers is possible for you (I have Windows 11). I just tried your mod without Steam enabled: 1) Physically disconnected my joystick (took out the USB) 2) Opened Minecraft 3) I took your gaming gamepad, opened it on the Shift, ran around, poked - everything is OK 4) Connected my joystick (it seemed to me, or was there a strong lag at that moment?) 5) Ran around, poked the ground - everything is OK 6) I took your joystick in my hand - everything is OK 7) Opened the menu on Shift - departure without frieze

I googled - other games I've played with this joystick use the same input methods (DirectInput and XInput for sure). Nothing new has been added to the logs, they abruptly stop at the same moment. I'll try again with other launchers. And it's even possible on another device.

getItemFromBlock commented 2 months ago

Controllable (the mod you just tested with) can use GLFW or SDL for inputs, but I am not 100% sure which is the default one. If you tell me that the crash only happens when you try to open the menu, but not when you try to use the controller then Iight be able to avoid it If you try to use my controller (the in game one), and press buttons/move the joysticks on your physical device does my controller show activity ?

mister-proger commented 2 months ago

debug.log latest.log

That's smart. I wouldn't have thought of that. I successfully set up the redstone, closed the menu, connected the joystick (there was definitely a hang), everything was OK, but I pressed the RMB (that is, I switched to control mode), got a freeze and a flight. I'm attaching logs just in case (but there's nothing new there, it seems).

getItemFromBlock commented 2 months ago

Ok so the crash occurs when the mod tries to read data from the gamepad. Do you have the reference (brand + model) of your gamepad ? Maybe I could be able to find some information about it online that could help me understand what is going on. At least for now you should be able to use the mod without your gamepad, by configuring the in game gamepad to use mouse and keyboard inputs.

getItemFromBlock commented 2 months ago

Here is the wiki page for the setup, in case you didn't see it: https://github.com/getItemFromBlock/Create-Tweaked-Controllers/wiki/The-advanced-input-mode

mister-proger commented 2 months ago

When I connected my joystick, this configuration menu also crashed.

getItemFromBlock commented 2 months ago

Alright so as far as I have seen there is nothing that I can really do, and without any new information I will close this issue If you manage to make it work let me know, maybe your joystick's vendor will release an updated driver sometime in the future ?