Board index » cppbuilder » BCB6 and access violation in _numpunct.h

BCB6 and access violation in _numpunct.h


2005-05-03 03:37:58 AM
cppbuilder53
My code makes this call:
t_metaF = new ifstream(filespec.c_str(),
ios_base::in | ios_base::binary);
t_metaF is, of course, an ifstream. filespec is a std::string.
The code has been working for several months. This morning I have been
developing and debugging in a different module from the one where this
code is invoked. Whenever I run the application, it crashes from the
above call with an access violation in _numpunct.h, at this line:
class _STLP_CLASS_DECLSPEC numpunct<char>: public locale::facet
{
// skipping many lines of declarations.
string grouping() const { return do_grouping(); } <<== this line
The thing is... if I BUILD ALL, I can run the application without
difficulty. But if I subsequently F9-Run from the IDE, the crash is
back. Thus, the only way I can move forward is to do a full build every
time I make a change to the code.
This problem appeared a couple of months ago, and then disappeared for
no reason I could determine.
HAS ANYBODY HERE EVER SEEN THIS BEHAVIOR? I'm sure it must be something
in my project configuration, but I can't figure out what that is.
Thanks for any help you can provide.
Kathleen
 
 

Re:BCB6 and access violation in _numpunct.h

On Mon, 02 May 2005 12:37:58 -0700, Kathleen Beaumont wrote:
Quote
t_metaF is, of course, an ifstream.
Er, no, t_metaF appears to be a pointer to ifstream. This might be the
source of your problems... but on the assumption that it isn't:
What happens when you create a brand new project and add the appropriate
source files to it?
What happens when you create a brand new project and add /only/ the new
ifstream object? (and then reference it somehow)
--
Good luck,
liz
 

Re:BCB6 and access violation in _numpunct.h

Liz Albin wrote:
Quote
On Mon, 02 May 2005 12:37:58 -0700, Kathleen Beaumont wrote:


>t_metaF is, of course, an ifstream.


Er, no, t_metaF appears to be a pointer to ifstream. This might be the
source of your problems... but on the assumption that it isn't:
Quite right; it's a pointer to ifstream. Also right: That's not the
source of the problem (or else it would NEVER work).
Quote

What happens when you create a brand new project and add the appropriate
source files to it?

What happens when you create a brand new project and add /only/ the new
ifstream object? (and then reference it somehow)
Good suggestions... I'll see if these will make any difference.
Thanks, Liz.
Kathleen
 

{smallsort}

Re:BCB6 and access violation in _numpunct.h

I have the same problem, but i do not use ifstream...
It occurs "randomly" in different project when they get over a certain
size i think. << this i not confirmed...
If anybody can figure out whats wrong, it would be a great help!
/Paw
 

Re:BCB6 and access violation in _numpunct.h

The problem turned out to be the BPR file. Another programmer on the
team was experimenting with adding a new 3rd-party lib, and in adding
the particular library he was interested in, BCB6 seems to have snagged
EVERYTHING on his component pallette and included it. (We have a lot of
problems with when and how the BPR gets updated-- seems to do a lot when
we're not looking-- but that's a topic for another thread.)
Anyway, the "fix" was to do as Liz Albin suggested-- create a new
project and load all of the files into it. It's not something I would
like to have to do very often, but it seems to have fixed the problem
that caused me to start this thread.
Thanks,
Kathleen
 

Re:BCB6 and access violation in _numpunct.h

On Tue, 03 May 2005 09:10:04 -0700, Kathleen Beaumont wrote:
Quote
It's not something I would
like to have to do very often, but it seems to have fixed the problem
that caused me to start this thread.
I'm glad it worked... you probably won't have to do it all that often
(Golly, I hope not!)
--
Good luck,
liz