Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. My app crash with no apparent reason?

My app crash with no apparent reason?

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelpquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    josip cagalj
    wrote on last edited by
    #1

    Hi to all. When I run my application and start to work with it, after a while it crashes! Call stack:

    00000000()
    AfxCallWndProc(CWnd * 0x003af188 {CWnd hWnd=0x00020ae4}, HWND__ * 0x00020ae4, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000) line 215 + 26 bytes
    CWnd::SendMessageToDescendants(HWND__ * 0x00020ac6, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2309
    CWnd::SendMessageToDescendants(HWND__ * 0x00020ac8, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2320
    CWnd::SendMessageToDescendants(HWND__ * 0x000d09fc, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2320
    CWnd::SendMessageToDescendants(HWND__ * 0x0008099e, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2320
    CWnd::SendMessageToDescendants(unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 146 + 32 bytes
    CServisiApp::OnIdle(long 0x00000000) line 3694
    CWinThread::Run() line 472 + 30 bytes
    CWinApp::Run() line 400
    AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00151f0b, int 0x00000001) line 49 + 11 bytes
    WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00151f0b, int 0x00000001) line 30
    WinMainCRTStartup() line 330 + 54 bytes
    KERNEL32! 7c817077()

    The error I get is: "First-chance exception in MyApp.exe: 0xC0000005: Access Violation." Any clue? Win XP, VC 6 Thanks!

    _ 1 Reply Last reply
    0
    • J josip cagalj

      Hi to all. When I run my application and start to work with it, after a while it crashes! Call stack:

      00000000()
      AfxCallWndProc(CWnd * 0x003af188 {CWnd hWnd=0x00020ae4}, HWND__ * 0x00020ae4, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000) line 215 + 26 bytes
      CWnd::SendMessageToDescendants(HWND__ * 0x00020ac6, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2309
      CWnd::SendMessageToDescendants(HWND__ * 0x00020ac8, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2320
      CWnd::SendMessageToDescendants(HWND__ * 0x000d09fc, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2320
      CWnd::SendMessageToDescendants(HWND__ * 0x0008099e, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2320
      CWnd::SendMessageToDescendants(unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 146 + 32 bytes
      CServisiApp::OnIdle(long 0x00000000) line 3694
      CWinThread::Run() line 472 + 30 bytes
      CWinApp::Run() line 400
      AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00151f0b, int 0x00000001) line 49 + 11 bytes
      WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00151f0b, int 0x00000001) line 30
      WinMainCRTStartup() line 330 + 54 bytes
      KERNEL32! 7c817077()

      The error I get is: "First-chance exception in MyApp.exe: 0xC0000005: Access Violation." Any clue? Win XP, VC 6 Thanks!

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      You should have realized that this is the right time to add some log/traces/Messageboxes at places where you "expect"(blind guess-depends on how much steps in your application have executed already) your application to crash. Also read about the first chance exception handling mechanism here[^] and here[^]

      You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_

      J 1 Reply Last reply
      0
      • _ _AnsHUMAN_

        You should have realized that this is the right time to add some log/traces/Messageboxes at places where you "expect"(blind guess-depends on how much steps in your application have executed already) your application to crash. Also read about the first chance exception handling mechanism here[^] and here[^]

        You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_

        J Offline
        J Offline
        josip cagalj
        wrote on last edited by
        #3

        I'm aware of this. The thing is there's no pattern when my app will crash, some times on this occasion and on second run on that. No relationship between?! That's what bugging me!

        D 1 Reply Last reply
        0
        • J josip cagalj

          I'm aware of this. The thing is there's no pattern when my app will crash, some times on this occasion and on second run on that. No relationship between?! That's what bugging me!

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          josip cagalj wrote:

          The thing is there's no pattern when my app will crash, some times on this occasion and on second run on that. No relationship between?!

          But you should still add some gratuitous "logging" code to help narrow it down. Try and remove (unnecessary) parts of your code until the crash subsides. There is no "silver bullet" for this. Roll up your sleeves and get dirty.

          "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          J 1 Reply Last reply
          0
          • D David Crow

            josip cagalj wrote:

            The thing is there's no pattern when my app will crash, some times on this occasion and on second run on that. No relationship between?!

            But you should still add some gratuitous "logging" code to help narrow it down. Try and remove (unnecessary) parts of your code until the crash subsides. There is no "silver bullet" for this. Roll up your sleeves and get dirty.

            "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            J Offline
            J Offline
            josip cagalj
            wrote on last edited by
            #5

            Yes so I did. Found out the thing causing the problem. You see I inherited this app from an colleague from work he had slight different control then my own (it's work internal control we use). When overwritten, all worked OK. The thing causing the problem is when called OnIdle message notifies some wnd's of an idle time, and some of those aren't wnd at all!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups