Welcome to the Builder Academy

Question Crash bug - need assistance with GDB

More
18 Jan 2018 00:14 #7394 by cunning
Thank you! I knew what i did was easier for you to find it. I was bashing my head against a wall trying things.

Thank you !!!!

Please Log in or Create an account to join the conversation.

More
18 Jan 2018 16:52 #7402 by Fizban
Thanks Welcor. I added the fix to git.

Please Log in or Create an account to join the conversation.

More
18 Jan 2018 19:03 - 18 Jan 2018 19:04 #7404 by cunning
maybe i am missing something here, but i am not quite sure what these lines accomplish. I do not see us updating the value of lt->c or lt->next->c. Just wondering what the point of these lines are except to confirm lt->next->c is the correct uid value?


for (;lt && lt->next; lt = lt->next)
+ if (lt->next->uid == uid) {
+ log("add_to_lookup updating existing value for uid=%ld (%p -> %p)", uid, lt->next->c, c);
+ return;
+ }
Last edit: 18 Jan 2018 19:04 by cunning.

Please Log in or Create an account to join the conversation.

More
18 Jan 2018 20:57 - 18 Jan 2018 20:58 #7405 by thomas
If you log in, enter the game, quit and then enter the game again (by pressing 1), you will see the log statement.
It will now write "add_to_lookup updating existing value for uid=<some_id> (<a pointer> -> <the same pointer>)" but it didn't before the fix. Then, you'd get different pointers (!).
Last edit: 18 Jan 2018 20:58 by thomas.
The following user(s) said Thank You: cunning

Please Log in or Create an account to join the conversation.

Time to create page: 0.267 seconds