Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 28, 2014, 07:29   #91
Mark
Adept
 
Join Date: Oct 2007
Posts: 112
Mark is on a distinguished road
Thanks Nick,

I took the second option you suggested and the errors are gone. Trying to compile gives a new Windows error. "The program can't start because libpng12.dll is missing from your computer. Try reinstalling the program to fix this problem." (image attached)

The output window contains:

Code:
'Angband15MG.exe' (Win32): Loaded 'D:\Users\mark\Documents\GitHub\angband\build\Debug\Angband15MG.exe'. Symbols loaded.
'Angband15MG.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'Angband15MG.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'Angband15MG.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
The program '[3840] Angband15MG.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.

I found libpng12.dll in src\win\dll - not being quite sure what to do I put copies in \src and \src\win. This didn't help. Given the output window referenced other dll's in "C:\windows\SysWOW64" I copied libpng12.dll there too - and this just gave a strange error instead (perhaps the same error but in foreign characters). See attached.

Any ideas? And thanks to everyone helping get this far!
Attached Thumbnails
Click image for larger version

Name:	MissingDLLmessage.png
Views:	122
Size:	18.6 KB
ID:	1095   Click image for larger version

Name:	OtherError.png
Views:	91
Size:	17.1 KB
ID:	1096  
Mark is offline   Reply With Quote
Old January 28, 2014, 07:45   #92
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,563
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by Mark View Post
I found libpng12.dll in src\win\dll - not being quite sure what to do I put copies in \src and \src\win. This didn't help. Given the output window referenced other dll's in "C:\windows\SysWOW64" I copied libpng12.dll there too - and this just gave a strange error instead (perhaps the same error but in foreign characters). See attached.

Any ideas? And thanks to everyone helping get this far!
I believe you need to copy libpng12.dll and zlib1.dll to the top directory, the one with angband.exe in it.
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old January 28, 2014, 07:58   #93
Mark
Adept
 
Join Date: Oct 2007
Posts: 112
Mark is on a distinguished road
Hmm....

...actually I already had them in the root folder of the project too, I forgot to mention that.

However, I do have my exe being created in \Debug. I copy the two dll's there - and I get the same forign-character error as when I copy them to SysWOW64, and if I delete them from there, I get the regular english error message.
Mark is offline   Reply With Quote
Old January 28, 2014, 14:03   #94
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Quote:
Originally Posted by Mark View Post
Hmm....

...actually I already had them in the root folder of the project too, I forgot to mention that.

However, I do have my exe being created in \Debug. I copy the two dll's there - and I get the same forign-character error as when I copy them to SysWOW64, and if I delete them from there, I get the regular english error message.
Is angband.exe in the root of the project as well? The foreign language error could be an error that the exe could not find the lib directory (it could be in the other language due to something relating to UTF-8).

In your case, is the project directory "D:\Users\mark\Documents\GitHub\angband\build" ?

if so, is the src directory "D:\Users\mark\Documents\GitHub\angband\build\ src" and the game library directory "D:\Users\mark\Documents\GitHub\angband\build\lib" ?

Well, in any case, the angband.exe and the two DLLs should be in the directory above the lib (game library) directory.

