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. What is the default stack size for VC++6 apps on Windows 2k pro?

What is the default stack size for VC++6 apps on Windows 2k pro?

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestiondata-structures
7 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.
  • D Offline
    D Offline
    DengJW
    wrote on last edited by
    #1

    :confused:I am trying to let a media player control play back a movie continuously unless stopped by user, however, after 23 minutes, the application got a "stack overflow" error. Anybody can help on this by giving me some ideas on this and related issues? - "stack overflow" and how the MFC/C++ deal with this? Thanks JW DJ

    J J D 3 Replies Last reply
    0
    • D DengJW

      :confused:I am trying to let a media player control play back a movie continuously unless stopped by user, however, after 23 minutes, the application got a "stack overflow" error. Anybody can help on this by giving me some ideas on this and related issues? - "stack overflow" and how the MFC/C++ deal with this? Thanks JW DJ

      J Offline
      J Offline
      John M Drescher
      wrote on last edited by
      #2

      I believe 1MB. John

      1 Reply Last reply
      0
      • D DengJW

        :confused:I am trying to let a media player control play back a movie continuously unless stopped by user, however, after 23 minutes, the application got a "stack overflow" error. Anybody can help on this by giving me some ideas on this and related issues? - "stack overflow" and how the MFC/C++ deal with this? Thanks JW DJ

        J Offline
        J Offline
        Joe Woodbury
        wrote on last edited by
        #3

        NT/2k/XP have a 1MB stack limit, though I believe it can be extended. However, I can't conceive of a reason to do so. The only reason you would hit this limit are doing huge allocations on the stack with alloca() or other means or you have a recursive function. I'll place bets on the latter. Note, this is an SEH exception (vs. C++ exception) which you can catch and handle to help direct you to the offending code.

        D 2 Replies Last reply
        0
        • J Joe Woodbury

          NT/2k/XP have a 1MB stack limit, though I believe it can be extended. However, I can't conceive of a reason to do so. The only reason you would hit this limit are doing huge allocations on the stack with alloca() or other means or you have a recursive function. I'll place bets on the latter. Note, this is an SEH exception (vs. C++ exception) which you can catch and handle to help direct you to the offending code.

          D Offline
          D Offline
          DengJW
          wrote on last edited by
          #4

          :~ I will be trying to catch and handle the exception. But, for this case, it is not anything codes wrong, I just wanted to use a Media Player Control to play back a movie continuously, or for ever unless stopped. The applicaiton could run about 22 munitues before the expection popped up. For applying Windows Controls, seems I have no way to find out how the Control deal with the Stack. Any more suggestions? THanks JW DJ

          1 Reply Last reply
          0
          • J Joe Woodbury

            NT/2k/XP have a 1MB stack limit, though I believe it can be extended. However, I can't conceive of a reason to do so. The only reason you would hit this limit are doing huge allocations on the stack with alloca() or other means or you have a recursive function. I'll place bets on the latter. Note, this is an SEH exception (vs. C++ exception) which you can catch and handle to help direct you to the offending code.

            D Offline
            D Offline
            DengJW
            wrote on last edited by
            #5

            :~ I will be trying to catch and handle the exception. But, for this case, it is not anything codes wrong, I did not allocate huge blocks on the Stack, nor using recursive functions. I just wanted to use a Media Player Control to play back a movie continuously, or for ever unless stopped. The applicaiton could run about 22 munitues before the expection popped up. For applying Windows Controls, seems I have no way to find out how the Control deal with the Stack. Any more suggestions? THanks JW DJ

            J 1 Reply Last reply
            0
            • D DengJW

              :confused:I am trying to let a media player control play back a movie continuously unless stopped by user, however, after 23 minutes, the application got a "stack overflow" error. Anybody can help on this by giving me some ideas on this and related issues? - "stack overflow" and how the MFC/C++ deal with this? Thanks JW DJ

              D Offline
              D Offline
              DengJW
              wrote on last edited by
              #6

              The exact message for the exception is : Unhandled exception in VTS_01_ALL.exe(MSDXM.ocx):0xC00000FD: Stack Overflow. DJ

              1 Reply Last reply
              0
              • D DengJW

                :~ I will be trying to catch and handle the exception. But, for this case, it is not anything codes wrong, I did not allocate huge blocks on the Stack, nor using recursive functions. I just wanted to use a Media Player Control to play back a movie continuously, or for ever unless stopped. The applicaiton could run about 22 munitues before the expection popped up. For applying Windows Controls, seems I have no way to find out how the Control deal with the Stack. Any more suggestions? THanks JW DJ

                J Offline
                J Offline
                Joe Woodbury
                wrote on last edited by
                #7

                The only reference I could find on the web is that the older control has an unchecked strcpy in it which can overright the stack. This is a third way to overflow the stack: create an artificial recursive function, but it's rare since it usually throws other types of exceptions (though I've had it happen to me.) Could their also be a callback not being handled/exited correctly (it's not these controls have the greatest of documentation for their esoteric aspects)?

                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