locked
Any one of you encountered "fatal error C1001: An internal error has occurred in the compiler"

    Question

  • I got this error while playing with DirectX Metro App. I modified a constructor and I got this error and I put back the old code, I still get this error. Let me know if you encountered this issue and resolved it.

    Thanks

    PB

    --------------------- Error Message ----------------------------------------------------------

     

    fatal error C1001: An internal error has occurred in the compiler.

    1> (compiler file 'msc1.cpp', line 1435)

    1> To work around this problem, try simplifying or changing the program near the locations listed above.

    1> Please choose the Technical Support command on the Visual C++

    1> Help menu, or open the Technical Support help file for more information

    1> INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe'

    1> Please choose the Technical Support command on the Visual C++

    1> Help menu, or open the Technical Support help file for more information

    Tuesday, October 11, 2011 6:49 PM

Answers

  • This appears to be an r-on-the-stack problem - definitely a compiler bug.

    Try changing m_renderer to be a D2DRenderer^ instead of a no-hat D2DRenderer.  You'll have to modify the ctor initializer list to be m_renderer(ref new D2DRenderer(window)) and change usages of m_renderer to be -> instead of . but overall that should work around this problem for you.

    C1001's can be hard to track down; if you look at the line number in the output window it can give you a clue as to where your problem lies.  (This is how I figured it out.)

    Thanks,

    Andy Rich
    Visual C++ QA

    • Marked as answer by __PB Friday, October 14, 2011 10:23 PM
    Friday, October 14, 2011 10:20 PM

All replies

  • Hi PB,

    Could you post the code snippet?

    Thanks


    Boris Jabes, Visual C++ IDE
    Tuesday, October 11, 2011 10:14 PM
  • I do not think code snippet can help you. I can upload whole solution, what is the best way to do that.

     

    PB

    Tuesday, October 11, 2011 10:47 PM
  • Would you mind e-mailing it to me?

     

    sharma dot raman at microsoft

    Thursday, October 13, 2011 2:55 AM
  • This appears to be an r-on-the-stack problem - definitely a compiler bug.

    Try changing m_renderer to be a D2DRenderer^ instead of a no-hat D2DRenderer.  You'll have to modify the ctor initializer list to be m_renderer(ref new D2DRenderer(window)) and change usages of m_renderer to be -> instead of . but overall that should work around this problem for you.

    C1001's can be hard to track down; if you look at the line number in the output window it can give you a clue as to where your problem lies.  (This is how I figured it out.)

    Thanks,

    Andy Rich
    Visual C++ QA

    • Marked as answer by __PB Friday, October 14, 2011 10:23 PM
    Friday, October 14, 2011 10:20 PM
  • Thanks Andy, will try that.
    Friday, October 14, 2011 10:23 PM