Hello. I was ready to release to alpha in the next few days, but a really game-breaking bug has made its way into my intersect stack. I really wish I knew how to cause it - it seems to happen completely at random. I will provide a diffy at the end of this post, and even would happily supply my server, client, and editor to anyone who would like to help me out. I'm at my wits end here.
Â
I noticed a while ago that my intersect server was NOT saving correctly. I'd log in and be in a completely different place, with completely different items, than I had when I last logged out. BUT, it wasn't even as if I was simply set back to a previous save, because importantly, SOME properties would save (player variables and quest statuses most of the time). As you can imagine, this destroys the game completely that, at this point, I've spent 5 months or so on?
Â
Specifically, the following things tend to not save correctly, that I've noticed:
Â
- Inventory
- Map position
- Quest Status
- Player Variables
- Level & Exp
Â
But not always the same stuff.
Â
Some examples:
- Consider some quest where I'm given a key to unlock some door. After giving the key, a player variable is set to true so the key won't be given again. If the bug occurs after doing the bit where I unlock some door (reliant on some player var), I could be in a state where I've USED my key, but the player variables have reset - the door is locked, but my quest status updated such that the quest giver won't give me a key anymore. Because not every bit of player data was saved.
- Another example, that seems even stranger, is the one that made me post here. I was testing my game on my prod host, as I was going to release alpha tomorrow. I logged in to discover, to my horror, that the bug was affecting my prod server as well - I noticed because all of the copper in my inventory was gone - but a stackable item I was accumulating while mining the copper was still there!
Â
Here's a diffy of my source changes since I first noticed the bug. I've made a few, but nothing too heavy. I realize this is a lot to look at, but I figure I may as well include it in case anyone takes special interest: https://diffy.org
Otherwise, the biggest thing I'm asking for is does anyone have any suggestions as to how I can start debugging this? As mentioned previously, I have spent months on this project. I think I did a good job. I want to share it with people. But it can NOT be played in this state, and that really sucks.
Â
I suspect a good place to debug would be wherever the code lies that is updating the playerDB - but I'm having trouble finding where that is and, if it's where I think it is (Server -> PlayerData -> User), then I'm having a really hard time figuring out what it's doing, and would love help.
Â
I have seen this bug occur both in a SQLite PlayerDB and a MySql DB
Â
Â
I also have never seen any suspicious logging in my server.
Question
Daywalkr
Hello. I was ready to release to alpha in the next few days, but a really game-breaking bug has made its way into my intersect stack. I really wish I knew how to cause it - it seems to happen completely at random. I will provide a diffy at the end of this post, and even would happily supply my server, client, and editor to anyone who would like to help me out. I'm at my wits end here.
Â
I noticed a while ago that my intersect server was NOT saving correctly. I'd log in and be in a completely different place, with completely different items, than I had when I last logged out. BUT, it wasn't even as if I was simply set back to a previous save, because importantly, SOME properties would save (player variables and quest statuses most of the time). As you can imagine, this destroys the game completely that, at this point, I've spent 5 months or so on?
Â
Specifically, the following things tend to not save correctly, that I've noticed:
Â
- Inventory
- Map position
- Quest Status
- Player Variables
- Level & Exp
Â
But not always the same stuff.
Â
Some examples:
- Consider some quest where I'm given a key to unlock some door. After giving the key, a player variable is set to true so the key won't be given again. If the bug occurs after doing the bit where I unlock some door (reliant on some player var), I could be in a state where I've USED my key, but the player variables have reset - the door is locked, but my quest status updated such that the quest giver won't give me a key anymore. Because not every bit of player data was saved.
- Another example, that seems even stranger, is the one that made me post here. I was testing my game on my prod host, as I was going to release alpha tomorrow. I logged in to discover, to my horror, that the bug was affecting my prod server as well - I noticed because all of the copper in my inventory was gone - but a stackable item I was accumulating while mining the copper was still there!
Â
Here's a diffy of my source changes since I first noticed the bug. I've made a few, but nothing too heavy. I realize this is a lot to look at, but I figure I may as well include it in case anyone takes special interest: https://diffy.org
/diff/e15db23591a7
Â
The most suspicious bit of code I've introduced would be here: https://github.com/AscensionGameDev/Intersect-Engine/pull/811/files
Â
Otherwise, the biggest thing I'm asking for is does anyone have any suggestions as to how I can start debugging this? As mentioned previously, I have spent months on this project. I think I did a good job. I want to share it with people. But it can NOT be played in this state, and that really sucks.
Â
I suspect a good place to debug would be wherever the code lies that is updating the playerDB - but I'm having trouble finding where that is and, if it's where I think it is (Server -> PlayerData -> User), then I'm having a really hard time figuring out what it's doing, and would love help.
Â
I have seen this bug occur both in a SQLite PlayerDB and a MySql DB
Â
Â
I also have never seen any suspicious logging in my server.
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now