Quote:
Originally Posted by Mark View Post
Then I ran into Linker errors, apparently the path and file names I put in the additional dependancies were incorrect. (I put "\src\win\" but needed "\src\win\lib" and I refered to "zlib1.lib", whereas it needed to be "zlib.lib"). Perhaps the Visual Studio help file can be updated. (If I were more confident in my github usage and that these are indeed corrections not artifacts of something I'm doing wrong, I'd make the change myself).
These are indeed corrections that should be made.
Blue Baron is offline   Reply With Quote
Old January 29, 2014, 09:08   #95
Mark
Adept
 
Join Date: Oct 2007
Posts: 112
Mark is on a distinguished road
All the changes and assumptions I've made trying to get this to work have caused doubts that I had introduced some confounding error, so I started over - just to ensure I hadn't done something strange.

I also documented what I did carefully, against the original instructions, and if I get to the point where I can actually run the game, these could serve as an updated 'how to'. The document is linked as pdf (wonky fonts) and Word file. (Couldn't attach as they are over the small kb limit allowed for attachments)

Word fie:
https://dl.dropboxusercontent.com/u/...%20VS2013.docx

PDF file:
https://dl.dropboxusercontent.com/u/...6%20VS2013.pdf

But to relate the final outcome of trying again to the previous posts,
  • angband.exe is in the root of the project
  • "lib" directory was not in the root of the project (but I since added this)
  • the dll's in question were in the project folder.

I still get the pop-up with the strange language. The warnings that VS logs may or may not be relevant?

Code:
'AngbandBuild.exe' (Win32): Loaded 'D:\Users\mark\Documents\GitHub\AngbandBuild\libpng12.dll'. Module was built without symbols.
'AngbandBuild.exe' (Win32): Loaded 'D:\Users\mark\Documents\GitHub\AngbandBuild\zlib1.dll'. Module was built without symbols.
Of the ~30 dll's that were loaded, only these two had "Module was built without symbols."

If it helps answer questions/provide transparency, my zipped project folder is here:

https://dl.dropboxusercontent.com/u/...gbandBuild.zip
Mark is offline   Reply With Quote
Old January 29, 2014, 20:34   #96
Mark
Adept
 
Join Date: Oct 2007
Posts: 112
Mark is on a distinguished road
Short of specific ideas to resolve this, my next steps will be
  • Try the same steps from fresh on my Laptop - Win Vista & VS2010 - help isolate the cause.
  • Try getting an earlier version of the Angband repo - perhaps the dll's or something else have changed sub-optimally of late?
Mark is offline   Reply With Quote
Old January 31, 2014, 08:04   #97
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Quote:
Originally Posted by Mark View Post
Short of specific ideas to resolve this, my next steps will be
  • Try the same steps from fresh on my Laptop - Win Vista & VS2010 - help isolate the cause.
  • Try getting an earlier version of the Angband repo - perhaps the dll's or something else have changed sub-optimally of late?
At this point I am just guessing, but you can try setting a breakpoint at the beginning of WinMain in main-win.c (perhaps line 5361 or 5408). If the error message comes up before the breakpoint, then the problem is probably with your computer. If the breakpoint is reached before the error message comes up, then you can step through the program to see where the message appears.

Also, those dll warnings should just be that the dlls were not built with debug information. The same dlls have been used for the last couple of years.

And, only the output directory should use the solution directory, the intermediate directory should be left at the configuration directory.

Lastly, from other threads it sounds like you are playing with the pre-built binaries? If so, what happens if you copy the pre-built binary to your project directory or the binary that you compile to the pre-built directory?
Blue Baron is offline   Reply With Quote
Old January 31, 2014, 09:30   #98
Mark
Adept
 
Join Date: Oct 2007
Posts: 112
Mark is on a distinguished road
Thanks again Baron.

So....

the breakpoints were reached. The error occurs upon line 5308

Code:
validate_dir(path);
where "path" has a value of "Ilib\\"

Not sure quite where the strange behaviour starts, my guess is line 5260 when
Code:
GetModuleFileName(hInstance, path, sizeof(path))
sets "path" to be "D". That's the drive letter of my project path, but the entire path should be:


Code:
D:\Users\mark\Documents\GitHub\AngbandBuild

I found an option in VS2013 Porejct Properties -> C/C+ -> All Options "Use Full Paths" - it was set to No, but changing to Yes made no difference. Probably wild goose chasing a red herring!

Also, "Documents" is a Windows 7 'library' or 'collection' - but I doubt that is throwing out GetModuleFileName

If I copy 'my' binary into the pre-built directory, I get the same error.

If I copy the pre-built binary into my project directory, I get the game booting (at least further than with my binary) and a different error: "bad f2-flag: SEASONAL" (see attached image).


A question - should I have in my project directory an angband.ini file, or does that get written by the program (assuming it doesn't crash like mine)?

(Also I set the Intermediate Directory back to "$(Configuration)\", as you say)
Attached Thumbnails
Click image for larger version

Name:	PreBuiltExeInMyProjFolder.jpg
Views:	104
Size:	13.2 KB
ID:	1097  
Attached Images
 
Mark is offline   Reply With Quote
Old January 31, 2014, 16:24   #99
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Quote:
Originally Posted by Mark View Post
Not sure quite where the strange behaviour starts, my guess is line 5260 when
Code:
GetModuleFileName(hInstance, path, sizeof(path))
sets "path" to be "D". That's the drive letter of my project path, but the entire path should be:
ahh the compiler is probably picking the wide character version of GetModuleFileName. Since the string functions use 8-bit characters, you can try to change it to "GetModuleFileNameA" for the 8-bit character version. (The 0 bytes in a wide character string would be the end of an 8-bit character string.) If this works, this sort of error may also appear in other places with system functions.

Quote:
Originally Posted by Mark View Post
I found an option in VS2013 Porejct Properties -> C/C+ -> All Options "Use Full Paths" - it was set to No, but changing to Yes made no difference. Probably wild goose chasing a red herring!
This option is probably how file paths are stored in solution/project files.

Quote:
Originally Posted by Mark View Post
If I copy the pre-built binary into my project directory, I get the game booting (at least further than with my binary) and a different error: "bad f2-flag: SEASONAL" (see attached image).
I'm guessing again, but probably the lib/edit files on github were updated and have a flag that the pre-built doesn't understand.

Quote:
Originally Posted by Mark View Post
A question - should I have in my project directory an angband.ini file, or does that get written by the program (assuming it doesn't crash like mine)?
If angband.ini already exists, it is used, but if it does not exist, defaults will be used and the file will be written.
Blue Baron is offline   Reply With Quote
Old January 31, 2014, 21:57   #100
Mark
Adept
 
Join Date: Oct 2007
Posts: 112
Mark is on a distinguished road
Definite progress is being made.

Changing "GetModuleFileName" to "GetModuleFileNameA" produced the full path name

I was also required to change "GetFileAttributes" to "GetFileAttributesA" in the "check_dir" method. After that the error was no longer thrown by "validate_dir".

As is the way, some new problems/oddities exist:
  • The game boots, but there are no title bar options like "File", "Window", "Options", I was able to start a new character with Ctrl-N. (See attached)
  • The Window title is still in foreign characters. (See attached)
  • Text is weirdly rendered (bad cropping/kerning/something?). (See attached)
  • I could progress through all the character creation flow (with weird rendered text) but got an endless series of exceptions when I tried to start the game proper. (See attached for exception)

Using my binary in the pre-built directory produced an "AngbandBuild.exe has stopped working" Windows error message. (this also happened if I ran my binary in my project folder not launched from visual studio).

Digging into when the exception is triggered, it appears to be premultiplying 64x64.png in the graf folder.

Line 1244 on main.win.c calls "ReadDIB2_PNG" in readpng.c, which throws the exception on line 102

Code:
	png_read_info(png_ptr, info_ptr);
values:
Code:
info_ptr	0x00b57a70 {width=0 height=0 valid=0 ...}	png_info_struct *
png_ptr	0x00b53270 {jmpbuf=0x00b53270 {6942000, 11874928, 6942000, 6941276, 6941080, 1824862439, 6945828, 0, ...} ...}	png_struct_def *
Attached Thumbnails
Click image for larger version

Name:	GameNoDropDownMenus.jpg
Views:	126
Size:	12.7 KB
ID:	1099   Click image for larger version

Name:	GameWeirdTextRendering.jpg
Views:	95
Size:	18.8 KB
ID:	1100   Click image for larger version

Name:	UnhandledException.jpg
Views:	89
Size:	16.5 KB
ID:	1101  
Mark is offline   Reply With Quote
Reply


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
Compiling Angband on MS-DOS Zababa Development 8 May 27, 2011 17:36
Compiling Angband 3.0.9 w/ xcode on OSX Iemortal Vanilla 8 April 16, 2011 16:41
Compiling Z+Angband under Windows Altefcat Variants 8 December 11, 2008 09:44
compiling vanilla angband on msvc++ 9 express hugh Vanilla 6 March 17, 2008 15:49
Trouble compiling angband 3.0.9 on linux RastaRuedi Vanilla 2 August 1, 2007 17:28


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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.