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

segmentation fault when dynamite has blown new wall #3916

Closed
gvitbsord opened this issue Oct 28, 2013 · 11 comments
Closed

segmentation fault when dynamite has blown new wall #3916

gvitbsord opened this issue Oct 28, 2013 · 11 comments
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes.
Milestone

Comments

@gvitbsord
Copy link

screenshot from 2013-10-28 09 57 17

@kevingranade
Copy link
Member

It happened while the animation cycle was running? interesting.
Can you give us the version of DDA this was on, and platform?

@ianestrachan
Copy link
Contributor

I note that there isn't any shrapnel in that explosion either, just the explosion itself.

@gvitbsord
Copy link
Author

latest git, ubuntu 13.10. Recently ive launched rocket and it worked ok.

@i2amroy
Copy link
Contributor

i2amroy commented Oct 28, 2013

This looks like a copy of this and #3767, which just as a quick glance looks like the game is trying to process the just exploded item even though it's already been destroyed.

@GlyphGryph
Copy link
Contributor

Program received signal SIGSEGV, Segmentation fault. Weapon: Mossberg 500 (7) Spring, day 1
555550x00000000006676cf in iuse::dynamite_act (this=0x7fffffffe31f, g=0x7ffff7f74010, p=0x7ffff7fc5530, it=0x4e65430, t=false) at iuse.cpp:3668 [ . ] SAFE
3668 return it->type->charges_to_use(); Focus 95
(gdb) bt
#0 0x00000000006676cf in iuse::dynamite_act (this=0x7fffffffe31f, g=0x7ffff7f74010, p=0x7ffff7fc5530, it=0x4e65430, t=false) at iuse.cpp:3668
#1 0x000000000067c84a in use_function::call (this=0x112bed0, g=0x7ffff7f74010, p=0x7ffff7fc5530, i=0x4e65430, b=false) at iuse.cpp:5915
#2 0x00000000006c4fa2 in map::process_active_items_in_submap (this=0x7ffff7f741b0, g=0x7ffff7f74010, nonant=59) at map.cpp:2395
#3 0x00000000006c472c in map::process_active_items (this=0x7ffff7f741b0, g=0x7ffff7f74010) at map.cpp:2335
#4 0x0000000000516e39 in game::do_turn (this=0x7ffff7f74010) at game.cpp:729
#5 0x000000000069fd17 in main (argc=0, argv=0x7fffffffe7b0) at main.cpp:102

@GlyphGryph
Copy link
Contributor

I'll post a save.

@GlyphGryph
Copy link
Contributor

@kevingranade
Copy link
Member

This is neither the "break items when bashing terrain", nor "break items
when shooting terrain" like I thought, so not sure what's causing it now.

@GlyphGryph
Copy link
Contributor

Regardless, have you tried just removing the exploding item from the map before calling the explode method, and then putting it back afterwards? Whatever the ultimate cause, that should fix it, right?

Like actually just before and after the explode methods like.

@kevingranade
Copy link
Member

No, I did what I thought was the fix right before bedtime (disable item smashing in map::bash() and map::shoot()), but that didn't work. Then I poked at it a little the next morning only to discover that map::i_rem() doesn't seem to be called at all, so now I have NO IDEA what's happening. Whatever is happening I'd expect removing and readding the item from the map in process_items_in_submap() to handle it,, doing it in iuse would make me really queasy.

@GlyphGryph
Copy link
Contributor

Fixed by #4145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes.
Projects
None yet
Development

No branches or pull requests

5 participants