locked
VS2019 - my program crashes RRS feed

  • Question

  • I wrote a basic 3D CAD program some 20 years ago in VC++ MFC using OpenGL. I had some issues every time I moved to a new Visual Studio. Last port was to VS2015 a year ago, and I fixed some x64 problem associated with OpenGL's uint. I fixed it and it was working fine in x64 build. Now, I used this free VS2019 community version for the first time, and it did build OK, but after an initial OpenGL screen display (I can rotate and pan), when I try to create a new point display, it crashes. It may be some memory corruption based on the strange behavior of the crash. 

    Exception thrown at 0x00007FFE2D051B7A (ig9icd64.dll) in G.exe: 0xC0000005: Access violation reading location 0x00000000000000E0

    My CAD program is simple but fairly large and this bug is so difficult to find ... Is there anything I have to do to move up to VS2019? Again, it was working ok in VS2015 (I do not have VS2015 to retest).

     
    Wednesday, June 3, 2020 5:58 AM

All replies

  • Hello,

    as far as I found out, the ig9icd64.dll access violation is well known for Intel graphics drivers. You should update the graphics driver.

    You say the bug is "hard to find". Do you mean, when you debug your code, the exception is thrown at different locations in the code or only some times, not every time? You should run your program in debug mode, and when the access violation comes, check the call stack. You should find the source code line which raises the exception. Which function call is "crashing"?

    Since your problem is an OpenGL issue, I suggest you to ask in an OpenGL forum, e.g. https://stackoverflow.com/questions/tagged/opengl

    If you think it is a Visual Studio problem, then send a problem feedback through your Visual Studio to Microsoft (Help menu -> Send Feedback -> Report a problem)

    Regards, Guido


    Wednesday, June 3, 2020 6:14 AM
  • Hi,

    Thank you for posting here.

    According to your issue , I suggest you should ask it in a OpenGL Community Forums. And this thread will be moved to Off-Topic Posts.

    Best Regards,

    Jeanine Zhang



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, June 3, 2020 7:18 AM
  • Thank you for the driver update suggestion...

    My crash is pretty consistent, happens all the time (not sometimes). The exception is thrown at an OpenGL call. To make sure, I called glFlush(). It crashes at glCallList to execute the OpenGL display list. But I do not have to use the display list; I can cause the same crash by calling individual OpenGL draw routines. Not calling some OpenGL draw at the program start prevents this crash once, but the next point causes the crash...

    A year ago, I fixed some x64 issue where I was using a "this" pointer as an input to an OpenGL API that takes an UINT. I resolved this issue then on VS2015. But then, this time on VS2019, the crash happens on both win32 and x64, so this may be totally different issue.... but still seems to be crashing at OpenGL api...

    Wednesday, June 3, 2020 8:08 AM
  • My crash is pretty consistent, happens all the time (not sometimes). The exception is thrown at an OpenGL call. To make sure, I called glFlush(). It crashes at glCallList to execute the OpenGL display list.

    But then, this time on VS2019, the crash happens on both win32 and x64, so this may be totally different issue.... but still seems to be crashing at OpenGL api...

    Ok.

    I'm sorry I don't know OpenGL. You should ask in an OpenGL forum, e.g.

    https://www.gamedev.net/forums/forum/5-graphics-and-gpu-programming/

    https://stackoverflow.com/questions/tagged/opengl

    https://community.khronos.org/c/opengl-general/34

    Regards, Guido

    Wednesday, June 3, 2020 9:27 AM
  • I am still working on this issue of my VC++ MFC OpenGL-based CAD suddenly crashing with access violation in some simple scenario on VS2019 using my DELL PC (was OK on VS2015 on a company PC) .... 

    I am thinking maybe this is related to my PC (or driver)... I am using DELL Inspiron 15 core7. This does not have a graphic accelerator.

    Now my question: If I want to test my CAD program on other PCs, can I just copy MyCad.exe and all the DLLs I have in my program onto a USB stick and run it on some other test PC (Windows 10)? Do I need to provide OpenGL dlls? Does this PC have to have Visual Studio 2019 installed? 



    • Edited by mh1000 Monday, June 8, 2020 8:48 PM
    Monday, June 8, 2020 8:28 PM
  • Now my question: If I want to test my CAD program on other PCs, can I just copy MyCad.exe and all the DLLs I have in my program onto a USB stick and run it on some other test PC (Windows 10)? Do I need to provide OpenGL dlls? Does this PC have to have Visual Studio 2019 installed? 



    As long as your programme mustn't be installed for path and registry reasons, you can copy the exe and all used dlls into the same directory on another PC. If you use OpenGL dlls, then you must provide these dlls too. You don't have to install VS 2019. If you need the dlls, install the redistributable package of VS 2019.

    Regard, Guido

    Tuesday, June 9, 2020 5:56 AM