frustrating crash bug

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • will_asher
    DaJAngband Maintainer
    • Apr 2007
    • 1124

    #16
    I might actually take you up on that. Could you really send me a working build environment? I tried downloading and installing Visial C++, but for some reason the one I downloaded wasn't able to install correctly on my computer.
    Will_Asher
    aka LibraryAdventurer

    My old variant DaJAngband:
    http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

    Comment

    • PaulBlay
      Knight
      • Jan 2009
      • 657

      #17
      Originally posted by will_asher
      I might actually take you up on that. Could you really send me a working build environment? I tried downloading and installing Visial C++, but for some reason the one I downloaded wasn't able to install correctly on my computer.
      Was this the one you tried to install? How did the install go wrong, any error messages?

      I think Pete was talking about the instructions for using the VC++ IDE I gave, so if you can't get VC++ to work they aren't much use. You'll also have to fix a lot of compile errors even if you do get it to work.
      Currently turning (Angband) Japanese.

      Comment

      • Magnate
        Angband Devteam member
        • May 2007
        • 5110

        #18
        Originally posted by will_asher
        When I try putting a bunch of plogs, it seems to crash in a different place each time.
        I tried downloading gdb, but I can't figure out how to use it. There's no executible and the readme file says to type 'configure' then 'make' neither of which do anything. (Is there maybe a debugger that's easier to use?)
        If you're on Linux, try installing ddd - it's a handy front-end for gdb which makes debugging a lot easier. (I can't be more specific until I know your distro.)
        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

        Comment

        • will_asher
          DaJAngband Maintainer
          • Apr 2007
          • 1124

          #19
          Originally posted by PaulBlay
          Was this the one you tried to install? How did the install go wrong, any error messages?
          I got it from a different website, but it looked like the same thing. It started downloading and seemed like it was going extremely slow. Then it stopped and gave me an error message saying something like "This ____ component was not able to install."
          I'll try downloading it from the site you linked to and try again.

          (BTW, I'm on Windows XP and I have no idea what mingw or msys are.)

          Update: I finally got Visual C++ up and running (Thanks Paul), now to find the bug..
          Last edited by will_asher; May 22, 2009, 23:28.
          Will_Asher
          aka LibraryAdventurer

          My old variant DaJAngband:
          http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

          Comment

          • will_asher
            DaJAngband Maintainer
            • Apr 2007
            • 1124

            #20
            I tell it to 'build solution' and it gives me an error saying:

            Command line error D8045 : cannot compile C file '..\..\win\readdib.c' with the /clr option

            I couldn't find anything about this in the visual C++ help.
            Will_Asher
            aka LibraryAdventurer

            My old variant DaJAngband:
            http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

            Comment

            • PaulBlay
              Knight
              • Jan 2009
              • 657

              #21
              Originally posted by will_asher
              Command line error D8045 : cannot compile C file '..\..\win\readdib.c' with the /clr option

              I couldn't find anything about this in the visual C++ help.
              Right. Well the first thing is to check what is present in your 'command line'. As it's talking about compiling then it should be the one in ....

              Project -> Properties -> C/C++ -> Command line.

              Mine looks like
              Code:
              /Od /I "C:\RL\Angband311\src" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W4 /nologo /c /ZI /TC /errorReport:prompt
              with
              Code:
              /DWINDOWS
              in the separate text box below. As you can see there is no /clr in there. If you do have /clr in your command line then you should probably see where it was set in the properties.
              Currently turning (Angband) Japanese.

              Comment

              • PaulBlay
                Knight
                • Jan 2009
                • 657

                #22
                Originally posted by will_asher
                I tell it to 'build solution' and it gives me an error saying:

                Command line error D8045 : cannot compile C file '..\..\win\readdib.c' with the /clr option
                Found it. In

                Project -> Properties -> Configuration properties -> General

                Common Language Runtime support should be set to "No Common Language Runtime support"

                I don't know why yours was set, unless you started from a "CLR empty project" instead of a "General empty project".
                Currently turning (Angband) Japanese.

                Comment

                • will_asher
                  DaJAngband Maintainer
                  • Apr 2007
                  • 1124

                  #23
                  I found where it has '/clr' in the command line, but I can't find how to get rid of it.
                  EDIT: nevermind you just told me as I was writing this message. thanks

                  EDIT: do I really have to fix all these 1223 so-called errors where there's really nothing wrong with the code in order to debug it?
                  (EDIT: 1202 errors)
                  (EDIT: 1155 errors ..maybe this isn't so bad)
                  (EDIT: ..then again maybe it is. I fixed several things it pointed out and it still says 1155.)
                  (EDIT: 1063 errors)
                  (EDIT: 1012 errors)
                  (EDIT: 867 errors)
                  (EDIT: 623 errors)
                  (EDIT: 458 errors)
                  (EDIT: 201 errors)
                  Last edited by will_asher; May 23, 2009, 02:08.
                  Will_Asher
                  aka LibraryAdventurer

                  My old variant DaJAngband:
                  http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

                  Comment

                  • PaulBlay
                    Knight
                    • Jan 2009
                    • 657

                    #24
                    Originally posted by will_asher
                    EDIT: do I really have to fix all these 1223 so-called errors where there's really nothing wrong with the code in order to debug it?
                    I only had 605 when I compiled it (the latest version released).

                    And yes, if you want to debug in in VC++ you have to follow the standards VC++ compiles to. Which means either getting rid of the 605 (or whatever) errors when compiling as C, or getting rid of the 190 errors when compiling as C++.

                    Most of the former are probably things like

                    Code:
                    void foo(void)
                    {
                      int a;
                      a = 1 + 3;
                      [i]int b = 2;[/i]
                    }
                    The line in italic is in error according to C89, because you are declaring a variable some place other than the start of a block.

                    There are probably fewer errors from a C++ perspective, but (from experience) they are quite likely to be more fiddly to fix.
                    Currently turning (Angband) Japanese.

                    Comment

                    • will_asher
                      DaJAngband Maintainer
                      • Apr 2007
                      • 1124

                      #25
                      Well I got rid of all those 1223 errors and they were all because of variables not being declared at the beginning of the block.

                      Then it said there was another 70 errors of another kind. Now it says:
                      unresolved external symbol _____ referenced in function ______

                      I think all 70 of these additional errors are this type. I looked on the internet for a soluton to this error and I found something which said to disable the "treat wchar_t as built-in type" option in C/C++ -> Language. So I did that and it didn't help, it's still giving me the same errors.

                      Originally posted by PaulBlay
                      I only had 605 when I compiled it (the latest version released).
                      I've done a lot since 1.0.97. For instance, I created (and fixed) another 618 compile errors.
                      Will_Asher
                      aka LibraryAdventurer

                      My old variant DaJAngband:
                      http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

                      Comment

                      • Pete Mack
                        Prophet
                        • Apr 2007
                        • 6883

                        #26
                        You are done with compiling. Welcome to DLL hell. Without a list of some of the external symbols, it's impossible to guess what's happening.

                        Comment

                        • PaulBlay
                          Knight
                          • Jan 2009
                          • 657

                          #27
                          Originally posted by will_asher
                          Then it said there was another 70 errors of another kind. Now it says:
                          unresolved external symbol _____ referenced in function ______
                          I think those are basic Linker errors. It could just mean that there is a *.h, *.c or library file (like winmm.lib)that you need to include in the project but missed. It would probably help to know what the _____'s are.

                          Here's one quick check you can do ...

                          Use a search utility (like win-search) to look for your missing symbol ______ in all files in the source code directory (and sub-directories). If there's a file defining them make sure you have included it in the project. (Don't use the default Windows search utility - it sucks).

                          I found something which said to disable the "treat wchar_t as built-in type" option in C/C++ -> Language. So I did that and it didn't help, it's still giving me the same errors.
                          I think that would only apply if you are messing around with Unicode or non-English charsets.

                          Anywho ... now that you're down to just 70 errors maybe you could just put the source code archive up somewhere so other people can have a shifty at it?

                          P.S. "I've done a lot since 1.0.97. For instance, I created (and fixed) another 618 compile errors." That would make a nice signature quote.
                          Currently turning (Angband) Japanese.

                          Comment

                          • will_asher
                            DaJAngband Maintainer
                            • Apr 2007
                            • 1124

                            #28
                            I kindof hoped what I put would be enough, but here's the whole ugly shebang from the error list.

                            Code:
                            Error	6	error LNK2019: unresolved external symbol _snprintf referenced in function _likert	files.obj	DaJAngband1098Debugb
                            Error	7	error LNK2019: unresolved external symbol __imp__DispatchMessageW@4 referenced in function _WinMain@16	main-win.obj	DaJAngband1098Debugb
                            Error	8	error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16	main-win.obj	DaJAngband1098Debugb
                            Error	9	error LNK2019: unresolved external symbol __imp__GetMessageW@16 referenced in function _WinMain@16	main-win.obj	DaJAngband1098Debugb
                            Error	10	error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function _WinMain@16	main-win.obj	DaJAngband1098Debugb
                            Error	11	error LNK2001: unresolved external symbol __imp__ReleaseDC@8	readdib.obj	DaJAngband1098Debugb
                            Error	12	error LNK2019: unresolved external symbol __imp__GetDeviceCaps@8 referenced in function _WinMain@16	main-win.obj	DaJAngband1098Debugb
                            Error	13	error LNK2019: unresolved external symbol __imp__GetDC@4 referenced in function _WinMain@16	main-win.obj	DaJAngband1098Debugb
                            Error	14	error LNK2001: unresolved external symbol __imp__GetDC@4	readdib.obj	DaJAngband1098Debugb
                            Error	15	error LNK2019: unresolved external symbol __imp__RegisterClassW@4 referenced in function _WinMain@16	main-win.obj	DaJAngband1098Debugb
                            Error	16	error LNK2019: unresolved external symbol __imp__GetStockObject@4 referenced in function _WinMain@16	main-win.obj	DaJAngband1098Debugb
                            Error	17	error LNK2001: unresolved external symbol __imp__GetStockObject@4	readdib.obj	DaJAngband1098Debugb
                            Error	18	error LNK2019: unresolved external symbol __imp__LoadCursorW@8 referenced in function _WinMain@16	main-win.obj	DaJAngband1098Debugb
                            Error	19	error LNK2019: unresolved external symbol __imp__LoadIconW@8 referenced in function _WinMain@16	main-win.obj	DaJAngband1098Debugb
                            Error	20	error LNK2019: unresolved external symbol __imp__CreateSolidBrush@4 referenced in function _init_windows	main-win.obj	DaJAngband1098Debugb
                            Error	21	error LNK2019: unresolved external symbol __imp__SetWindowPos@28 referenced in function _init_windows	main-win.obj	DaJAngband1098Debugb
                            Error	22	error LNK2019: unresolved external symbol __imp__SetActiveWindow@4 referenced in function _init_windows	main-win.obj	DaJAngband1098Debugb
                            Error	23	error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _init_windows	main-win.obj	DaJAngband1098Debugb
                            Error	24	error LNK2019: unresolved external symbol __imp__CreateWindowExW@48 referenced in function _init_windows	main-win.obj	DaJAngband1098Debugb
                            Error	25	error LNK2019: unresolved external symbol __imp__GetWindowRect@8 referenced in function _term_getsize	main-win.obj	DaJAngband1098Debugb
                            Error	26	error LNK2019: unresolved external symbol __imp__AdjustWindowRectEx@16 referenced in function _term_getsize	main-win.obj	DaJAngband1098Debugb
                            Error	27	error LNK2019: unresolved external symbol __imp__DeleteObject@4 referenced in function _new_palette	main-win.obj	DaJAngband1098Debugb
                            Error	28	error LNK2001: unresolved external symbol __imp__DeleteObject@4	readdib.obj	DaJAngband1098Debugb
                            Error	29	error LNK2019: unresolved external symbol __imp__RealizePalette@4 referenced in function _new_palette	main-win.obj	DaJAngband1098Debugb
                            Error	30	error LNK2001: unresolved external symbol __imp__RealizePalette@4	readdib.obj	DaJAngband1098Debugb
                            Error	31	error LNK2019: unresolved external symbol __imp__SelectPalette@12 referenced in function _new_palette	main-win.obj	DaJAngband1098Debugb
                            Error	32	error LNK2001: unresolved external symbol __imp__SelectPalette@12	readdib.obj	DaJAngband1098Debugb
                            Error	33	error LNK2019: unresolved external symbol __imp__CreatePalette@4 referenced in function _new_palette	main-win.obj	DaJAngband1098Debugb
                            Error	34	error LNK2001: unresolved external symbol __imp__CreatePalette@4	readdib.obj	DaJAngband1098Debugb
                            Error	35	error LNK2019: unresolved external symbol __imp__GetPaletteEntries@16 referenced in function _new_palette	main-win.obj	DaJAngband1098Debugb
                            Error	36	error LNK2019: unresolved external symbol __imp__InvalidateRect@12 referenced in function _term_window_resize	main-win.obj	DaJAngband1098Debugb
                            Error	37	error LNK2019: unresolved external symbol __imp__GetTextMetricsW@8 referenced in function _term_force_font	main-win.obj	DaJAngband1098Debugb
                            Error	38	error LNK2019: unresolved external symbol __imp__SelectObject@8 referenced in function _term_force_font	main-win.obj	DaJAngband1098Debugb
                            Error	39	error LNK2019: unresolved external symbol __imp__CreateFontW@56 referenced in function _term_force_font	main-win.obj	DaJAngband1098Debugb
                            Error	40	error LNK2019: unresolved external symbol __imp__SendMessageW@16 referenced in function _term_force_font	main-win.obj	DaJAngband1098Debugb
                            Error	41	error LNK2019: unresolved external symbol __imp__AddFontResourceW@4 referenced in function _term_force_font	main-win.obj	DaJAngband1098Debugb
                            Error	42	error LNK2019: unresolved external symbol __imp__RemoveFontResourceW@4 referenced in function _term_remove_font	main-win.obj	DaJAngband1098Debugb
                            Error	43	error LNK2019: unresolved external symbol __imp__PeekMessageW@20 referenced in function _Term_xtra_win_flush	main-win.obj	DaJAngband1098Debugb
                            Error	44	error LNK2019: unresolved external symbol __imp__ExtTextOutW@32 referenced in function _Term_xtra_win_clear	main-win.obj	DaJAngband1098Debugb
                            Error	45	error LNK2019: unresolved external symbol __imp__SetBkColor@8 referenced in function _Term_xtra_win_clear	main-win.obj	DaJAngband1098Debugb
                            Error	46	error LNK2019: unresolved external symbol __imp__MessageBeep@4 referenced in function _Term_xtra_win_noise	main-win.obj	DaJAngband1098Debugb
                            Error	47	error LNK2019: unresolved external symbol __imp__FrameRect@12 referenced in function _Term_curs_win	main-win.obj	DaJAngband1098Debugb
                            Error	48	error LNK2019: unresolved external symbol __imp__SetTextColor@8 referenced in function _Term_text_win	main-win.obj	DaJAngband1098Debugb
                            Error	49	error LNK2019: unresolved external symbol __imp__DeleteDC@4 referenced in function _Term_pict_win	main-win.obj	DaJAngband1098Debugb
                            Error	50	error LNK2019: unresolved external symbol __imp__StretchBlt@44 referenced in function _Term_pict_win	main-win.obj	DaJAngband1098Debugb
                            Error	51	error LNK2019: unresolved external symbol __imp__SetStretchBltMode@8 referenced in function _Term_pict_win	main-win.obj	DaJAngband1098Debugb
                            Error	52	error LNK2019: unresolved external symbol __imp__BitBlt@36 referenced in function _Term_pict_win	main-win.obj	DaJAngband1098Debugb
                            Error	53	error LNK2019: unresolved external symbol __imp__CreateCompatibleDC@4 referenced in function _Term_pict_win	main-win.obj	DaJAngband1098Debugb
                            Error	54	error LNK2019: unresolved external symbol _play_game referenced in function _check_for_save_file	main-win.obj	DaJAngband1098Debugb
                            Error	55	error LNK2019: unresolved external symbol __imp__DefWindowProcW@16 referenced in function _AngbandWndProc@16	main-win.obj	DaJAngband1098Debugb
                            Error	56	error LNK2019: unresolved external symbol __imp__SetFocus@4 referenced in function _AngbandWndProc@16	main-win.obj	DaJAngband1098Debugb
                            Error	57	error LNK2019: unresolved external symbol __imp__GetKeyState@4 referenced in function _AngbandWndProc@16	main-win.obj	DaJAngband1098Debugb
                            Error	58	error LNK2019: unresolved external symbol __imp__SetWindowLongW@12 referenced in function _AngbandWndProc@16	main-win.obj	DaJAngband1098Debugb
                            Error	59	error LNK2019: unresolved external symbol __imp__GetWindowLongW@8 referenced in function _AngbandWndProc@16	main-win.obj	DaJAngband1098Debugb
                            Error	60	error LNK2019: unresolved external symbol __imp__CheckMenuItem@12 referenced in function _setup_menus	main-win.obj	DaJAngband1098Debugb
                            Error	61	error LNK2019: unresolved external symbol __imp__EnableMenuItem@12 referenced in function _setup_menus	main-win.obj	DaJAngband1098Debugb
                            Error	62	error LNK2019: unresolved external symbol __imp__GetMenu@4 referenced in function _setup_menus	main-win.obj	DaJAngband1098Debugb
                            Error	63	error LNK2019: unresolved external symbol __imp__GetOpenFileNameW@4 referenced in function _process_menus	main-win.obj	DaJAngband1098Debugb
                            Error	64	error LNK2019: unresolved external symbol __imp__ShellExecuteW@24 referenced in function _display_help	main-win.obj	DaJAngband1098Debugb
                            Error	65	error LNK2019: unresolved external symbol __imp__EndPaint@8 referenced in function _handle_wm_paint	main-win.obj	DaJAngband1098Debugb
                            Error	66	error LNK2019: unresolved external symbol __imp__BeginPaint@8 referenced in function _handle_wm_paint	main-win.obj	DaJAngband1098Debugb
                            Error	67	error LNK2019: unresolved external symbol __imp__MessageBoxW@16 referenced in function _hack_plog	main-win.obj	DaJAngband1098Debugb
                            Error	68	error LNK2019: unresolved external symbol __imp__DestroyIcon@4 referenced in function _hack_quit	main-win.obj	DaJAngband1098Debugb
                            Error	69	error LNK2019: unresolved external symbol __imp__UnregisterClassW@8 referenced in function _hack_quit	main-win.obj	DaJAngband1098Debugb
                            Error	70	error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function _hook_quit	main-win.obj	DaJAngband1098Debugb
                            Error	71	error LNK2019: unresolved external symbol __imp__GetWindowPlacement@8 referenced in function _save_prefs_aux	main-win.obj	DaJAngband1098Debugb
                            Error	72	error LNK2019: unresolved external symbol __imp__wsprintfW referenced in function _save_prefs_aux	main-win.obj	DaJAngband1098Debugb
                            Error	73	error LNK2019: unresolved external symbol _value_check_aux1 referenced in function _squelch_item_ok	squelch.obj	DaJAngband1098Debugb
                            Error	74	error LNK2019: unresolved external symbol __imp__CreateDIBitmap@24 referenced in function _MakeBitmapAndPalette@16	readdib.obj	DaJAngband1098Debugb
                            Error	75	fatal error LNK1120: 62 unresolved externals	C:\Documents and Settings\All Users\Documents\Shared Games\DAJband\1098Debug copy\src\DaJAngband1098Debugb\Debug\DaJAngband1098Debugb.exe	1	DaJAngband1098Debugb
                            It's kindof odd that it numbers the 70 errors with #6-75
                            Will_Asher
                            aka LibraryAdventurer

                            My old variant DaJAngband:
                            http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

                            Comment

                            • PaulBlay
                              Knight
                              • Jan 2009
                              • 657

                              #29
                              Originally posted by will_asher
                              I kindof hoped what I put would be enough, but here's the whole ugly shebang from the error list.
                              Yeah, apart from the "snprintf" one I got none of those from your source code. I think that either
                              a) you forgot winmm.lib or
                              b) these are left-over problems from creating a clr empty project instead of a general empty project.

                              In any case I'm pretty sure they are down to stuff set in the "Project->Properties" (or maybe from missing a file) not any of your code.

                              I would suggest deleting the VC++ project folder (it will be a subfolder in \src) and creating it again from scratch, bearing in mind the suggestions above.

                              Incidentally, you only need "main-win.c" to compile it in Windows, not the other main*.c files.
                              Currently turning (Angband) Japanese.

                              Comment

                              • PaulBlay
                                Knight
                                • Jan 2009
                                • 657

                                #30
                                Back to the original problem - I've done tons of wandering around town killing t's (and one P) and had no crashes at all. So it might be a compiler issue (I had one with Dev-C++) or you might have fixed it without realizing it.

                                Either that or there is just some specific action that triggers it and I didn't do it.
                                Currently turning (Angband) Japanese.

                                Comment

                                Working...
                                😀
                                😂
                                🥰
                                😘
                                🤢
                                😎
                                😞
                                😡
                                👍
                                👎