Skip to content
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

Aiming at creatures can cause segfaults #17840

Closed
Coolthulhu opened this issue Jul 29, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@Coolthulhu
Copy link
Contributor

commented Jul 29, 2016

  • Spawn a shotgun, load it with shot
  • Remove vision-enhancing items and mutations
  • Set the time to night (23 hour)
  • Spawn a shocker in range
  • Aim at it until it moves
  • Segfault

Doesn't reproduce 100% reliably, but is still rather easy to reproduce. May require killing all critters first as there is a high chance it's index-dependent.
Could be related to the critter moving out of range, hence shotgun.

EDIT: Pinging @mugling who authored the most recent aiming PR and thus is the most likely to know what is causing this.
Forum thread:
http://smf.cataclysmdda.com/index.php?topic=13016.0

@BruceHoss

This comment has been minimized.

Copy link

commented Jul 29, 2016

Problem related to report #17813.

@mugling

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2016

Pinging @mugling who authored the most recent aiming PR

PR was #17767

Does anyone have a stacktrace?

@mugling

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2016

Can reproduce

do_aim (p=0x8051d7600, t=@0x7fffffff4ce0, target=@0x7fffffff4cdc, relevant=0x8051d78f0, tpos=@0x7fffffff4cf8)
    at src/ranged.cpp:943
943     if( t[target]->pos() != tpos ) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.