delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/01/23:15:20

From: "Eric J. Whitney" <whit_e AT hydra12 DOT ae DOT su DOT oz DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: This should run fine... but doesn't ?? Arrrggghhh!!
Date: Thu, 02 Apr 1998 13:53:39 +1000
Organization: The University of Sydney, NSW, Australia
Lines: 47
Distribution: inet
Message-ID: <35230BC3.1615308F@hydra12.ae.su.oz.au>
NNTP-Posting-Host: kgz.inthouse.usyd.edu.au
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi folks.... thought I'd bother you all with a problem I've been having
for some time.

I have a C++ program, which #includes my own Array and Matrix template
classes.  These work by using one pointer which points to the top of the
data.  They also have various associated exception classes which they
can throw.

The main program initialises one <float> instance say:  Matrix<float>
myMatrix(3, 3);
Then there is a second instance ie:  Matrix<float> mySecondMatrix(3,
3);  which appears further down the program listing ie:

Matrix<float> myMatrix(3, 3);

.....  Do some stuff here .....

Matrix<float> mySecondMatrix(3, 3);

...  More stuff....

Now:  This compiles & links fine in DJGPP C++ using RHIDE.  but when I
run it it gives me a "program exit code 255"  followed by all this
stuff:

Call frame traceback:
In function free+14
In function __builtin_delete+16
In functon __builtin_vec_delete+11
es.cpp(153) in function SetSize_t5Array1ZfUs
es.cpp(17) in function __t5Array1ZfUs
es.cpp(142) in function main
in function __crt1_startup+138


What have I done wrong???   It runs fine with one instance of the
Matrix, but for two, it crashes!!!
I have stepped through it using F8 and it always crashes right where the
second matrix is initialised.

HELP!

--
Eric "The Wingnut" Whitney
<whit_e AT hydra12 DOT ae DOT su DOT oz DOT au>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019