quantum-core-x icon indicating copy to clipboard operation
quantum-core-x copied to clipboard

bug: item swap

Open Jafah opened this issue 1 year ago • 4 comments

What happened?

Swapping an item with another one, by i.e. right clicking armor in your inventory, both items dissappear and the connection is non-responsive

How to reproduce?

right click an item i.e. a weapon when another weapon is equipped

Stacktrace

No response

OS Platform

Windows

Additional Information and Notes

No response

Jafah avatar Oct 06 '24 15:10 Jafah

Game connection crashes at ItemRepository.cs at line 73 when the swap is called await _cacheManager.Set(key, item); The previous write to the database, line 70, goes through and it is persistent between restarting after a crash So the problem is likely in / with Redis and or caching.

Jafah avatar Oct 10 '24 15:10 Jafah

I'll take a look for the Redis part. But my strongest guess is server-client packet order for equip-unequip actions

uutkukorkmaz avatar Oct 10 '24 15:10 uutkukorkmaz

The packet handeling was my first guess, but it ended on line 73 and i have almost no experience with memory so i thought its probably wrong. But it still needed a restart of the server to be able to rejoin the game since it stated that the user was already connected, so server-sided it may have stopped registering new packets because of a faulty predecessor.

Jafah avatar Oct 10 '24 19:10 Jafah

You don't need to restart the server after getting the "you already logged in" message; just try logging in again, and it will succeed. That's another bug related to the unexpected drop of connection. I haven't had a chance to take a deep look yet, but packet order is still my strongest candidate for this issue's root cause.

I also discovered a significant number of bugs with item and inventory management. I’ll open respective issues for those as soon as possible.

uutkukorkmaz avatar Oct 10 '24 20:10 uutkukorkmaz