Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9117945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:01:12+00:00 2026-06-17T05:01:12+00:00

I have a pretty weird ‘crash’ at a customer’s computer. Using logs I was

  • 0

I have a pretty weird ‘crash’ at a customer’s computer. Using logs I was able to track it to this line of code:

myvar = 1; //This ‘crashes’. myvar is declared as ‘double’

The code is obviously okay. But myvar is a member variable of a class. And there is a global instance of this variable and line of code is in the constructor. So it’s executed before main(). Not good style, I know…

My questions:
– Is it allowed to use float/double before main()?
– Is there some kind of “InitFloatSystem()” function that I could call?

Some more info:
– It’s a Win32 / C++
– There’s no crash message, the program just closes
– try/catch doesn’t help

I’m really out of ideas…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:01:13+00:00Added an answer on June 17, 2026 at 5:01 am

    Finally, finally found the problem. It’s an issue of Visual Studio 2012. I found at the Microsoft website, even though they reported different side effects: http://connect.microsoft.com/VisualStudio/feedback/details/771122/floating-point-math-change-from-vs2008-to-vs2012-affects-native-code-but-not-managed-code

    My guess is that the compiler now uses by default processor features that aren’t available on some old processors. Using this compiler option magically fixed it:
    /arch:IA32

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pretty simple code but a weird situation... have a template with this snippet: {%
I have pretty simple jquery code : $(document).ready(function(){ $('img.marqFl').on({ mouseenter: function() { $(this).animate({height: 300},
This is pretty weird. I have my Profiler open and it obviously shows that
I know this is a weird on, but in my code, i have development
This is pretty weird. I have my public key added at host machine. I
I have a pretty weird problem related to zend framework's zend_db. I use $this
I have a pretty weird problem with sorting in JavaScript. I've wandered into this
I have pretty standard Qmail toaster installation. I'm using the dot files to set
I have an Apache Solr instance deployed in Glassfish and I am using this
I have a pretty weird problem in my iPhone app which is, I think,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.