New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash using EMP grenade on Milspec turret #25579

Closed
runforitkyle opened this Issue Sep 13, 2018 · 6 comments

Comments

Projects
None yet
7 participants
@runforitkyle

runforitkyle commented Sep 13, 2018

Describe the bug
Game crashes to desktop when using EMP grenade on Milspec turret, the crash does not occur when using the EMP grenade on other targets or by its self. Throwing a normal grenade does not cause this crash.

To Reproduce
Steps to reproduce the behavior:

  1. Make a player with an EMP grenade and an electrohack in front of a bunker
  2. Hack the panel which opens the doors with the elctrohack
  3. Arm and throw an EMP grenade down the hallway.

Expected behavior
The game not crashing and the turrets being damaged by the grenade.

Screenshots
If applicable, add screenshots to help explain your problem.
image
Location of grenade that causes a crash

Versions and configuration(please complete the following information):

  • OS: Windows 10
  • Game Version: 0.C-31982-gda4e596
  • Graphics version: Tiles
  • Mods loaded: DDA, Filthy clothing, Disable NPC Needs, NPC traits, Mutant NPCs, Manual Bionic Installation, Safe Autodoc

Additional context
Megucaland.zip
The save where the crash is occurring.

@CoroNaut

This comment has been minimized.

Show comment
Hide comment
@CoroNaut

CoroNaut Sep 13, 2018

I had made reloaded and thrown 6 nades to the specified location
first 2 time: no crash, next 3 time: got crash to desktop, last time: got microsoft runtime error "Program terminated in unusual way" then crash to desktop.

CoroNaut commented Sep 13, 2018

I had made reloaded and thrown 6 nades to the specified location
first 2 time: no crash, next 3 time: got crash to desktop, last time: got microsoft runtime error "Program terminated in unusual way" then crash to desktop.

@AMurkin

This comment has been minimized.

Show comment
Hide comment
@AMurkin

AMurkin Sep 13, 2018

Contributor

I had unresponsive process and CTD after several seconds when emp grenade should explode near a turret. No related lines in debug.log.

Contributor

AMurkin commented Sep 13, 2018

I had unresponsive process and CTD after several seconds when emp grenade should explode near a turret. No related lines in debug.log.

@Regularitee

This comment has been minimized.

Show comment
Hide comment
@Regularitee

Regularitee Sep 13, 2018

Contributor

I can confirm this problem exists. I've had similar crashes using the old fashioned technique of arm grenade, pop around lab corner, toss grenade, and run. Crashed in about 2 of 5 attempts.

Contributor

Regularitee commented Sep 13, 2018

I can confirm this problem exists. I've had similar crashes using the old fashioned technique of arm grenade, pop around lab corner, toss grenade, and run. Crashed in about 2 of 5 attempts.

@mrkybe

This comment has been minimized.

Show comment
Hide comment
@mrkybe

mrkybe Sep 14, 2018

Contributor

Taking a look at this now.

Edit: Can confirm the crash.

In creature.cpp, exception is thrown when trying to find eff_id in effects. I think it has something to do with eff_id getting invalided or something?

bool Creature::has_effect( const efftype_id &eff_id, body_part bp ) const
{
    // num_bp means anything targeted or not
    if( bp == num_bp ) {
        return effects->find( eff_id ) != effects->end();
Contributor

mrkybe commented Sep 14, 2018

Taking a look at this now.

Edit: Can confirm the crash.

In creature.cpp, exception is thrown when trying to find eff_id in effects. I think it has something to do with eff_id getting invalided or something?

bool Creature::has_effect( const efftype_id &eff_id, body_part bp ) const
{
    // num_bp means anything targeted or not
    if( bp == num_bp ) {
        return effects->find( eff_id ) != effects->end();
@ZhilkinSerg

This comment has been minimized.

Show comment
Hide comment
@ZhilkinSerg

ZhilkinSerg Sep 14, 2018

Contributor

Adding early return to Creature::has_effect

    if( effects->empty() ) {
        return false;
    }

switches crash to

image

Contributor

ZhilkinSerg commented Sep 14, 2018

Adding early return to Creature::has_effect

    if( effects->empty() ) {
        return false;
    }

switches crash to

image

@AMurkin

This comment has been minimized.

Show comment
Hide comment
@AMurkin

AMurkin Sep 14, 2018

Contributor

May be related: #22071

Contributor

AMurkin commented Sep 14, 2018

May be related: #22071

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment