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

  • Home
  • SEARCH
  • 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 1098137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:32:06+00:00 2026-05-17T00:32:06+00:00

I worked with Visual Studio 2008 in a C project without problems. Now I

  • 0

I worked with Visual Studio 2008 in a C project without problems. Now I added the same source files to Visual studio 2010, compiled it without problems but when I debug the program I get:

Unhandled exception at 0x00417257 in da34.exe: 0xC0000005: Access violation reading location 0x00030000.

Looking at the code I just can see this:

    ; Find next lower page and probe
cs20:
        sub     eax, _PAGESIZE_         ; decrease by PAGESIZE
        test    dword ptr [eax],eax     ; probe page.
        jmp     short cs10

_chkstk endp

        end

and it points to the “probe page” line

Do you know what could be the reason? My program is very simple.

Thanks

UPDATE:

I found a “cause” of the error just first commenting the content of the main functions, then uncommenting half, and so on. The program consists in one .c and one .h file. In the .h file a type is defined like:

typedef FLOAT_TYPE d_elem[NMAX][NMAX][3];

in the .c file, on the main function, just when the variables are defined, there is a line like:

    d_elem d_m; 

If I comment this line, the error dissapears. I find this weird, what is going on here ? Of course the whole program compiles and runs with GCC on Linux without these problmes

UPDATE2: The solution (stupid one) is to increase stack reserve size on the project options, linker, etc. Way idiot. VS 2008 with the same default options runs the proram ok

  • 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-05-17T00:32:06+00:00Added an answer on May 17, 2026 at 12:32 am

    An Access Violation would be one way of your program invoking Undefined Behavior to manifest. There’s a lot of ways to do this in a program, so unless you show us some code that reproduces this, we won’t be able to help you to find this problem.

    Edit: It’s the very nature of UB that the results of your program become unpredictable. It worked in VS2008? So what? That’s one way UB might manifest. So the crash goes away when you make random changes? Well, that’s unpredictable for you. Look at this older answer from me regarding UB. (It’s only slightly exaggerated. Really.)

    Face it: As long as your program somewhere, somehow invokes Undefined Behavior, anything might happen, at anytime. Try to find the actual problem, and solve it, instead of making random changes that produce random results.
    When the crash happens, break into the debugger and look at the call stack, the variables, what the program was trying to do when it crashed, how it got there, which values are nonsense, and why they are nonsense.
    This is a shot in the dark, but from what that 3D array looks like, you might recurse too deep, thereby blowing the stack. owever, for that to say you have shown way too little code.

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

Sidebar

Related Questions

Our team has recently migrated from Visual Studio 2008/.NET3.5 to Visual Studio 2010/.NET4.0. Now,
We just upgraded our Visual Studio 2008 projects to Visual Studio 2010. All of
For my project I am using the integrated Visual Studio unit-testing framework but I
I am using Visual Source Safe 2005 and Visual Studio 2008. @#$% this Source
I'm changing over from Visual Studio 2008 -> 2010 and I've come across a
I am seeing a strange phenomenon in Visual Studio 2010. My project setup is
I've never worked with percentage layouts. Of course, I already study them, but without
When I try to compile my project from x86 debug mode in Visual Studio
We have a web page that was created in Visual Studio 2008 by a
First, a couple operating parameters: .NET development using Visual Studio 2005/2008 TortoiseSVN client I've

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.