gdquest-demos/godot-open-rpg

CombatArena: Crash when cycling through targets with touch/mouse-based input

cogwoz opened this issue · 11 comments

Hello!

In about 30% of playthroughs, the game has crashed when I click to choose a target of a Skill.

I'm currently using Godot Alpha 5, commit 7ac62fa, Kubuntu 64 bit

Here is a video of the crash to show what I'm doing.

I noticed that clicking produced these errors but using the keyboard did not:

screenshot_20190105_101146

A crash does not add an error to the list. The game just closes.

I initially thought perhaps a variable was being caught as null while I was clicking because of my slower laptop but these errors may have something to do with it too.

Cheers!

Never happens here. As you can see in the readme we haven't updated to alpha 5 yet

Strange. It also happened with Alpha 4

I can't reproduce it. Did you try with a clean clone of the project? Also, which platform? Mac is still unstable

Yep it was a clean clone - I hadn't changed anything.

Linux 64 bit (Kubuntu). It seems strange which is why I'm wondering if it's hardware based. Do you get the errors?

I also experience a crash after a while playing, after clicking to move or in fighting scene.

The following gets triggered when clicking on obstacles. It might be related with the crashes, but I'm not sure what triggers it.

E 0:01:22:0465   Condition ' !points.has(p_to_id) ' is true. returned: PoolVector<Vector3>()
  <C Source>     core/math/a_star.cpp:339 @ get_point_path()
  <Stack Trace>  Pathfinder.gd:61 @ find_path()
                 GameBoard.gd:51 @ find_path()
                 PawnLeader.gd:61 @ _unhandled_input()

Also after running the game, if you check the debugger error tab you can already see some error output although errors are suppressed so I'm not sure what's happening there either. I'll check the code tomorrow if I got some time.

The pathfinding bug shouldn't be not related to the crash using skills during battle (unless we're that bad at programming 😂) but just fixed it, it was a small thing

Or please tell me if it helps! Iirc we remove the map from the tree during battle so the pathfinding code shouldn't even try to run. Then, the skills UI should also consume input events, preventing them from reaching other parts of the game

I'm still getting the find path error when pressing on the rectangle with triangle (I include that in obstacle category as well, but I suppose it's the same fix as with the walls or something similar). I could also make it crash during battle while just cycling through enemies but again, I don't know what triggers it, I don't think it's selecting the skill. This is the only relevant error in battle, I first assumed it's accessing some freed node that didn't properly get removed from scene, but I'm not sure. So I crashed during the second battle, without killing any of the enemies, just cycling through them. Unless it's trying to access some nodes that were from the previous battle...

E 0:02:56:0010   Condition ' !is_inside_tree() ' is true. returned: false
  <C Source>     scene/main/node.cpp:749 @ can_process()

Can you confirm this happens when clicking on/touching an enemy? I managed to crash the game a few times doing that. Doesn't print any error but at least it narrows the problem down to the selectarrow

Yes, I didn't manage to crash it while picking skills, but rather when switching enemies. The crash video @jaggygames posted is also on switching enemies.

Okay so I could reproduce it. Not sure what's causing it now, I'll check again later - got quite a few tasks to go through now. If either of you feels like having fun with this, help yourselves! 😄