What is the default stack size for VC++6 apps on Windows 2k pro?
-
: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
-
: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
I believe 1MB. John
-
: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
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.
-
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.
:~ 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
-
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.
:~ 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
-
: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
-
:~ 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
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)?