Mail Archives: djgpp/2000/11/15/02:25:46
At 10:27 PM 11/14/2000 -0600, you wrote:
>Hello. I'm having a problem with vectors in DJGPP (and Allegro). I'm making
>a vertical shooter, and just for fun, I've been pumping up how many
>enemies/bullets are on screen at once. All objects are stored in vectors of
>pointers to them. If the vectors get too large, the program crashes. I don't
>know if it helps, but I've included results of symify; the reason I'm asking
>this here is the presence of the dj_movedata error; this is a DJGPP thing,
>correct (same with new2.cc)? Also, if someone could tell me if there's
>anything further I can do with this mess of numbers (after symify) that
>might help too...
If you're using the C++ and the STL vector data type, make sure that your
ADT or
abstract data type has _proper_ copy semantics (i.e. copy constructor and
operator= defined for it). In any case your problem is caused by pointers
referencing memory areas that your program does not own.
>Shutting down Allegro
>Exiting due to signal SIGSEGV
>Page fault at eip=000759e5, error=0004
Your program is reading from an invalid address (error=0004). Possibly a 0 or
NULL pointer. Your other crash messages are consistent with this case. So you
better compile your proggy with debugging info and trace it.
>eax=fffffffe ebx=00170f14 ecx=fffd0f14 edx=fffffff8 esi=001a0000
>edi=0019fffc
>ebp=ffdc2e40 esp=ffdc2e34 program=C:\CHRIS'~1\VERTIC~2\TRANSF~1.EXE
>cs: sel=00af base=83346000 limit=ffdf2fff
>ds: sel=00b7 base=83346000 limit=ffdf2fff
>es: sel=00b7 base=83346000 limit=ffdf2fff
>fs: sel=00c7 base=00000000 limit=0010ffff
>gs: sel=00c7 base=00000000 limit=0010ffff
>ss: sel=00b7 base=83346000 limit=ffdf2fff
>App stack: [ffdc3000..ffd43000] Exceptn stack: [000b3a54..000b1b14]
>
>Call frame traceback EIPs:
> 0x000759e5 ___dj_movedata+37
> 0x0000c5f3 ___copy_trivial__H1ZP7CBullet..+47, line 149 of TFAA.cpp
> 0x0000bf89 _copy__t15__copy_dispatch3ZPP..+29, line 169 of TFAA.cpp
> 0x0000af69 _copy__H2ZPP7CBulletZPP7CBull..+29, line 188 of TFAA.cpp
> 0x00009dfd _erase__t6vector2ZP7CBulletZt..+53, line 394 of TFAA.cpp
> 0x00006a24 _PlayGame__Fi+1660, line 747 of TFAA.cpp
> 0x00004471 _main+237, line 147 of TFAA.cpp
> 0x0006a882 ___crt1_startup+178
>
nimrod_a_abing
--------------
+========================================+
| Home page: www.geocities.com/n_abing |
+========================================+
- Raw text -