Curios API (Forge/NeoForge)

Curios API (Forge/NeoForge)

140M Downloads

A few Crashes..

RobertSkalko opened this issue ยท 3 comments

commented

I have a bag that opens an inventory, not a curio item. Game crashes when i right click it. (i just tested it outside IDE and same crash)

https://hastebin.com/usirudevuk.cs

This one rarely happens on clicking G to open the curio inventory in IDE

https://hastebin.com/wewuduvise.cs

There's also a random error when mousing over curio items, it's like 50% chance that when i start the game (in IDE) that it crashes on curio item tooltip. And other 50% chance that it works fine.

https://hastebin.com/goluxowono.cs

Here's the key links to my code that i think could be the problem

https://github.com/RobertSkalko/Mine-and-Slash-1.13/blob/master/src/main/java/com/mmorpg_libraries/curios/AddCurioCapability.java

https://github.com/RobertSkalko/Mine-and-Slash-1.13/tree/master/src/main/java/com/robertx22/items/bags/currency_bag

I assume the bag one is possibly my problem, but i think the other 2 aren't.

commented

I don't think any of these crashes are due to Curios.

The first crash happens when some capability returns null from the dispatcher. I'm not sure I was able to find all of the capabilities in your workspace, but I didn't see anything that wasn't already using LazyOptional.empty() so that's a strange issue.

The second crash is happening due to network registration not initializing. I don't know how that happens, might be a Forge issue especially since it only happens rarely. Basically, it just skipped the Curios network registration entirely for some reason when loading. I know there was a previous issue that had this that was due to the Twitch launcher, but I'm not sure how it happens in an IDE.

The third crash might be a Forge issue also, not sure. I'm not trying to unilaterally blame Forge for everything, but it seems like the most likely explanation. It seems like the crash is happening due to the capability not being injected when registering so it remains null?

Sorry I can't be more helpful, but these crashes have causes that I can't quite pin down and I don't think they're caused by Curios from my educated guesses. And since Forge is still in beta it's hard to know what's a mod issue and what's a Forge issue.

commented

Follow our discussion on Discord, I'll be closing this issue for now as I don't think Curios is the cause. If new information about the situation comes to light, let me know and I'll re-open/re-investigate.

commented

Ok. just wanna add that i just now removed curios and my bags all work fine. So the first issue shouldn't be some problematic bag code on my end.