Unusual $C0000090 Exception [Edit]

I'm not sure where to place this as Quality Central doesn't seem the place for XE3. I'm using XE3 with the first update installed building for 32 bit. A call to the math libraries' Mean function causes an application exception to occur. But it occurs in a weird place when this code is added. The exception occurs in the startup assembly routine. By creating my own simple mean function in the class I'm using I can make the problem go away. My first question is where to put this report so it's in the right p
lace. Secondly, has anyone else seen this behavior? I tried to do a Clean and rebuild but it doesn't make it go away. It makes no sense that during the _startup code the program would crash because this line of code when the mean function hasn't even been called by then. But, taking away the line of code which calls the mean function causes the program to start and run correctly. With the mean function the program will crash before the WinMain function is even called.

The following code doesn't cause the error to occur:

from inside THardware::MyFunction(void)

TLVDTSensor LVDT;
double mean = MyMean(thisSignal->Stats->Volts, numsamples - 1);
double value = LVDT.Calculate(mean);
TSensor->Series5->AddXY(Now(), value, "", clTeeColor);

double THardware::MyMean(double* Array, int ArraySize) {
	double value = 0;
	for (int i = 0; i < ArraySize; i++) {
		value += Array[i];
	}
	value /= ArraySize;
	return value;
}

When the following is compiled and run the floating point exception occurs in the _startup code for some darn reason. Program flow never gets to putting a breakpoint on the Mean line nor does it ever get to WinMain:

from inside THardware::MyFunction(void)

TLVDTSensor LVDT;
double mean = Mean(thisSignal->Stats->Volts, numsamples - 1);
double value = LVDT.Calculate(mean);
TSensor->Series5->AddXY(Now(), value, "", clTeeColor);

Cheers

Edited by: John Borchers on Feb 1, 2013 1:06 PM
0
John
2/1/2013 9:11:18 PM
embarcadero.cppbuilder.cpp 2803 articles. 0 followers. Follow

3 Replies
1173 Views

Similar Articles

[PageSpeed] 44

Hello,

> I'm not sure where to place this as Quality Central doesn't seem the place 
> for XE3.
> I'm using XE3 with the first update installed building for 32 bit. A call 
> to the math
> libraries' Mean function causes an application exception to occur. But it 
> occurs
> in a weird place when this code is added. The exception occurs in the 
> startup
> assembly routine. By creating my own simple mean function in the class I'm 
> using
> I can make the problem go away. My first question is where to put this 
> report so
> it's in the right place.

