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

Crashes when dragging cart onto certain tile #19168

Closed
GenericEnemy3 opened this issue Nov 5, 2016 · 5 comments

Comments

Projects
None yet
7 participants
@GenericEnemy3
Copy link

commented Nov 5, 2016

Found a tile in my save game where by dragging a cart onto it, will crash the game entirely. I suspect that the tile in question is from a "failed" vehicle construction bug, where by not having at least 2 frames in your inventory when starting construction, will simply destroy the frame and not initiate vehicle construction. Dragging non cart objects "shifts" the tile along with the object, while also forcing you to release the object.

save.zip
crash tile

@BrettDong

This comment has been minimized.

Copy link
Contributor

commented Nov 5, 2016

Thank you for providing the save file!

Backtrace:

Process 41554 stopped
* thread #1: tid = 0x810b6, 0x0000000100435f2e cataclysm-tiles`tripoint::operator+(this=0x00007fff5fbf6a70, rhs=0x0000000000000028) const + 30 at enums.h:316, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x38)
    frame #0: 0x0000000100435f2e cataclysm-tiles`tripoint::operator+(this=0x00007fff5fbf6a70, rhs=0x0000000000000028) const + 30 at enums.h:316
   313      /*** some point operators and functions ***/
   314      tripoint operator+(const point &rhs) const
   315      {
-> 316          return tripoint(x + rhs.x, y + rhs.y, z);
   317      }
   318      tripoint operator-(const point &rhs) const
   319      {
(lldb) bt
* thread #1: tid = 0x810b6, 0x0000000100435f2e cataclysm-tiles`tripoint::operator+(this=0x00007fff5fbf6a70, rhs=0x0000000000000028) const + 30 at enums.h:316, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x38)
  * frame #0: 0x0000000100435f2e cataclysm-tiles`tripoint::operator+(this=0x00007fff5fbf6a70, rhs=0x0000000000000028) const + 30 at enums.h:316
    frame #1: 0x0000000101a5c973 cataclysm-tiles`vehicle::global_part_pos3(this=0x000000011b53d330, pt=0x0000000000000000) const + 99 at vehicle.cpp:2771
    frame #2: 0x0000000101a596a3 cataclysm-tiles`vehicle::global_part_pos3(this=0x000000011b53d330, index=0x00007fff5fbf7154) const + 83 at vehicle.cpp:2766
    frame #3: 0x00000001007ab625 cataclysm-tiles`game::grabbed_veh_move(this=0x00000001227dd840, dp=0x00007fff5fbf7b10) + 8453 at game.cpp:12506
    frame #4: 0x000000010079fe7b cataclysm-tiles`game::grabbed_move(this=0x00000001227dd840, dp=0x00007fff5fbf7b10) + 107 at game.cpp:12670
    frame #5: 0x000000010079e65e cataclysm-tiles`game::walk_move(this=0x00000001227dd840, dest_loc=0x00007fff5fbf8630) + 2110 at game.cpp:12018
    frame #6: 0x00000001007012cd cataclysm-tiles`game::plmove(this=0x00000001227dd840, dx=0, dy=-1, dz=0) + 8621 at game.cpp:11849
    frame #7: 0x00000001006ce23b cataclysm-tiles`game::handle_action(this=0x00000001227dd840) + 5563 at game.cpp:2672
    frame #8: 0x00000001006c9e3b cataclysm-tiles`game::do_turn(this=0x00000001227dd840) + 2507 at game.cpp:1468
    frame #9: 0x0000000100cd2ef6 cataclysm-tiles`main(argc=0, argv=0x00007fff5fbffaa0) + 8742 at main.cpp:491
    frame #10: 0x00007fffb4f8e255 libdyld.dylib`start + 1
    frame #11: 0x00007fffb4f8e255 libdyld.dylib`start + 1
@BrettDong

This comment has been minimized.

Copy link
Contributor

commented Nov 5, 2016

However after the first trial, I'm unable to reproduce the crash again. I've tried at least ten times, every time I remove the written game save and unzip it again.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Nov 5, 2016

Judging from the backtrace, it seems that a null part is somehow being accessed.

This would support the idea that it's due to failed vehicle construction. This also means that we'll need to purge saves from 0 part vehicles, to avoid this happening in the future.

@remyroy

This comment has been minimized.

Copy link
Contributor

commented Dec 15, 2016

I just tested your save file and I can confirm the crash on 0.C-20238-g71a073f . I'm working on debugging and fixing this issue.

@Night-Pryanik

This comment has been minimized.

Copy link
Member

commented Mar 31, 2017

Is this still an issue after #20536?

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.