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

Crash when looking around (x) #34201

Closed
moxian opened this issue Sep 23, 2019 · 3 comments · Fixed by #34216
Closed

Crash when looking around (x) #34201

moxian opened this issue Sep 23, 2019 · 3 comments · Fixed by #34216
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. (S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@moxian
Copy link
Contributor

moxian commented Sep 23, 2019

Describe the bug

Game crashes

Steps To Reproduce

  • Load attached save
  • press x (look around
  • press and hold 9 (north-east)
  • when you get roughly to the road, the game will crash

Expected behavior

Game does not crash.
Because crashing is a bad user experience

Versions and configuration

  • OS: Windows
    • OS Version: Win 7
  • Game Version: 0.D-7842-gcfc7f8a [32-bit]
  • Graphics Version: Tiles
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food]
    ]

Additional context

crash.log
debug.log
Lawnton.zip

@Night-Pryanik Night-Pryanik added (S1 - Need confirmation) Report waiting on confirmation of reproducibility <Crash / Freeze> Fatal bug that results in hangs or crashes. labels Sep 23, 2019
@moxian
Copy link
Contributor Author

moxian commented Sep 24, 2019

Call stack:

>	cataclysm-tiles.exe!cata_tiles::draw(const point & dest, const tripoint & center, int width, int height, std::multimap<point,formatted_text,std::less<point>,std::allocator<std::pair<point const ,formatted_text> > > & overlay_strings, std::pair<enum SDL_BlendMode,std::multimap<point,SDL_Color,std::less<point>,std::allocator<std::pair<point const ,SDL_Color> > > > & color_blocks) Line 1207	C++
 	cataclysm-tiles.exe!cata_cursesport::curses_drawwindow(const catacurses::window & w) Line 1047	C++
 	cataclysm-tiles.exe!game::look_around(catacurses::window w_info, tripoint & center, const tripoint & start_point, bool has_first_point, bool select_zone, bool peeking) Line 6701	C++
 	cataclysm-tiles.exe!game::look_around() Line 6556	C++
 	cataclysm-tiles.exe!game::handle_action() Line 1650	C++
 	cataclysm-tiles.exe!game::do_turn() Line 1446	C++
 	cataclysm-tiles.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 688	C++
 	[External Code]	
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	Unknown
 	cataclysm-tiles.exe!`dynamic initializer for 'land_use_code_wetland''() Line 40	C++

the crash occurs at

draw_terrain( pos, ch.visibility_cache[x][y], height_3d, invisible );
with ch.visibility_cache being a 132x132 array, and x/y being 174/-45 respectively...

I have no idea how this even works in the first place, and why it does not crash under normal play...

cc @Qrox who has been working on cata_tiles.cpp recently

@moxian
Copy link
Contributor Author

moxian commented Sep 24, 2019

I've partially bisected this to be introduced between 687b534 (good) and 687b534 (bad), both belonging to #33760
I'm not sure how much more time I'll be able to spend time on this today; will update if i find something else of interest.

Edit: the last several bisect steps turned out to be super quick, and said that bfee44d is the first bad commit.

@Qrox
Copy link
Contributor

Qrox commented Sep 24, 2019

Oops, it seems I forgot to add bound check when moving the memory drawing code. Thanks, I'll look into it.

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. (S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants