Would some of you please test this ??
Ariesnl

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..

ri99ers

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,

bamccaig

It is crashing for me as well in XP SP2. What third party libraries does it use?

bsg.log:

1Starting GUI
2Creating Choose player dialog
3 Listbox created
4Loading Player Info
5Adding Edwin to listbox
6Adding Edwin successfull
7Loading Player Info
8Adding stghse to listbox
9Adding stghse successfull
10Loading Player Info
11Adding test to listbox
12Adding test successfull
13Loading Player Info
14Adding kees to listbox
15Adding kees successfull
16Loading Player Info
17Adding cxbfgnhmnghm to listbox
18Adding cxbfgnhmnghm successfull
19Choose Player dialog created
20[Adding GUI Object]
21 Start button clicked
22Invoking callback function for ChoosePlayerDialog
23Get record with name Edwin
24Edwin 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]
30Destroying Choose Player dialog ...
31Saving Player Info
32Saving Player Info
33Saving Player Info
34Saving Player Info
35Saving Player Info
36Destroying 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:

1OpenLayer started up succesfully
2 
3Auto Loader: Executing 0 pending loading commands
4Auto Loader: Completed
5 
6Screen set up succesfully
7 
8Loading a true type font: c:\Documents and Settings<Username>\My Documents\software\ViperFighter\Fonts\smalltext.ttf
9Loading a true type font: c:\Documents and Settings<Username>\My Documents\software\ViperFighter\Fonts\BATTLEST.ttf
10Loading a true type font: c:\Documents and Settings<Username>\My Documents\software\ViperFighter\Fonts\TI.ttf
11Loading bitmap: Gfx\Still\Cursor1.png
12Loading bitmap: Gfx\Still\Compass.png
13Loading bitmap: Gfx\Still\CompassTop.png
14Loading bitmap: Gfx\TargetInfo\TI001.png
15Loading bitmap: Gfx\TargetInfo\TI002.png
16Loading bitmap: Gfx\TargetInfo\TI003.png
17Loading bitmap: Gfx\TargetInfo\TI004.png
18Loading bitmap: Gfx\TargetInfo\TI005.png
19Loading bitmap: Gfx\TargetInfo\TI006.png
20Loading bitmap: Gfx\TargetInfo\TI007.png
21ERROR: No such bitmap!
22Loading bitmap: Gfx\Menu\Intro.png
23Loading bitmap: Gfx\Menu\Deck.png
24Loading bitmap: Gfx\Still\Galactica_blib.png
25Loading bitmap: Gfx\Still\Raider_blib.png
26Loading bitmap: Gfx\Still\Viper_blib.png
27Loading bitmap: Gfx\Still\Spartan_blib.png
28Loading bitmap: Gfx\Still\Shuttle_blib.png
29Loading bitmap: Gfx\Still\Galactica.png
30Loading bitmap: Gfx\Still\leftbay.png
31Loading bitmap: Gfx\Still\rightbay.png
32Loading bitmap: Gfx\Still\Turret.png
33Loading bitmap: Gfx\Still\Raider.png
34Loading bitmap: Gfx\Still\Raidershd.png
35Loading bitmap: Gfx\Still\Viper.png
36Loading bitmap: Gfx\Still\Vipershd.png
37Loading bitmap: Gfx\Still\laser1.png
38Loading bitmap: Gfx\Still\laser2.png
39Loading bitmap: Gfx\Still\spartan.png
40Loading bitmap: Gfx\Still\spartanshd.png
41Loading bitmap: Gfx\Animated\smoke\S01.png
42Loading bitmap: Gfx\Animated\smoke\S02.png
43Loading bitmap: Gfx\Animated\smoke\S03.png
44Loading bitmap: Gfx\Animated\smoke\S04.png
45Loading bitmap: Gfx\Animated\smoke\S05.png
46Loading bitmap: Gfx\Animated\smoke\S06.png
47Loading bitmap: Gfx\Animated\smoke\S07.png
48Loading bitmap: Gfx\Animated\smoke\S08.png
49Loading bitmap: Gfx\Animated\smoke\S09.png
50Loading bitmap: Gfx\Animated\smoke\S10.png
51Loading bitmap: Gfx\Animated\smoke\S11.png
52Loading bitmap: Gfx\Animated\smoke\S12.png
53Loading bitmap: Gfx\Animated\smoke\S13.png
54ERROR: No such bitmap!
55Loading bitmap: Gfx\Animated\Explosion\Expl01.png
56Loading bitmap: Gfx\Animated\Explosion\Expl02.png
57Loading bitmap: Gfx\Animated\Explosion\Expl03.png
58Loading bitmap: Gfx\Animated\Explosion\Expl04.png
59Loading bitmap: Gfx\Animated\Explosion\Expl05.png
60Loading bitmap: Gfx\Animated\Explosion\Expl06.png
61Loading bitmap: Gfx\Animated\Explosion\Expl07.png
62Loading bitmap: Gfx\Animated\Explosion\Expl08.png
63Loading bitmap: Gfx\Animated\Explosion\Expl09.png
64Loading bitmap: Gfx\Animated\Explosion\Expl10.png
65Loading bitmap: Gfx\Animated\Explosion\Expl11.png
66Loading bitmap: Gfx\Animated\Explosion\Expl12.png
67Loading bitmap: Gfx\Animated\Explosion\Expl13.png
68Loading bitmap: Gfx\Animated\Explosion\Expl14.png
69Loading bitmap: Gfx\Animated\Explosion\Expl15.png
70Loading bitmap: Gfx\Animated\Explosion\Expl16.png
71Loading bitmap: Gfx\Animated\Explosion\Expl17.png
72ERROR: No such bitmap!
73Loading bitmap: Gfx\Still\Shuttle.png
74Loading bitmap: Gfx\Still\Shuttleshd.png
75Loading 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. :-/

Ariesnl said:

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. ???

piccolo

hey i think its your list box that crashing it. add and new crash as well.

edit:
witch file contains your listbox code.

bamccaig

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... :P

Albin Engström

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.

bamccaig
I said:

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... :P

1C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0xe4)||undefined reference to `FT_Get_Postscript_Name'|
2C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x254)||undefined reference to `FT_Get_First_Char'|
3C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x290)||undefined reference to `FT_Get_Next_Char'|
4C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x2ea)||undefined reference to `FT_Get_First_Char'|
5C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x321)||undefined reference to `FT_Get_Next_Char'|
6C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x36c)||undefined reference to `FT_Get_First_Char'|
7C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x3a5)||undefined reference to `FT_Get_Next_Char'|
8C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x403)||undefined reference to `FT_Get_Char_Index'|
9C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x4c5)||undefined reference to `FT_Get_Char_Index'|
10C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6e2)||undefined reference to `FT_Get_Char_Index'|
11C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x898)||undefined reference to `FT_Get_Char_Index'|
12C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1a2c)||undefined reference to `FT_Activate_Size'|
13C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1a53)||undefined reference to `FT_Set_Char_Size'|
14C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1b94)||undefined reference to `FT_Done_Size'|
15C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1bbd)||undefined reference to `FT_New_Size'|
16C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1c74)||undefined reference to `FT_Done_Size'|
17C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1d8f)||undefined reference to `FT_Done_Face'|
18C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x1f37)||undefined reference to `FT_Matrix_Multiply'|
19C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x20f8)||undefined reference to `FT_Matrix_Multiply'|
20C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x21a6)||undefined reference to `FT_Get_Char_Index'|
21C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x23c1)||undefined reference to `FT_Load_Glyph'|
22C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x242f)||undefined reference to `FT_Set_Char_Size'|
23C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x2463)||undefined reference to `FT_Render_Glyph'|
24C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x2b73)||undefined reference to `FT_Get_Char_Index'|
25C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x2bfd)||undefined reference to `FT_Get_Char_Index'|
26C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x61b9)||undefined reference to `FT_Init_FreeType'|
27C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x61fa)||undefined reference to `FT_Library_Version'|
28C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6319)||undefined reference to `FT_New_Memory_Face'|
29C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6348)||undefined reference to `FT_Select_Charmap'|
30C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x63be)||undefined reference to `FT_Init_FreeType'|
31C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6425)||undefined reference to `FT_Library_Version'|
32C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6481)||undefined reference to `FT_Done_Face'|
33C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x65a6)||undefined reference to `FT_Init_FreeType'|
34C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6689)||undefined reference to `FT_New_Face'|
35C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x66b8)||undefined reference to `FT_Select_Charmap'|
36C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x68b7)||undefined reference to `FT_Library_Version'|
37C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x69a5)||undefined reference to `FT_Done_Face'|
38C:\MinGW\lib\libglyph.a(glyph.o):glyph.c:(.text+0x6bec)||undefined reference to `FT_Done_FreeType'|
39C:\MinGW\lib\libloadpng.a(regpng.o):regpng.c:(.text+0x20)||undefined reference to `register_bitmap_file_type'|
40C:\MinGW\lib\libloadpng.a(regpng.o):regpng.c:(.text+0x5a)||undefined reference to `pack_fread'|
41C:\MinGW\lib\libloadpng.a(regpng.o):regpng.c:(.text+0xdf)||undefined reference to `register_datafile_object'|
42C:\MinGW\lib\libloadpng.a(regpng.o):regpng.c:(.text+0x110)||undefined reference to `register_datafile_object'|
43C:\MinGW\lib\libloadpng.a(regpng.o):regpng.c:(.text+0x12e)||undefined reference to `register_bitmap_file_type'|
44C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0x1c)||undefined reference to `png_get_io_ptr'|
45C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0x2c)||undefined reference to `pack_fread'|
46C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0x8a)||undefined reference to `png_read_info'|
47C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0xd6)||undefined reference to `png_get_IHDR'|
48C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0xe4)||undefined reference to `png_set_packing'|
49C:\MinGW\lib\libloadpng.a(loadpng.o):loadpng.c:(.text+0x11c)||undefined reference to `png_get_valid'|
50C:\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

:-X

Ariesnl

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

bamccaig
Ariesnl said:

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... :(

Audric

http://www.allegro.cc/forums/thread/595417/733887#target

Audric said:

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.

Ariesnl

@bamccaig never copy or even worse overwrite the tings that come with your compiler !!!

Use the additional dirs !!;)

bamccaig
Ariesnl said:

@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... :-/

Thomas Fjellstrom
Quote:

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.

bamccaig
Thomas Fjellstrom said:

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? :-/

Thomas Fjellstrom
Quote:

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>".

bamccaig
Thomas Fjellstrom said:

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...

Ariesnl

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 ...

Edgar Reynaldo

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.

bamccaig

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... :-/

Edgar Reynaldo

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?).

Ariesnl

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 :-/

bamccaig

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... :-X 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? :-/

Audric

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.

Fladimir da Gorf

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?

bamccaig
Audric said:

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! :o;D Now if I could only figure out how to debug it...

** EDIT **

1C:\Documents and Settings<Username>\Documents\software\ViperFighter>\Cygwin\bin\gd
2b ViperFighter.exe
3GNU gdb 6.5.50.20060706-cvs (cygwin-special)
4Copyright (C) 2006 Free Software Foundation, Inc.
5GDB is free software, covered by the GNU General Public License, and you are
6welcome to change it and/or distribute copies of it under certain conditions.
7Type "show copying" to see the conditions.
8There is absolutely no warranty for GDB. Type "show warranty" for details.
9This GDB was configured as "i686-pc-cygwin"...
10(gdb) run
11Starting program: /cygdrive/c/Documents and Settings/<Username>/Documents/software/
12ViperFighter/ViperFighter.exe
13Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll
14Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll
15Loaded symbols for /cygdrive/c/Documents and Settings/<Username>/Documents/software
16/ViperFighter/alleg42.dll
17Loaded symbols for /cygdrive/c/WINDOWS/system32/user32.dll
18Loaded symbols for /cygdrive/c/WINDOWS/system32/gdi32.dll
19Loaded symbols for /cygdrive/c/WINDOWS/system32/ole32.dll
20Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll
21Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll
22Loaded symbols for /cygdrive/c/WINDOWS/system32/msvcrt.dll
23Loaded symbols for /cygdrive/c/WINDOWS/system32/dinput.dll
24Loaded symbols for /cygdrive/c/WINDOWS/system32/winmm.dll
25Loaded symbols for /cygdrive/c/WINDOWS/system32/ddraw.dll
26Loaded symbols for /cygdrive/c/WINDOWS/system32/dciman32.dll
27Loaded symbols for /cygdrive/c/WINDOWS/system32/dsound.dll
28Loaded symbols for /cygdrive/c/WINDOWS/system32/version.dll
29Loaded symbols for /cygdrive/c/Documents and Settings/<Username>/Documents/software
30/ViperFighter/fmod.dll
31Loaded symbols for /cygdrive/c/WINDOWS/system32/msacm32.dll
32Loaded symbols for /cygdrive/c/WINDOWS/system32/wsock32.dll
33Loaded symbols for /cygdrive/c/WINDOWS/system32/ws2_32.dll
34Loaded symbols for /cygdrive/c/WINDOWS/system32/ws2help.dll
35Loaded symbols for /cygdrive/c/Documents and Settings/<Username>/Documents/software
36/ViperFighter/freetype6.dll
37Loaded symbols for /cygdrive/c/Documents and Settings/<Username>/Documents/software
38/ViperFighter/zlib1.dll
39Loaded symbols for /cygdrive/c/WINDOWS/system32/glu32.dll
40Loaded symbols for /cygdrive/c/WINDOWS/system32/opengl32.dll
41Loaded 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---
45Program received signal SIGILL, Illegal instruction.
460x02dd8341 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
51UI.cpp:1061
52#2 0x00412469 in bsgListBox::~bsgListBox (this=0x2dd82c0)
53 at C:/Documents and Settings/<Username>/My Documents/software/ViperFighter/bsgG
54UI.cpp:652
55#3 0x00410a12 in bsgChoosePlayerDLG::~bsgChoosePlayerDLG (this=0x2dca820)
56 at C:/Documents and Settings/<Username>/My Documents/software/ViperFighter/bsgG
57UI.cpp:422
58#4 0x004150c0 in bsgGUI::Remove (this=0x2dc56e8)
59 at C:/Documents and Settings/<Username>/My Documents/software/ViperFighter/bsgG
60UI.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
66er/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
82Previous frame inner to this frame (corrupt stack?)
83(gdb) quit
84The program is running. Exit anyway? (y or n) y

Looks like it's leading to the bsgGUIObject and bsgListBox destructors...

Edgar Reynaldo

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.

Ariesnl

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...:)

Edgar Reynaldo

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.

Ariesnl

Here's a new EXE http://members.home.nl/ejm.martens/ViperFighter.zip

I hope it did something good ..

bamccaig

It works! No more crashing for me! ;D

someone972

It also works for me now. 8-)

Vanneto
Working.ForMe = true;

;)

Edgar Reynaldo

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.

Ariesnl

GREAT ;D

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 ;D ) but as soon as I have time I'll start coding the first "real" missions

Edgar Reynaldo

Happy Birthday!

Ariesnl

Thanks:)

ri99ers

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 :)

Thread #595782. Printed from Allegro.cc