My guess would be a unit initialization order issue, hence I would suggest 
the linker. Specially if you note that the problem goes away if you link 
with "Dynamic RTL"+"Runtime Packages" (I assume you currently have these two 
options - 'Link with dynamic RTL' and 'Link with runtime packages' - set to 
false. Does the debugger show a stack trace when the crash happens. If yes, 
please do post it here.


> Secondly, has anyone else seen this behavior? I tried to do a Clean and 
> rebuild but it
> doesn't make it go away. It makes no sense that during the _startup code 
> the program
> would crash because this line of code when the mean function hasn't even 
> been called by then.
> But, taking away the line of code which calls the mean function causes the 
> program to start and
> run correctly. With the mean function the program will crash before the 
> WinMain function is even called.
>

What routines your code links to changes the startup/Initialization 
sequence. I have not seen this specific issue but I have seen my fair share 
of crashes related to whether unit X or Y is linked in. Having a detailed 
map file can help here too. But eventually it will boil down to getting the 
correct initialization sequence. We will need a little more context/info to 
narrow this down.

Cheers,

Bruneau
0
Jean
2/3/2013 6:37:37 AM
> {quote:title=Jean-Marie Babet wrote:}{quote}
> Hello,
> 
> > I'm not sure where to place this as Quality Central doesn't seem the place 
> > for XE3.
> > I'm using XE3 with the first update installed building for 32 bit. A call 
> > to the math
> > libraries' Mean function causes an application exception to occur. But it 
> > occurs
> > in a weird place when this code is added. The exception occurs in the 
> > startup
> > assembly routine. By creating my own simple mean function in the class I'm 
> > using
> > I can make the problem go away. My first question is where to put this 
> > report so
> > it's in the right place.
> 

This problem went away as quickly as it came. It didn't have to do with anything in the forms because nothing was changed there. It was a simple matter of adding the Mean function which caused the compiler to balk. Adding more code made the problem disappear even though I had tried to resolve by doing a clean and many other possible solutions.
> My guess would be a unit initialization order issue, hence I would suggest 
> the linker. Specially if you note that the problem goes away if you link 
> with "Dynamic RTL"+"Runtime Packages" (I assume you currently have these two 
> options - 'Link with dynamic RTL' and 'Link with runtime packages' - set to 
> false. Does the debugger show a stack trace when the crash happens. If yes, 
> please do post it here.
> 
> 
> > Secondly, has anyone else seen this behavior? I tried to do a Clean and 
> > rebuild but it
> > doesn't make it go away. It makes no sense that during the _startup code 
> > the program
> > would crash because this line of code when the mean function hasn't even 
> > been called by then.
> > But, taking away the line of code which calls the mean function causes the 
> > program to start and
> > run correctly. With the mean function the program will crash before the 
> > WinMain function is even called.
> >
> 
> What routines your code links to changes the startup/Initialization 
> sequence. I have not seen this specific issue but I have seen my fair share 
> of crashes related to whether unit X or Y is linked in. Having a detailed 
> map file can help here too. But eventually it will boil down to getting the 
> correct initialization sequence. We will need a little more context/info to 
> narrow this down.
> 
> Cheers,
> 
> Bruneau
0
John
2/18/2013 9:48:38 PM
Problem may be about the Mean() function while u used MyMean(),
Try this just take your values and use Mean() like this

	double Values[] = { 12.55, 10.15, 980.22, 50.50, 280.12 };
	int Size = (sizeof(Values) / sizeof(double)) - 1;

	double Average = Mean(Values, Size);

So see what happens, may this could help.


> double mean = MyMean(thisSignal->Stats->Volts, numsamples - 1);
..... 
> When the following is compiled and run the floating point exception occurs in the _startup code for some darn reason. Program flow never gets to putting a breakpoint on the Mean line nor does it ever get to WinMain:
> 
> from inside THardware::MyFunction(void)
> 
> TLVDTSensor LVDT;
> double mean = Mean(thisSignal->Stats->Volts, numsamples - 1);
0
YILMAZ
2/18/2013 11:05:36 PM
Reply:

Similar Artilces:

An exceptional exception
I'm getting an exception in the exceptions.vb class. When an exception is caught:Catch exc As Exception 'Module failed to load ProcessModuleLoadException(Me, exc) End Tryline 103 of the exceptions.vb file:Public Sub ProcessModuleLoadException(ByVal ctrlModule As PortalModuleControl, ByVal exc As Exception) ProcessModuleLoadException("Error: " + ctrlModule.ModuleConfiguration.ModuleTitle + " is currently unavailable.", ctrlModule, exc, True) End Sub throws an error because it cannot get the moduleTitle from the "Me" (PortalModuleControl) argu...

Editable/Not Editable
Hello All, I have some webform(.aspx page) in which i have some controls (for input) and i would like to make that screen editable/not editable based on some condition. how can i do that.  the whole intent is user can read the information but can't change.  shiva kumar If you want to make the controls editable/non-editable, you can set their ReadOnly property to true or false accordingly. What exactly do you imply by making the screen editable/non-editable?Thanks,MaxLet Me Google That For You! i mean to say i would like to show the current values but user should not mod...

To edit or no to edit
Jon, Can I edit, whatever I've written so far, so that it doesn't look like I wrote utterly crap?-) -- Pieter "Linux is like living in a teepee. No Windows, no Gates, Apache in house." -- Usenet signature Pieter Zijlstra wrote: > Jon, > > Can I edit, whatever I've written so far, so that it doesn't look like > I wrote utterly crap?-) Oh boy, the edit button vanished from the web-forum ... ;-) -- Pieter "Humor is also a way of saying something serious." -- T. S. Eliot (1888 - 1965) Pieter Zijlstra wrote: ...

Edit but no edit
I've Created a custom module and reuse the survey.dnn file to help with the install here it is. <?xml version="1.0" encoding="utf-8" ?> <dotnetnuke version="2.0" type="Module"> <folders> <folder> <name>CompanyName - Photos</name> <description>Photos allows you to add photo albums</description> <version>01.00.00</version> <modules> <module> <friendlyname>CompanyName - Photos</friendlyname> <controls> <c...

Exceptional Exception...
I am getting the following exception when people inside my company go to our new CSK derived site... Server Error in '/' Application. -------------------------------------------------------------------------------- The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested Url: /About+Us/Technical+Questions/default.aspx -------------------------------...

Can't terminate an application in the 'except' portion of a 'try..except' [Edit]
I'm a long time Delphi 5 user, recently switched to Delphi XE... and I'm having trouble getting a program to terminate if an exception is raised. Here's the code: procedure TForm1.FormCreate(Sender: TObject); begin try DFCom.Open except showmessage('Invalid Com Port number'); application.Terminate; end; end; In this code, 'DFCom' is an async serial port device. If the exceptino occurs, I want to notify the user via the 'showmessage' mechanism, and then abort the program. When I run this (with an invalid port number assigned to...

Security exception? [Edit]
Hi, what does this error mean? Why does it happen? It doesnt' seem to be from a changing ip address? Security Exception: The browser you are using is different than the one that is assigned to the specified session Type: EIWException Can this be safely ignored? And if so if I say handled=true in the on error event will the error go away so that the user can continue? Edited by: ray white on Mar 20, 2013 7:05 AM ray white wrote: > Hi, what does this error mean? Why does it happen? It doesnt' seem to > be from a changing ip address? > > Security Exception: ...

--enable-cpp-exceptions
Hi folks, what's the benefit of using --enable-cpp-exceptions ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact@metux.de --------------------------------------------------------------------- Realtime Forex/Stock Exchange trading powered by postgresSQL :)) http://www.fxignal.net/ --------------------------------------------------------...

Exception handling [Edit]
Not all exceptions are errors. I'm pulling hair out of my head. Frustrated, not sure how to properly handle exceptions. I've written a multi-threaded TCP server. On top of the Indy threads, I'm running a couple of my own threads. Ideally I do not want to terminate the server or a thread due to an exception especially when its not an error exception. Almost all of my exceptions are notifiers and not errors. But even if its just a notifier, how do I properly handle them. Let me start by asking, what happens when an unhandled exception is thrown inside the thread? Does the thr...

--enable-cpp-exceptions
I am getting the following error when building firefox HEAD with --enable-cpp-exceptions on windows. This works fine on os x. I am trying to build with exceptions enabled for an extension I am writing - is there a way to disable building this component or another workaround for this error? c:/mozilla/toolkit/components/downloads/src/nsDownloadScanner.cpp(556) : error C2712: Cannot use __try in functions that require object unwinding make[6]: *** [nsDownloadScanner.obj] Error 2 make[6]: Leaving directory `/c/mozilla/toolkit/components/downloads/src' make[5]: *** [libs] Error 2 ...

Exceptions in TTread [Edit]
Hello, I prepare simple code for simulate how exception in thread working. I need to catch the exception beacuse I must provide infint loop in execute function. But catch statemant is occured only seven times (each time I click on Button1 on my form) than while cycle in Execute function is stoped. I dont understand why. What is incorrect in my attach code? How to code try/catch statemants in Tthread to provide infinite loop immune of excpetion inside? {code} TForm1 *Form1; //--------------------------------------------------------------------------- TPROCESS::TPROCESS (void) : TThr...

Exception handling [Edit]
Hi How could I handle EIdHTTPProtocolException, more specific error 400 (Bad Request). I want just to skip 400 error, not the others which EIdHTTPProtocolException holds. How Can I do that? My Current code is {code} Function TMyThread.Get(Url: string; Timeout: integer): string; Begin IdHTTP.ReadTimeout := Timeout; Result := ''; Repeat Try Result := IdHTTP.Get(Url); Break; Except On E: EIdHTTPProtocolException do Begin Break; end; On E: Exception do Begin IdHTTP.Disconnect; if Assign...

Exceptions in Debugger [Edit]
In D7, I'm writing an app that imports a list of times as strings. I need to convert these string times to actual TDateTimes. Some of the string times are not actually times. I'm not able to know what the non-time strings are or where they will be. So I set up a try/except around StrToTime. The following code runs from the exe without an exception. However when I run it in the IDE in debug mode I get the ConversionError exception and the execution stops. Can I somehow programatically tell the debugger I've handled this exception so execution does not stop. Or is there a b...

What is with the " [Edit] [Edit] [Edit]" posts?
Don't know where I should post this, hopefully a short thread here is okay. But, at least with my newsreader, Agent 6, longer threads tend to get broken into pieces, with "[Edit]" attached to the topic name. And sometimes longer threads then get [Edit] [Edit] and then [Edit] [Edit] [Edit] For example, here is a current thread: FastMM 4.96 available [Edit] [Edit] [Edit] How does this happen? Can I make them show up as one thread? Paul Doland wrote: > Don't know where I should post this, hopefully a short thread here is > okay. But, at least with my...

Web resources about - Unusual $C0000090 Exception [Edit] - embarcadero.cppbuilder.cpp

How the US Could Respond to North Korea's Nuclear Test
North Korea's latest nuclear test continues a long line of hostile provocations.

'Avatar' falls: 'Force Awakens' is the U.S. box office's supreme leader
LOS ANGELES — America loves its Star Wars . The rest of the world ... still more of an Avatar fan. Going into Wednesday, Star Wars: The Force ...

Make Sure Your Computer Is Powerful Enough For The Oculus Rift Before You Spend $599 On One
As expected , the consumer version of the Facebook-owned Oculus Rift virtual reality headset went on sale today, but at a higher price than some ...

Cologne Mayor's 'Arm's-Length' Sex Assault Advice Stirs Outcry
New York Times Cologne Mayor's 'Arm's-Length' Sex Assault Advice Stirs Outcry New York Times BERLIN — The mayor of Cologne has inflamed a ...

Twitter CEO Jack Dorsey Seems Cool With 10,000 Character Tweets
The big news in the Twittersphere Tuesday was the possibility of Twitter moving way, way beyond its signature 140-character limit. The new rumored ...

Man who bought assault rifles used in the San Bernardino attack pleads not guilty
Enrique Marquez Jr., the man who bought the guns used in the San Bernardino attack has pleaded not guilty to federal charges. See also: San ...

HBO’s Michael Lombardo Takes Blame for ‘True Detective’s’ Season 2 Struggle
HBO programming president Michael Lombardo said the short deadlines he imposed on “True Detective” creator Nic Pizzolatto were to blame for the ...

Apple Slowing iPhone Production
Even before the new year rolled in many analysts had started predicting that perhaps the iPhone could see its first sales decline in years , ...

Chipotle hit with federal subpoena over California norovirus outbreak
Reuters Chipotle hit with federal subpoena over California norovirus outbreak Reuters Chipotle Mexican Grill Inc, under scrutiny for months ...

Why The Saudi Arabia-Iran Crisis Could Be Good News For Netflix And Others Entering The Mid East Media ...
2016 in the Middle East looks a lot like 2015 so far, with multiples crises the order of the day. Ironically, that could be good news for a host ...

Resources last updated: 1/6/2016 7:58:42 PM