Page 1 of 1

[0.7.0] Crash when pressing shift + spacebar

Posted: Sun Sep 29, 2013 2:52 am
by FreeER
windows x64 installation version of Factorio (build 6571)
Noticed this when I placed fish in the last hotbar slot (shift+5). I'd be shooting and then try to use fish and heal, and sometimes I'd crash. Did a quick test and it seems sometimes I didn't lift off of the shift key before I went back to shooting and when I hit the spacebar to shoot Factorio would crash. Quick work around of course is to move the fish/consumables to one of the first five slots or make sure to not hold shift but still a somewhat interesting (and annoyingly timed) crash.

Re: [0.7.0] Crash when pressing shift + spacebar

Posted: Sun Sep 29, 2013 9:30 am
by Nirahiel
It's because Shift+Space is meant to pause the game, and I think the game is trying to pause then heal you and shoot at the same time and since you can't heal or shoot when the game is paused, it crashes.

Re: [0.7.0] Crash when pressing shift + spacebar

Posted: Sun Sep 29, 2013 12:16 pm
by slpwnd
Thanks for the report. This will be fixed in 0.7.1. Nirahiel is sort of right. The cause of the crash was that shift + space paused the game while the progress bars on capsules in the hotbars were still running. And then some internal state would go wrong. Comment from the code:

Code: Select all

 // game view is not updated intentionally to keep the regular (character) view
 // TODO this could potentially cause some errors if those guis are calling
 // controller methods via the player interface

Re: [0.7.0] Crash when pressing shift + spacebar

Posted: Sun Sep 29, 2013 12:28 pm
by Nirahiel
slpwnd wrote:Nirahiel is sort of right.
Yeah I know :ugeek:
If only I could have access to more than just the LUA scripts :D

Re: [0.7.0] Crash when pressing shift + spacebar

Posted: Sun Sep 29, 2013 3:11 pm
by FreeER
slpwnd wrote:Comment from the code:

Code: Select all

 // game view is not updated intentionally to keep the regular (character) view
 // TODO this could potentially cause some errors if those guis are calling
 // controller methods via the player interface
LOL
Nirahiel wrote:I know
lol, I'd forgotten about shift+space being used to pause the game (I always use Esc) so my guess was some error with hitting shift causing it to expect a number and somehow the space slipped through error checking, even though that seemed unlikely.
Nirahiel wrote:If only I could have access to more than just the LUA scripts :D
I wouldn't mind that either, admittedly it'd be more of a learning experience for me (I've only recently gotten around to learning Java and C/C++, and the basics of asm) :geek: I'll continue to hope that eventually the source will be released for those who would like to see it (even if it's only to those who are trusted not to upload it elsewhere) xD

Re: [0.7.0] Crash when pressing shift + spacebar

Posted: Sun Sep 29, 2013 5:14 pm
by slpwnd
FreeER wrote:I'll continue to hope that eventually the source will be released for those who would like to see it (even if it's only to those who are trusted not to upload it elsewhere) xD
We have agreed with kovarex to do this at some point in the (not so far) future.

Re: [0.7.0] Crash when pressing shift + spacebar

Posted: Mon Sep 30, 2013 12:45 am
by FreeER
slpwnd wrote: We have agreed with kovarex to do this at some point in the (not so far) future.
:shock: news to me so, YAY :!: