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. Stack Overflow Problem

Stack Overflow Problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpdata-structurestutorialquestion
3 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.
  • H Offline
    H Offline
    haris
    wrote on last edited by
    #1

    I am developing a media player,but due to a stack overflow during runtime my whole application crashes...how to tackle this problem. Please help me???:confused: harish software engineer

    K A 2 Replies Last reply
    0
    • H haris

      I am developing a media player,but due to a stack overflow during runtime my whole application crashes...how to tackle this problem. Please help me???:confused: harish software engineer

      K Offline
      K Offline
      Krouer
      wrote on last edited by
      #2

      Use the heap instead of the stack. Did you have a fonction using a array define on the stack like: void myfunction(tatata) { DWORD data[1024]; // 1024*4 bytes allocated on the stack DWORD *pdata = new DWORD[1024]; // 1024*4 bytes allocated on the heap .... } Does that help?

      1 Reply Last reply
      0
      • H haris

        I am developing a media player,but due to a stack overflow during runtime my whole application crashes...how to tackle this problem. Please help me???:confused: harish software engineer

        A Offline
        A Offline
        Alvaro Mendez
        wrote on last edited by
        #3

        Use the debugger. Run your program inside the debugger and before it gets to the stack overflow, open the Debug/Exceptions box and look for the "Stack Overflow" exception. Click on the "Stop always" radio button and then OK. Continue running. When the stack overflow occurs, the program will stop at the point where it's happening. That should give you a clue as to why it's happening and you can then fix it. Good luck, Alvaro

        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