#107 CTD in desert

Closed
opened 1 week ago by eugeneloza · 8 comments
Traceback (most recent call last):
  File "/home/eugene/rogueboxadventures1/main.py", line 14251, in <module>
    main()
  File "/home/eugene/rogueboxadventures1/main.py", line 14235, in main
    test = player.user_input()
  File "/home/eugene/rogueboxadventures1/main.py", line 10373, in user_input
    self.move(0,1)
  File "/home/eugene/rogueboxadventures1/main.py", line 7855, in move
    world.maplist[self.pet_pos[2]][self.pet_on_map].npcs[self.pet_pos[1]][self.pet_pos[0]].lp = 999 #set pets lp to 999 to make them unbreakable
AttributeError: 'int' object has no attribute 'lp'

I've saved the game (by exit-load). I've been trying to destroy something in desert, but nothing happened. When I've tried to move, that CTD shot. Including I've tried to "remove" a Neko with his bed :)

``` Traceback (most recent call last): File "/home/eugene/rogueboxadventures1/main.py", line 14251, in <module> main() File "/home/eugene/rogueboxadventures1/main.py", line 14235, in main test = player.user_input() File "/home/eugene/rogueboxadventures1/main.py", line 10373, in user_input self.move(0,1) File "/home/eugene/rogueboxadventures1/main.py", line 7855, in move world.maplist[self.pet_pos[2]][self.pet_on_map].npcs[self.pet_pos[1]][self.pet_pos[0]].lp = 999 #set pets lp to 999 to make them unbreakable AttributeError: 'int' object has no attribute 'lp' ``` I've saved the game (by exit-load). I've been trying to destroy something in desert, but nothing happened. When I've tried to move, that CTD shot. Including I've tried to "remove" a Neko with his bed :)
eugeneloza commented 1 week ago
Poster

Hmm... now this CTD happens whenever I try to move (just load game and try to move) - not trying to demolish anything :)

Hmm... now this CTD happens whenever I try to move (just load game and try to move) - not trying to demolish anything :)
themightyglider commented 1 week ago
Owner

I think you encountered a very nasty bug that corrupts your save games. I'm hunting this one for a while now already but can't figure out what's the problem. :( I guess this occured after #105 ?

I think you encountered a very nasty bug that corrupts your save games. I'm hunting this one for a while now already but can't figure out what's the problem. :( I guess this occured after #105 ?
eugeneloza commented 1 week ago
Poster

Yes, it feels like this was caused due to player character and pet sharing the same tile. However, this is not too accurate :)

Yes, it feels like this was caused due to player character and pet sharing the same tile. However, this is not too accurate :)
eugeneloza commented 1 week ago
Poster

Small update on the issue:

Scroll of return didn't fix the problem. It acts correctly, the character returns to Elysium, but the next step brings back CTD.

Company inventory page is inaccessible (displays nothing and the view is not updated). However it is most certainly activated, because to switch to next page I need to move again screens. Moreover, it does seem to accept some input (reacts to keys), but it changes nothing.

So it's most likely the pet issue with pet coordinates being wrong in some way. Maybe, self.pet_pos is invalid for some reason (e.g. beyond the map when it is added/removed to the map, afair it uses 0,0 cell).

And yes, the pet is not visible on map neither in Desert nor in Elysium.

I have a copy of save if that might bring any light :)

Small update on the issue: Scroll of return didn't fix the problem. It acts correctly, the character returns to Elysium, but the next step brings back CTD. Company inventory page is inaccessible (displays nothing and the view is not updated). However it is most certainly activated, because to switch to next page I need to move again screens. Moreover, it does seem to accept some input (reacts to keys), but it changes nothing. So it's most likely the pet issue with pet coordinates being wrong in some way. Maybe, `self.pet_pos` is invalid for some reason (e.g. beyond the map when it is added/removed to the map, afair it uses 0,0 cell). And yes, the pet is not visible on map neither in Desert nor in Elysium. I have a copy of save if that might bring any light :)
themightyglider commented 1 week ago
Owner

I've made a change that could rescue your save game. Unfortunately you'll lose your pet because of it.

I've made a change that could rescue your save game. Unfortunately you'll lose your pet because of it.
eugeneloza commented 1 week ago
Poster

Well, there's no problem in loosing something or even the whole savegame - don't feel any trouble here, I can easily replay everything from the very beginning :) It's all about making a stable game that doesn't crash :) Or at least doesn't crash too wildly :)

Well, there's no problem in loosing something or even the whole savegame - don't feel any trouble here, I can easily replay everything from the very beginning :) It's all about making a stable game that doesn't crash :) Or at least doesn't crash too wildly :)
themightyglider commented 1 week ago
Owner

The problem is that sometimes if the game crashes your save file is messed up (to be exactly the position of your pet) what leads the game to crash again every time you try to restore the save. My change just deletes the pet, this way the game would at least not crash every time. But you are right. I need to fix the reason for the initial crash.

But at least there are much less CTDs then I had expacted after adding a complex feature like pets. :)

The problem is that sometimes if the game crashes your save file is messed up (to be exactly the position of your pet) what leads the game to crash again every time you try to restore the save. My change just deletes the pet, this way the game would at least not crash every time. But you are right. I need to fix the reason for the initial crash. But at least there are much less CTDs then I had expacted after adding a complex feature like pets. :)
themightyglider commented 1 week ago
Owner

#105 is fixed too. I'll close this issue for now.

#105 is fixed too. I'll close this issue for now.
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.