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

Game started crashing after experimental build 7002 #22596

Closed
ZhilkinSerg opened this issue Dec 13, 2017 · 8 comments · Fixed by #22638
Closed

Game started crashing after experimental build 7002 #22596

ZhilkinSerg opened this issue Dec 13, 2017 · 8 comments · Fixed by #22638
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes.

Comments

@ZhilkinSerg
Copy link
Contributor

ZhilkinSerg commented Dec 13, 2017

Something is bad in #22579 (see https://discourse.cataclysmdda.org/t/14649 for details):

 Using 32 bit Windows tiles through the launcher (which I’m running through Wine on a Linux machine) every build past 7002 crashes when it reaches the step “Finalizing Tileset”. It also crashes when I try to switch to a new tileset in the Settings menu in an attempt to see if it was the non-standard tileset I was using that was causing the issue - MShockXotto+ (opaque tree).
 Reverting to build 7001 and changing to Chesthole32 which I know ships standard with the game and then reinstalling build 7004 still results in a crash. Build 7001 continues to run fine.

Pinging @BevapDin :)

@Night-Pryanik Night-Pryanik added the <Crash / Freeze> Fatal bug that results in hangs or crashes. label Dec 13, 2017
@BevapDin
Copy link
Contributor

According to the posted log file:

17:22:23.748 INFO : Loaded tileset: ChestHole32
17:22:28.137 : Log shutdown.

The log system was shutdown, which means the destructors of the global objects have been run. This indicates the program did not just crash (as by accessing invalid memory), but was closed deliberately (likely via an assert statement).

Can you run the program via the command line and capture the standard error output when it closes unexpectedly?

#22598 may help finding the cause. But assertion failures are typically only printed on the console.

@ZhilkinSerg
Copy link
Contributor Author

ZhilkinSerg commented Dec 14, 2017

The crash also appears when changing value of "Use tiles" (from "False" to "True" or vice versa) in graphics options when trying to save these options. This only hapens after you tried to start game after you started executable.

@ZhilkinSerg
Copy link
Contributor Author

I've compiled version with changes from #22598 and started executable redirecting error output to file, but nothing appears there when exception arise.

Command line:
"C:\Source\Repos\Cataclysm-DDA\Cataclysm-Tiles.exe" 1> "C:\temp\out.txt" 2> "C:\temp\err.txt"

@BevapDin
Copy link
Contributor

when exception arise.

Exception? What exception is it?

Can you run this under a debugger like gdb?

@ZhilkinSerg
Copy link
Contributor Author

Exception? What exception is it?

I meant crash. No text and I doubt info from eventlog will be helpful:

Faulting application name: Cataclysm-Tiles.exe, version: 0.0.0.0, time stamp: 0x5a32d287
Faulting module name: Cataclysm-Tiles.exe, version: 0.0.0.0, time stamp: 0x5a32d287
Exception code: 0xc0000094
Fault offset: 0x0000000000096994
Faulting process id: 0x1c7c
Faulting application start time: 0x01d375131013c1c5
Faulting application path: C:\Source\Repos\Cataclysm-DDA\Cataclysm-Tiles.exe
Faulting module path: C:\Source\Repos\Cataclysm-DDA\Cataclysm-Tiles.exe

Can you run this under a debugger like gdb?

Trying to setup debug environment now.

@ZhilkinSerg
Copy link
Contributor Author

Exception thrown at 0x00007FF7CE719A85 in Cataclysm.exe: 0xC0000094: Integer division by zero.

If there is a handler for this exception, the program may be safely continued.
>	Cataclysm.exe!`anonymous namespace'::divide_rounded_up(const int v, const int div) Line 116	C++
 	Cataclysm.exe!tileset_loader::load_tileset(std::basic_string<char,std::char_traits<char>,std::allocator<char> > img_path) Line 445	C++
 	Cataclysm.exe!tileset_loader::load(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & tileset_id, bool precheck) Line 571	C++
 	Cataclysm.exe!cata_tiles::load_tileset(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & tileset_id, bool precheck) Line 225	C++
 	Cataclysm.exe!refresh_tiles(bool used_tiles_changed, bool pixel_minimap_height_changed, bool ingame) Line 1536	C++
 	Cataclysm.exe!options_manager::show(const bool ingame, const bool world_options_only) Line 1928	C++
 	Cataclysm.exe!main_menu::opening_screen() Line 519	C++
 	Cataclysm.exe!SDL_main(int argc, char * * argv) Line 517	C++
 	Cataclysm.exe!main_utf8(int argc, char * * argv) Line 127	C
 	Cataclysm.exe!WinMain(HINSTANCE__ * hInst, HINSTANCE__ * hPrev, char * szCmdLine, int sw) Line 191	C

@ZhilkinSerg
Copy link
Contributor Author

So, I guess the div is equal to 0 in some cases.

image

@ZhilkinSerg
Copy link
Contributor Author

Hope it helps - renderer is created with max_texture_width = 0:

image

ZhilkinSerg added a commit to ZhilkinSerg/Cataclysm-DDA that referenced this issue Dec 18, 2017
- restricts minimum texture size to 128 sprites wide and 256 sprites high;
- adds debug message about 0 `max_texture`-dimensions.

Fixes CleverRaven#22596
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

Successfully merging a pull request may close this issue.

3 participants