473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

release crash

I have a problem with this code when execute it in release.In debug
work and in release crash.
Can somebody help me?

c_it=std::find_if(icset.set.begin(),icset.set.end( ),IsPositive);/*find
first marked*/
if (c_it!=icset.set.end()) n_it=std::find_if(c_it
+1,icset.set.end(),IsNegative);
else n_it=icset.set.end();
while (1) {
if ((c_it==icset.set.end()) || (n_it==icset.set.end())) break;
float ic=(*c_it).p;
float nic=(*n_it).p;
int ii;
if (ic==(int)ic) ii=ic;
else ii=(int) ic+1;
int nii=(int) nic;
char sign=((*c_it).d<0)?1:-1;
if ((*c_it).id<0) sign=!sign;
for (int i=ii;i<=nii;i++)
{
assert(x<nx);
assert(y<ny);
assert(ry<2);
signed_slice[x][i][ry]=sign;
}
c_it=find_if(c_it+1,icset.set.end(),IsPositive);
n_it=find_if(c_it+1,icset.set.end(),IsNegative);
}

Mar 20 '07 #1
1 1681
On Mar 20, 3:02 pm, "antani" <antani8...@yahoo.itwrote:
I have a problem with this code when execute it in release.In debug
work and in release crash.
Can somebody help me?

c_it=std::find_if(icset.set.begin(),icset.set.end( ),IsPositive);/*find
first marked*/
if (c_it!=icset.set.end()) n_it=std::find_if(c_it
+1,icset.set.end(),IsNegative);
else n_it=icset.set.end();
while (1) {
if ((c_it==icset.set.end()) || (n_it==icset.set.end())) break;
float ic=(*c_it).p;
float nic=(*n_it).p;
int ii;
if (ic==(int)ic) ii=ic;
else ii=(int) ic+1;
int nii=(int) nic;
char sign=((*c_it).d<0)?1:-1;
if ((*c_it).id<0) sign=!sign;
for (int i=ii;i<=nii;i++)
{
assert(x<nx);
assert(y<ny);
assert(ry<2);
signed_slice[x][i][ry]=sign;
}
c_it=find_if(c_it+1,icset.set.end(),IsPositive);
n_it=find_if(c_it+1,icset.set.end(),IsNegative);
}
Not with the code you give. Please provide a *minimal* but *complete*
program that demonstrates your problem (http://www.parashift.com/c++-
faq-lite/how-to-post.html#faq-5.8).

Also consult "Surviving the Release Version" by Joseph M. Newcomer:

http://www.codeproject.com/debug/survivereleasever.asp

Cheers! --M

Mar 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Anthony Baxter | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.3.4 (release candidate 1). ...
0
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.3.5 (release candidate 1). Python 2.3.5 is a bug-fix release. See the release...
2
by: Song | last post by:
Hi, gurus, I am new with visual studio... I am trying to build a standalone C++ project by MS visual C++, the problem that I have is: if compile it as "Release" version, it crashes by a...
4
by: whocares | last post by:
hi everyone. i'm currently experiencing a strange problem under vc++ 2005 express. i hope someone has a hint for me, i'm kind of lost atm. i'm using a vectors of pointers in my code. using...
2
by: kevinding | last post by:
Hi All, We meet an evil condition for our project. Our project has 3 layers. A C# layer to do some business logic, and Managed C++ layer translate managed values to native ones or vice...
3
by: Johnny | last post by:
Hi guys, I created a user-defined SEH by following Crash Course SEH article by Matt Pietrek. When building the app in Debug mode, it has no problem catching exception and entering the user...
2
by: Epetruk | last post by:
Hello, I have a problem where an application I am working on throws an OutOfMemoryException when I run it in Release mode, whereas it doesn't do this when I am running in Debug. The...
6
by: bjornms | last post by:
The application i build in C#.net is crashing once a month. I can't reproduce the crash. Is there a way to track down where the program crashes, without putting logging everywhere in the code?...
3
by: Bob Johnson | last post by:
It is my understanding - and please correct me if I'm wrong - that when building a project in debug mode, I can deploy the .pdb file along with the ..exe and thereby have access to the specific...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.