http://members.home.nl/ejm.martens/ViperFighter_test.zip
My game works perfectly on my computer .. and also on some other comps
but on some computers is just stops when using my GUI .. if I ripp out the GUI is workt on those computers too..
I added a logfile that logs everything important the program seems to "crash" when deleting a GUI object.. but it does so even with the simpelest objects...
and if you swap the deletion order it crashes in the destructor of the others
how is this possible ??
I cannot really debug this because it works on my computer whatever I do
I tried resolving all warnings but OpenLayer comes with a big load of warnings...
If someone could help me in finding the solution to this I would be very gratefull..
Hi Edwin,
sorry to tell you the game still crashes for me at exactly the same point (pressing the start button), but here are the contents of your log files.
BSG.TXT
Starting GUI
Creating Choose player dialog
Listbox created
Loading Player Info
Adding Edwin to listbox
Adding Edwin successfull
Loading Player Info
Adding stghse to listbox
Adding stghse successfull
Loading Player Info
Adding test to listbox
Adding test successfull
Loading Player Info
Adding kees to listbox
Adding kees successfull
Loading Player Info
Adding cxbfgnhmnghm to listbox
Adding cxbfgnhmnghm successfull
Choose Player dialog created
[Adding GUI Object]
Start button clicked
Invoking callback function for ChoosePlayerDialog
Get record with name Edwin
Edwin found in player database
creating mission
Mission created
[Request removal of all GUI Objects]
Doing mission briefing
[Removing GUI Object]
Destroying Choose Player dialog ...
Saving Player Info
Saving Player Info
Saving Player Info
Saving Player Info
Saving Player Info
Destroying ListBox dialog ...
Listbox destroyed
ERROR.TXT
#0 0x6965ae9c nvoglnt!DllMain (??:??)
#1 0x03390fb4 ?? (??:??)
#2 0x0334a518 ?? (??:??)
#3 0x0022fc98 ?? (??:??)
#4 0x00001401 ?? (??:??)
#5 0x00447890 gk_render_line_gl_utf8 (C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/iostream:77)
Hope these help,
It is crashing for me as well in XP SP2. What third party libraries does it use?
bsg.log:
1 | Starting GUI |
2 | Creating Choose player dialog |
3 | Listbox created |
4 | Loading Player Info |
5 | Adding Edwin to listbox |
6 | Adding Edwin successfull |
7 | Loading Player Info |
8 | Adding stghse to listbox |
9 | Adding stghse successfull |
10 | Loading Player Info |
11 | Adding test to listbox |
12 | Adding test successfull |
13 | Loading Player Info |
14 | Adding kees to listbox |
15 | Adding kees successfull |
16 | Loading Player Info |
17 | Adding cxbfgnhmnghm to listbox |
18 | Adding cxbfgnhmnghm successfull |
19 | Choose Player dialog created |
20 | [Adding GUI Object] |
21 | Start button clicked |
22 | Invoking callback function for ChoosePlayerDialog |
23 | Get record with name Edwin |
24 | Edwin found in player database |
25 | creating mission |
26 | Mission created |
27 | [Request removal of all GUI Objects] |
28 | Doing mission briefing |
29 | [Removing GUI Object] |
30 | Destroying Choose Player dialog ... |
31 | Saving Player Info |
32 | Saving Player Info |
33 | Saving Player Info |
34 | Saving Player Info |
35 | Saving Player Info |
36 | Destroying ListBox dialog ... |
37 | Listbox destroyed |
error.txt:
#0 0x6965ae9c nvoglnt!DllMain (??:??) #1 0x03390fb4 ?? (??:??) #2 0x0334a518 ?? (??:??) #3 0x0022fc98 ?? (??:??) #4 0x00001401 ?? (??:??) #5 0x00447890 gk_render_line_gl_utf8 (C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/iostream:77)
openlayer.log:
1 | OpenLayer started up succesfully |
2 | |
3 | Auto Loader: Executing 0 pending loading commands |
4 | Auto Loader: Completed |
5 | |
6 | Screen set up succesfully |
7 | |
8 | Loading a true type font: c:\Documents and Settings<Username>\My Documents\software\ViperFighter\Fonts\smalltext.ttf |
9 | Loading a true type font: c:\Documents and Settings<Username>\My Documents\software\ViperFighter\Fonts\BATTLEST.ttf |
10 | Loading a true type font: c:\Documents and Settings<Username>\My Documents\software\ViperFighter\Fonts\TI.ttf |
11 | Loading bitmap: Gfx\Still\Cursor1.png |
12 | Loading bitmap: Gfx\Still\Compass.png |
13 | Loading bitmap: Gfx\Still\CompassTop.png |
14 | Loading bitmap: Gfx\TargetInfo\TI001.png |
15 | Loading bitmap: Gfx\TargetInfo\TI002.png |
16 | Loading bitmap: Gfx\TargetInfo\TI003.png |
17 | Loading bitmap: Gfx\TargetInfo\TI004.png |
18 | Loading bitmap: Gfx\TargetInfo\TI005.png |
19 | Loading bitmap: Gfx\TargetInfo\TI006.png |
20 | Loading bitmap: Gfx\TargetInfo\TI007.png |
21 | ERROR: No such bitmap! |
22 | Loading bitmap: Gfx\Menu\Intro.png |
23 | Loading bitmap: Gfx\Menu\Deck.png |
24 | Loading bitmap: Gfx\Still\Galactica_blib.png |
25 | Loading bitmap: Gfx\Still\Raider_blib.png |
26 | Loading bitmap: Gfx\Still\Viper_blib.png |
27 | Loading bitmap: Gfx\Still\Spartan_blib.png |
28 | Loading bitmap: Gfx\Still\Shuttle_blib.png |
29 | Loading bitmap: Gfx\Still\Galactica.png |
30 | Loading bitmap: Gfx\Still\leftbay.png |
31 | Loading bitmap: Gfx\Still\rightbay.png |
32 | Loading bitmap: Gfx\Still\Turret.png |
33 | Loading bitmap: Gfx\Still\Raider.png |
34 | Loading bitmap: Gfx\Still\Raidershd.png |
35 | Loading bitmap: Gfx\Still\Viper.png |
36 | Loading bitmap: Gfx\Still\Vipershd.png |
37 | Loading bitmap: Gfx\Still\laser1.png |
38 | Loading bitmap: Gfx\Still\laser2.png |
39 | Loading bitmap: Gfx\Still\spartan.png |
40 | Loading bitmap: Gfx\Still\spartanshd.png |
41 | Loading bitmap: Gfx\Animated\smoke\S01.png |
42 | Loading bitmap: Gfx\Animated\smoke\S02.png |
43 | Loading bitmap: Gfx\Animated\smoke\S03.png |
44 | Loading bitmap: Gfx\Animated\smoke\S04.png |
45 | Loading bitmap: Gfx\Animated\smoke\S05.png |
46 | Loading bitmap: Gfx\Animated\smoke\S06.png |
47 | Loading bitmap: Gfx\Animated\smoke\S07.png |
48 | Loading bitmap: Gfx\Animated\smoke\S08.png |
49 | Loading bitmap: Gfx\Animated\smoke\S09.png |
50 | Loading bitmap: Gfx\Animated\smoke\S10.png |
51 | Loading bitmap: Gfx\Animated\smoke\S11.png |
52 | Loading bitmap: Gfx\Animated\smoke\S12.png |
53 | Loading bitmap: Gfx\Animated\smoke\S13.png |
54 | ERROR: No such bitmap! |
55 | Loading bitmap: Gfx\Animated\Explosion\Expl01.png |
56 | Loading bitmap: Gfx\Animated\Explosion\Expl02.png |
57 | Loading bitmap: Gfx\Animated\Explosion\Expl03.png |
58 | Loading bitmap: Gfx\Animated\Explosion\Expl04.png |
59 | Loading bitmap: Gfx\Animated\Explosion\Expl05.png |
60 | Loading bitmap: Gfx\Animated\Explosion\Expl06.png |
61 | Loading bitmap: Gfx\Animated\Explosion\Expl07.png |
62 | Loading bitmap: Gfx\Animated\Explosion\Expl08.png |
63 | Loading bitmap: Gfx\Animated\Explosion\Expl09.png |
64 | Loading bitmap: Gfx\Animated\Explosion\Expl10.png |
65 | Loading bitmap: Gfx\Animated\Explosion\Expl11.png |
66 | Loading bitmap: Gfx\Animated\Explosion\Expl12.png |
67 | Loading bitmap: Gfx\Animated\Explosion\Expl13.png |
68 | Loading bitmap: Gfx\Animated\Explosion\Expl14.png |
69 | Loading bitmap: Gfx\Animated\Explosion\Expl15.png |
70 | Loading bitmap: Gfx\Animated\Explosion\Expl16.png |
71 | Loading bitmap: Gfx\Animated\Explosion\Expl17.png |
72 | ERROR: No such bitmap! |
73 | Loading bitmap: Gfx\Still\Shuttle.png |
74 | Loading bitmap: Gfx\Still\Shuttleshd.png |
75 | Loading bitmap: Gfx\Still\Tanker.png |
I don't know if it helps, but edwin.tst is empty (0 bytes) and I just happened to select the Edwin option.
I cannot really debug this because it works on my computer whatever I do
You could ask for permission to debug on the computers where it does crash.
hey i think its your list box that crashing it. add and new crash as well.
edit:
witch file contains your listbox code.
I'm installing OpenLayer and FMOD so I can build the project myself... I don't know if I'll be any help, but I'll try...
Add a config file, my monitor can't(EDIT) view 800x600 for some reason, would be nice if one could switch from full screen to windowed with a config file.
I'm installing OpenLayer and FMOD so I can build the project myself... I don't know if I'll be any help, but I'll try...
1 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0xe4)||undefined reference to `FT_Get_Postscript_Name'| |
2 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x254)||undefined reference to `FT_Get_First_Char'| |
3 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x290)||undefined reference to `FT_Get_Next_Char'| |
4 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x2ea)||undefined reference to `FT_Get_First_Char'| |
5 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x321)||undefined reference to `FT_Get_Next_Char'| |
6 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x36c)||undefined reference to `FT_Get_First_Char'| |
7 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x3a5)||undefined reference to `FT_Get_Next_Char'| |
8 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x403)||undefined reference to `FT_Get_Char_Index'| |
9 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x4c5)||undefined reference to `FT_Get_Char_Index'| |
10 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6e2)||undefined reference to `FT_Get_Char_Index'| |
11 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x898)||undefined reference to `FT_Get_Char_Index'| |
12 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1a2c)||undefined reference to `FT_Activate_Size'| |
13 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1a53)||undefined reference to `FT_Set_Char_Size'| |
14 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1b94)||undefined reference to `FT_Done_Size'| |
15 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1bbd)||undefined reference to `FT_New_Size'| |
16 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1c74)||undefined reference to `FT_Done_Size'| |
17 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1d8f)||undefined reference to `FT_Done_Face'| |
18 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1f37)||undefined reference to `FT_Matrix_Multiply'| |
19 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x20f8)||undefined reference to `FT_Matrix_Multiply'| |
20 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x21a6)||undefined reference to `FT_Get_Char_Index'| |
21 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x23c1)||undefined reference to `FT_Load_Glyph'| |
22 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x242f)||undefined reference to `FT_Set_Char_Size'| |
23 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x2463)||undefined reference to `FT_Render_Glyph'| |
24 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x2b73)||undefined reference to `FT_Get_Char_Index'| |
25 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x2bfd)||undefined reference to `FT_Get_Char_Index'| |
26 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x61b9)||undefined reference to `FT_Init_FreeType'| |
27 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x61fa)||undefined reference to `FT_Library_Version'| |
28 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6319)||undefined reference to `FT_New_Memory_Face'| |
29 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6348)||undefined reference to `FT_Select_Charmap'| |
30 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x63be)||undefined reference to `FT_Init_FreeType'| |
31 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6425)||undefined reference to `FT_Library_Version'| |
32 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6481)||undefined reference to `FT_Done_Face'| |
33 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x65a6)||undefined reference to `FT_Init_FreeType'| |
34 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6689)||undefined reference to `FT_New_Face'| |
35 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x66b8)||undefined reference to `FT_Select_Charmap'| |
36 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x68b7)||undefined reference to `FT_Library_Version'| |
37 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x69a5)||undefined reference to `FT_Done_Face'| |
38 | C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6bec)||undefined reference to `FT_Done_FreeType'| |
39 | C:\MinGW\lib\libloadpng.a(regpng.o):regpng.c:(.text+0x20)||undefined reference to `register_bitmap_file_type'| |
40 | C:\MinGW\lib\libloadpng.a(regpng.o):regpng.c:(.text+0x5a)||undefined reference to `pack_fread'| |
41 | C:\MinGW\lib\libloadpng.a(regpng.o):regpng.c:(.text+0xdf)||undefined reference to `register_datafile_object'| |
42 | C:\MinGW\lib\libloadpng.a(regpng.o):regpng.c:(.text+0x110)||undefined reference to `register_datafile_object'| |
43 | C:\MinGW\lib\libloadpng.a(regpng.o):regpng.c:(.text+0x12e)||undefined reference to `register_bitmap_file_type'| |
44 | C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0x1c)||undefined reference to `png_get_io_ptr'| |
45 | C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0x2c)||undefined reference to `pack_fread'| |
46 | C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0x8a)||undefined reference to `png_read_info'| |
47 | C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0xd6)||undefined reference to `png_get_IHDR'| |
48 | C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0xe4)||undefined reference to `png_set_packing'| |
49 | C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0x11c)||undefined reference to `png_get_valid'| |
50 | C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0x18f)||undefined reference to `png_get_sRGB'| |
51 | ||More errors follow but not being shown.| |
52 | ||Edit the max errors limit in compiler options...| |
53 | ||=== Build finished: 50 errors, 0 warnings ===| |
CodeBlocks project link libraries:
openlayer freetype png z agl alleg user32 gdi32 glu32 glyph loadpng opengl32 fmod
I think you should add OpenLayer to the additional compiler dirs
Openlayer\include to the compiler
Openlayer\lib to the linker
I only use OpenLayer and Fmod
and CodeBlocks with MinGW
@ piccolo: see bsgGUI.h and bsgGUI.cpp
I think you should add OpenLayer to the additional compiler dirs...
I copied the OpenLayer libs to the C:\MinGW\lib directory. I tried adding C:\MinGW\include\OpenLayer to the compiler directories and it didn't change anything...
http://www.allegro.cc/forums/thread/595417/733887#target
The checklist is:
MinGW 5.3.1
Allegro 4.2.1
Openlayer 2.1, mingw-glyphkeeper edition
FMOD 3.75
Linker options: -lopenlayer -lglyph-agl -lfreetype -lpng -lz -lagl -lalleg -luser32 -lgdi32 -lglu32 -lopengl32 -lalleg -lfmod
Hope it helps.
@bamccaig never copy or even worse overwrite the tings that come with your compiler !!!
Use the additional dirs !!;)
@bamccaig never copy or even worse overwrite the tings that come with your compiler !!!
I wouldn't overwrite anything... Unless the installation instructions say otherwise I usually copy the contents of the include and lib directories into the corresponding compiler include and lib directories. I suppose it is a better idea to group them into a subdirectory though...
I suppose it is a better idea to group them into a subdirectory though...
PErsonally, I think its better to properly install 3rd party libraries into the compilers path structure. That way if you ever upgrade the compiler and other libs by blowing the mingw folder away and replacing it, you KNOW you need to reinstall the 3rd party libs, instead of just hoping you dont have to.
PErsonally, I think its better to properly install 3rd party libraries into the compilers path structure. That way if you ever upgrade the compiler and other libs by blowing the mingw folder away and replacing it, you KNOW you need to reinstall the 3rd party libs, instead of just hoping you dont have to.
Yeah, that's why I would group them into a subdirectory of the compiler directories...
<tt><mingw_dir>\include<library_name[_version]></tt>
<tt><mingw_dir>\lib<library_name[_version]></tt>
Or did you mean something else?
Or did you mean something else?
Sorta. Just install it as the lib tells you to. includes and any subdirs into <compiler>/include and libs into <compiler>/lib. Anything else just makes for confusion later with trying to figure out why "#include <foo.h>" doesn't work cause you forgot you placed stuff into "#include <foo_version/foo.h>".
Sorta. Just install it as the lib tells you to. includes and any subdirs into <compiler>/include and libs into <compiler>/lib. Anything else just makes for confusion later with trying to figure out why "#include <foo.h>" doesn't work cause you forgot you placed stuff into "#include <foo_version/foo.h>".
Which is what I normally do, but I do see the advantage of being able to quickly uninstall a library that you no longer use... It would make the job a lot easier if the library had it's own subdirectories... And it should be easy enough to add those subdirectories to the compiler include directories when compiling...
I hope someone catches this horrible bug ...
It's ruining my game, and the fun of making it ..
I need this code to work, after this project an RTS is in the planning, using almost the same engine ...
Bonked out when I selected the 'test' pilot and pressed start. I'm on Vista. Wouldn't let me switch out to other applications with Alt-Tab or Win-Tab either. Had to open task manager to get to the window that said it stopped working and closed it with that.
I'm not currently up for installing fmod and openlayer but if you upload a win32 debugging binary with the appropriate debugging dll's I should be able to run it through gdb and maybe track down the problem through the source code. You'd have to make it run in windowed mode (less than 1024 X 768) though otherwise I'd probably have to blind type into the gdb window since it doesn't show up when it's switched to and the application it's running is in fullscreen. If I could even switch back to the gdb window anyway.
I attached a zip file with the bsg.log , openlayer.log , and data.bsg files from running the program in it.
I'd sure like to figure out why the compilation fails for me at home... It doesn't make any sense... I've installed OpenLayer and FMOD, yet somehow it still fails... Unless perhaps the OpenLayer, FMOD, and/or Allegro versions conflict in some way...
bamccaig
From your compile log earlier most of the undefined references are prefixed with FT_. Perhaps FreeType wasn't installed correctly or perhaps it was because of what Audric's link mentioned earlier about linking the OL2.0 way instead of the OL2.1 way? Basically it looks like some of the .a files aren't being linked against or perhaps in the wrong order (lib dependencies?).
There is also a precompiled Openlayer 2.1 version wich is the one I use
For some reason compiling libs always goes wrong with me .. it's some curse or something
Yeah, I used the prebuilt version as well... In Linux, I'm happy compiling projects myself, but in Windows I generally use prebuilt binaries if official ones are made available.
Retracing my steps, I think I installed OpenLayer 2.0 (OpenLayer2.0.zip) from SourceForge. I then installed FMOD 3.75 (fmodapi375win.zip) from the FMOD Web site. I have Allegro 4.2.2 installed, in case that matters...
I don't really understand how OpenLayer and Allegro relate, but IIRC I didn't overwrite my current Allegro installation with the files that came with OpenLayer... So perhaps the problem is a version conflict between libraries... I see that you used OpenLayer 2.1 whereas I used OpenLayer 2.0... I don't know anything about OpenLayer so I just kinda guessed about the entire installation...
Perhaps I should try openlayer-2.1-mingw-glyphkeeper.zip per your other thread?
bamccaig: Yes that's the one I referred to as "Openlayer 2.1, mingw-glyphkeeper edition", and I can confirm it builds Ariesnl's game fine. If you use the right linker arguments.
OpenLayer just uses Allegro, it doesn't modify it. Ariesnl, maybe there's a problem with the GK routines, could you try with the internal text renderer, which comes in the 2.1 version?
Yes that's the one I referred to as "Openlayer 2.1, mingw-glyphkeeper edition", and I can confirm it builds Ariesnl's game fine. If you use the right linker arguments.
Success!! It built successfully! Now if I could only figure out how to debug it...
** EDIT **
1 | C:\Documents and Settings<Username>\Documents\software\ViperFighter>\Cygwin\bin\gd |
2 | b ViperFighter.exe |
3 | GNU gdb 6.5.50.20060706-cvs (cygwin-special) |
4 | Copyright (C) 2006 Free Software Foundation, Inc. |
5 | GDB is free software, covered by the GNU General Public License, and you are |
6 | welcome to change it and/or distribute copies of it under certain conditions. |
7 | Type "show copying" to see the conditions. |
8 | There is absolutely no warranty for GDB. Type "show warranty" for details. |
9 | This GDB was configured as "i686-pc-cygwin"... |
10 | (gdb) run |
11 | Starting program: /cygdrive/c/Documents and Settings/<Username>/Documents/software/ |
12 | ViperFighter/ViperFighter.exe |
13 | Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll |
14 | Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll |
15 | Loaded symbols for /cygdrive/c/Documents and Settings/<Username>/Documents/software |
16 | /ViperFighter/alleg42.dll |
17 | Loaded symbols for /cygdrive/c/WINDOWS/system32/user32.dll |
18 | Loaded symbols for /cygdrive/c/WINDOWS/system32/gdi32.dll |
19 | Loaded symbols for /cygdrive/c/WINDOWS/system32/ole32.dll |
20 | Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll |
21 | Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll |
22 | Loaded symbols for /cygdrive/c/WINDOWS/system32/msvcrt.dll |
23 | Loaded symbols for /cygdrive/c/WINDOWS/system32/dinput.dll |
24 | Loaded symbols for /cygdrive/c/WINDOWS/system32/winmm.dll |
25 | Loaded symbols for /cygdrive/c/WINDOWS/system32/ddraw.dll |
26 | Loaded symbols for /cygdrive/c/WINDOWS/system32/dciman32.dll |
27 | Loaded symbols for /cygdrive/c/WINDOWS/system32/dsound.dll |
28 | Loaded symbols for /cygdrive/c/WINDOWS/system32/version.dll |
29 | Loaded symbols for /cygdrive/c/Documents and Settings/<Username>/Documents/software |
30 | /ViperFighter/fmod.dll |
31 | Loaded symbols for /cygdrive/c/WINDOWS/system32/msacm32.dll |
32 | Loaded symbols for /cygdrive/c/WINDOWS/system32/wsock32.dll |
33 | Loaded symbols for /cygdrive/c/WINDOWS/system32/ws2_32.dll |
34 | Loaded symbols for /cygdrive/c/WINDOWS/system32/ws2help.dll |
35 | Loaded symbols for /cygdrive/c/Documents and Settings/<Username>/Documents/software |
36 | /ViperFighter/freetype6.dll |
37 | Loaded symbols for /cygdrive/c/Documents and Settings/<Username>/Documents/software |
38 | /ViperFighter/zlib1.dll |
39 | Loaded symbols for /cygdrive/c/WINDOWS/system32/glu32.dll |
40 | Loaded symbols for /cygdrive/c/WINDOWS/system32/opengl32.dll |
41 | Loaded symbols for /cygdrive/c/Documents and Settings/<Username>/Documents/software |
42 | /ViperFighter/libpng13.dll |
43 | |
44 | ---Type <return> to continue, or q <return> to quit--- |
45 | Program received signal SIGILL, Illegal instruction. |
46 | 0x02dd8341 in ?? () |
47 | (gdb) bt |
48 | #0 0x02dd8341 in ?? () |
49 | #1 0x00414a25 in bsgGUIObject::~bsgGUIObject (this=0x2dd82c0) |
50 | at C:/Documents and Settings/<Username>/My Documents/software/ViperFighter/bsgG |
51 | UI.cpp:1061 |
52 | #2 0x00412469 in bsgListBox::~bsgListBox (this=0x2dd82c0) |
53 | at C:/Documents and Settings/<Username>/My Documents/software/ViperFighter/bsgG |
54 | UI.cpp:652 |
55 | #3 0x00410a12 in bsgChoosePlayerDLG::~bsgChoosePlayerDLG (this=0x2dca820) |
56 | at C:/Documents and Settings/<Username>/My Documents/software/ViperFighter/bsgG |
57 | UI.cpp:422 |
58 | #4 0x004150c0 in bsgGUI::Remove (this=0x2dc56e8) |
59 | at C:/Documents and Settings/<Username>/My Documents/software/ViperFighter/bsgG |
60 | UI.cpp:1144 |
61 | #5 0x00406246 in _mangled_main () |
62 | at C:/Documents and Settings/<Username>/My Documents/software/ViperFighter/Main |
63 | .cpp:383 |
64 | #6 0x1006c3e0 in get_uformat () |
65 | from /cygdrive/c/Documents and Settings/<Username>/Documents/software/ViperFight |
66 | er/alleg42.dll |
67 | #7 0x00000001 in ?? () |
68 | #8 0x00e65620 in ?? () |
69 | #9 0x474f5250 in ?? () |
70 | #10 0x317e4152 in ?? () |
71 | #11 0x0023fef8 in ?? () |
72 | ---Type <return> to continue, or q <return> to quit--- |
73 | #12 0x00251f35 in ?? () |
74 | #13 0x00000040 in ?? () |
75 | #14 0x00e65620 in ?? () |
76 | #15 0x00000001 in ?? () |
77 | #16 0x00000100 in ?? () |
78 | #17 0x004063ba in WinMain (hInst=Cannot access memory at address 0x2a |
79 | ) |
80 | at C:/Documents and Settings/<Username>/My Documents/software/ViperFighter/Main |
81 | .cpp:426 |
82 | Previous frame inner to this frame (corrupt stack?) |
83 | (gdb) quit |
84 | The program is running. Exit anyway? (y or n) y |
Looks like it's leading to the bsgGUIObject and bsgListBox destructors...
bsgGUI.cpp lines 1056-1062
bsgGUIObject::~bsgGUIObject() { if (m_clrBrush!=NULL) delete(m_clrBrush); if (m_clrPen!=NULL) delete(m_clrPen); if (m_shpIn!=NULL) delete(m_shpIn); if (m_shpOut!=NULL) delete(m_shpOut); }
bsgGUI.cpp lines 105-106
// ... m_shpIn = new Rect(m_nX,m_nY,m_nWidth,m_nHeight); m_shpOut = m_shpIn; //
This set of code from 105-106 is repeated several times over different constructors of objects derived from the bsgGUIobject class and is assigning m_shpOut the value of m_shpIn which was just assigned the address of a newly allocated Rect object. This is treating m_shpOut as if it was a shared or reference only pointer but in the destructor of the bsgGUIobj class both are passed as arguments to delete which means it's trying to destroy the same object twice if the values of those pointers haven't been changed in the meantime. At least that's what I think might be happening. When a class has a virtual destructor does that mean it uses it's inherited class's destructor? Haven't worked much with inheritance before.
as far as I know first the destructor of the object itself is called after that the destructor of the ancestor is called..
Virtual is needed to call the right destructor when using a pointer defined as a pointer to an ancestor class..
like this
TShip * pShip;
pShip=new TViper;
pShip now points top a TViper
delete pShip;
to get the right destructor here ( the one of TViper instead of the one of TShip) the destructors should be virtual..
what you post looks like a pretty ulgy bug.. but why does is work on my comp ??
I'll try to fix it, see what it does...:)
If m_shpOut is never assigned memory of it's own then you should be able to just remove the line that deletes it from the destructor.
I'll force myself to start using inheritance one of these days...
If you post a new build to try can you have a separate stand alone download for the new executable? With dial-up I only get ~7MB/Hr.
Here's a new EXE http://members.home.nl/ejm.martens/ViperFighter.zip
I hope it did something good ..
It works! No more crashing for me!
It also works for me now.
Working.ForMe = true;
The new binary is working for me now too. Will the radar have different colors between friendlys and enemys? It would be nice to have a smaller radar out of the way somewhere that could be toggled to stay on or off. As for the bug , it's strange that calling delete twice on the same memory only crashes the program on some computers and not others. Nice to see it working now anyway.
GREAT
thanks all of you..
@ Edgar Reynaldo... the bug was what you posted .. thnx
Coming weekend I'll celebrate my birthday ( I was born on april fool's day ) but as soon as I have time I'll start coding the first "real" missions
Happy Birthday!
Thanks:)
It works fine for me too now
I have found another bug however
If I highlight a player and then click 'Delete', it deletes that player ok. However any other player name I then click on gets instantly deleted!
Apart from that the games looking really promising, I look forward to playing the finished article