Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old April 3, 2018, 15:34   #1
Gordon
Scout
 
Join Date: Jan 2010
Posts: 31
Gordon is on a distinguished road
Solution for Angband crash on startup when compiled with Visual Studio

Symptoms:

Birth screens work fine, but Angband crashes with an access violation code 0xc0000005 in ntdll.dll just after displaying "Please wait..." in ui_leave_init().

Problem:

Shortly after calling ui_enter_world(), Term_xtra(TERM_XTRA_REACT, 0) is called which then calls init_graphics() in main-win.c This calls ReadDIB2_PNG() in readpng.c to read in the graphic tiles. The crash occurs when png_read_info(png_ptr, info_ptr) is called at line 102.

Solution:

libpng12.dll is multi-threaded and so requires Angband to be compiled with support for multi-threaded dlls. To do this you must set Use run-time library to Multithreaded DLL under Code Generation on the C/C++ tab in Project Settings. This causes the /MD flag to be set in the project Makefile.

Testing Environment:

Angband Version: 4.05
OS Version: Windows XP SP3
Visual Studio Version: 6.0 SP6

This very important detail should be added to angband_visual_studio_step_by_step.txt.
Gordon is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with compliing Angband with Visual Studio 2016 Nekoninja Development 2 August 22, 2016 00:34
Visual Studio challenges jeritind Development 4 January 1, 2014 20:26
Visual Studio 2010 Express, help for the newbie? Chud Development 12 June 14, 2013 23:40
3.3.0 crash on startup Chud Vanilla 6 September 20, 2011 19:17
Visual Studio 2008 - building 32 & 64 bit now! LanceDiamond Development 5 April 25, 2009 14:59


All times are GMT +1. The time now is 19:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.