none
CListCtrl access violation started after years of use RRS feed

  • Question

  • I have a CListCtrl on a dialog form that has been working in application for ages.

    Today I was informed that the application was failing, and subsequently I confirmed the problem on my Windows 10 PC.
    Running in Visual Studio 2013 getting following in debug:
    First-chance exception at 0x6f53b100 in DebtMan.exe: 0xC0000005: Access violation writing location 0x0000022d.

    Looks like its an access violation in ComCtrl32.dll.

    It works fine till 5-20 secs after the List/report is loaded and then the exception is thrown.

    Also get same problem in another project which was built from Dialog App framework in Visual Studio 2013 which is under development.

    Any suggestions appreciated.
    Thanks
    Arnie

    Friday, May 6, 2016 7:50 AM

Answers

  • The problem is fixed by running application with XP Service pack 3 compatibility which is OK for the time being.    I've raised the issue with Microsoft and they have the Test Dialogue app - the link is:

    connect.microsoft.com /VisualStudio/feedback/details/2688645/clistctrl-access-violation

    (I cant post a link so you will have to append hpps://  manually. Ahh!)

    Hopefully they can come up with a better fix.

     thanks

    Wednesday, May 11, 2016 7:58 AM

All replies

  • I have a CListCtrl on a dialog form that has been working in application for ages.

    Today I was informed that the application was failing, and subsequently I confirmed the problem on my Windows 10 PC.
    Running in Visual Studio 2013 getting following in debug:
    First-chance exception at 0x6f53b100 in DebtMan.exe: 0xC0000005: Access violation writing location 0x0000022d.

    Looks like its an access violation in ComCtrl32.dll.

    What do you see when you follow the call stack back into your own code?

    David Wilkinson | Visual C++ MVP

    Friday, May 6, 2016 9:56 AM
  • Hi,

    The application unexpectedly crashes and debugger opens in appmodul.cpp at  line 26:

    #pragma

    warning(suppress: 4985)

    {

    // call shared/exported WinMain

    returnAfxWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow);

    } Stops here

    Call Stack:

      comctl32.dll!6f53b100()  
      [Frames below may be incorrect and/or missing, no symbols loaded for comctl32.dll] 
      comctl32.dll!6f55a3c5()  
      comctl32.dll!6f55a8bb()  
      comctl32.dll!6f56046d()  
      mfc120ud.dll!00bbff07()  
      mfc120ud.dll!00bc003d()  
      user32.dll!76a484f3()  
      user32.dll!76a26c40()  
      user32.dll!76a26b18()  
      user32.dll!76a269d7()  
      mfc120ud.dll!0102ae23()  
      mfc120ud.dll!0103556d()  
      mfc120ud.dll!010276fb()  
      mfc120ud.dll!010286f5()  
      mfc120ud.dll!00d92ffd()  
      user32.dll!76a484f3()  
      user32.dll!76a26c40()  
      user32.dll!76a26b18()  
      user32.dll!76a26820()  
      user32.dll!76a2d169()  
      ntdll.dll!77098e56()  
      mfc120ud.dll!00ffa8e8()  
      mfc120ud.dll!00ffbdb3()  
      mfc120ud.dll!00ffbe84()  
      mfc120ud.dll!00e8428c()  
      mfc120ud.dll!0106d964()  
    > DebtMan.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow)  Line 26 C++
      DebtMan.exe!__tmainCRTStartup()  Line 618 + 0x15 bytes C
      DebtMan.exe!wWinMainCRTStartup()  Line 466 C
      kernel32.dll!74fb38f4()  
      ntdll.dll!77085de3()  
      ntdll.dll!77085dae()  

    Thanks

    Arnie

    Friday, May 6, 2016 10:51 AM
  • The application unexpectedly crashes and debugger opens in appmodul.cpp at  line 26:

    // ..

    Not much to go on there...

    What happens if you go to Debug Menu/Exceptions/Win32 Exceptions and specify to break when access violation exception is thrown

    What are you actually doing that causes the program to crash?


    David Wilkinson | Visual C++ MVP

    Friday, May 6, 2016 2:18 PM
  • The program loads and fills up the two report controls, then after 5 - 15 secs with no user input it breaks all on its own. I've turned off all the other threads so none of my stuff is running and that's made no difference.

    I've checked its breaking on the exceptions as you suggest but there is no more info to identify the line of code .

    After the Access Violation continuing, immediately get:

    Unhandled exception at 0x6f53b100 in DebtMan.exe: 0xC000041D: 0xC000041D: An unhandled exception was encountered during a user callback.

    However I've checked none of the User callbacks are being called.

        

    Friday, May 6, 2016 3:10 PM
  • Does the crash occur if you build with static MFC libs?  If so, is the call stack more informative?
    Friday, May 6, 2016 3:24 PM
  • Good suggestion - much better call stack info - but time to go now its Friday evening!
    Friday, May 6, 2016 5:33 PM
  • The program loads and fills up the two report controls, then after 5 - 15 secs with no user input it breaks all on its own. I've turned off all the other threads so none of my stuff is running and that's made no difference.

    Does it still fail if you do not load the controls?

    I am disturbed by the mention of other threads. Are you sure tehse threads are not running? Accessing MFC controls across threads is a prime candidate for program failure.


    David Wilkinson | Visual C++ MVP

    Friday, May 6, 2016 6:50 PM
  • Its OK if controls are not loaded. Its 5-20 secs after the second List is loaded that it crashes.

    No other threads are running, and yes I've had problems before accessing MFC across threads so I don't do that now!

    To investigate this I've made a simple Dialogue TEST project from scratch, with 2 list controls, each with 2 columns, with first loaded in OnInitDialog().

    Second is loaded by pressing button - and 5-20 secs later it crashes in same way.

    However if I make it an x64 bit application it works fine!

    I've checked everything is upto date - I'm running MS Visual Studio Professional 2013, Ver 12.0.40629.00 Update 5.

    Office 2010 Service Pack 2 - 32Bit Edition was automatically applied last week (along with some other KB updates) and it would appear that after that the problem started. I've tried uninstalling it but I'm getting - Unknown Error - The update was not installed. So i'm wondering if there was a problem with that update.

    Any suggestions appreciated.

    Thanks

    Arnie

    Monday, May 9, 2016 12:00 PM
  • Install VS 2013 Service Pack1 and simply add some  crash dump code inside your app , and then use windbg to analyze your dmp file . It will be quick and easy as well.

    Thanks


    Rupesh Shukla

    Monday, May 9, 2016 4:42 PM
  • I've made a dump, and reported the issue via the Visual Studio reporting option using same title as above.

    Thanks for all the suggestions.

    Tuesday, May 10, 2016 9:16 AM
  • I've made a dump, and reported the issue via the Visual Studio reporting option using same title as above.

    Thanks for all the suggestions.

    What is the actual issue as per dmp file.

    Regards

    Rupesh Shukla


    Rupesh Shukla

    Tuesday, May 10, 2016 1:42 PM
  • The problem is fixed by running application with XP Service pack 3 compatibility which is OK for the time being.    I've raised the issue with Microsoft and they have the Test Dialogue app - the link is:

    connect.microsoft.com /VisualStudio/feedback/details/2688645/clistctrl-access-violation

    (I cant post a link so you will have to append hpps://  manually. Ahh!)

    Hopefully they can come up with a better fix.

     thanks

    Wednesday, May 11, 2016 7:58 AM
  • Hi,

    Thank you for sharing the link.

    Best Regards,

    Hart


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Friday, May 13, 2016 6:25 AM
    Moderator
  • We are having the same problem with our app on Windows10... it only happens when more that one list control is shown. I add another crash dump to your connect posting. hope that helps get a quicker answer.

    Did your workaround work with XP Service Pack 3 compatibility only? Would it work with Win7 compatibility?

    Wednesday, May 18, 2016 1:39 AM
  • Issue maybe due to AVG anti-virus.. see these posts on the AVG forums

    https://support.avg.com/answers?id=906b0000000XasLAAS
    https://support.avg.com/answers?id=906b0000000XbpNAAS
    • Proposed as answer by OneMoreTry Thursday, May 19, 2016 5:53 PM
    Thursday, May 19, 2016 5:53 PM