Lightman's Currency

Lightman's Currency

331k Downloads

BUG: {Item Trading Server - Change Price Crash}

Bee-Build opened this issue · 4 comments

commented

Minecraft Version (REQUIRED): 1.16.5
Forge Version (REQUIRED): 36.2.20
Lightman's Currency Version (REQUIRED): lightmanscurrency-1.16.4-1.0.3.4
Other Relevant Mods & Version (LC Tech, etc.): No other mods.
Connection Type (Single-player, server/client, LAN world): Single-Player AND Server/Client

Describe the bug
Opening the "Change Price" panel, clicking NO BUTTONS, then exiting the block's GUI and breaking the block causes a full world crash.
If buttons in the fly-out panel are clicked, no crash occurs. It does not occur on other blocks from similar actions, only the Trading Server blocks.
Problem occurs in creative and survival modes for all players.
Problem occurs in previous versions of Lightman's as well; tested on versions all the way back to lightmanscurrency-1.18-1.0.2.5

To Reproduce
Steps to reproduce the behavior:

  1. Go to Trade Server Block GUI
  2. Click on "Change Price" function in upper left.
  3. Without clicking or entering any data, exit the block's interface and break the block.
  4. Crash Report Provided

Expected behavior
The Trade Server Block should just break and drop the block.

Screenshots/Logs/Crash Reports
Crash Report:
crash-2022-02-14_11.21.36-server.txt

Additional context
2022-02-14_11 15 48
2022-02-14_11 15 53
2022-02-14_11 15 56

Add any other context about the problem here.

commented

Duly noted. It should be fixed in the next build, and I'm going to do thorough testing to make sure no crashes occur should any trader screen/menu be open when a trader is destroyed.

commented

I don't know if it will help, but the crash described happens without a trade window being open at the time of the block break. It occurs whenever that Change Price panel is opened, no input is entered, and closed again. THEN break the block and crash. In fact, if you open the Change Price panel on those server blocks, change a price up and then back down so there's no actual change, then close it the crash will NOT occur when you break the block. You have to specifically touch nothing and then exit.

commented

Yeah, the cause of the issue is that when someone opens the price screen, they never properly close the storage menu, thus the server still has it open at the time of the traders destruction (since screens are client-only). Fortunately I was planning on updating the internals of the Item Trader menu's to keep things functionally the same between universal & non-universal traders, so I'm taking the time to clear out any & all crashes that happen no matter where you are in the menus when a trader is destroyed (whether the client thinks your in the menu or not, although I am also making sure that the server is informed when you leave the storage menu by opening the trade rule/price/settings screens).

Edit: BTW the patch is nearly done, I just need to backport it to the 1.16 version, so it should be up by sometime tomorrow.

commented

Should be fixed in v1.0.3.5!