Help troubleshoot "Overflow in a dynamically allocated mem"?

Just starting out? Need help? Post your questions and find answers here.
User avatar
skywalk
Addict
Addict
Posts: 4005
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Help troubleshoot "Overflow in a dynamically allocated m

Post by skywalk »

nco2k wrote:check your settings: Preferences -> Debugger -> [ ] Kill Program after an Error.
haha, completely forgot about this setting. :oops:
I have very few memory allocations and they are bounded and free'd when finished.
Like I said, this error pops up randomly after running the worker function in a thread. Previously, no errors.
Your example is clear, and the debugger/purifier calls out the offending line.
But, with my threaded app, I randomly get a nebulous error in the main event loop.

Code: Select all

[12:17:21] Waiting for executable to start...
[12:17:21] Executable type: Windows - x64  (64bit, Unicode, Thread, Purifier)
[12:17:21] Executable started.
[14:36:04] [ERROR] myapp.pb (Line: 8197)
[14:36:04] [ERROR] Overflow in a dynamically allocated memory block.
[14:39:19] Execution continued.

8196    Repeat
8197      evWW = WaitWindowEvent(10)  ;<-- Red error here but why?
8198      If evWW
Not very helpful with 45000 lines of code. :evil:

I am curious about this line?
SignalSemaphore(thr1\signal)
SignalSemaphore() wrote:The semaphore count is limited to a signed 32-bit value, so a maximum of 2147483647 SignalSemaphore() calls can be made without being balanced by WaitSemaphore() calls in between.
Can I query the semaphore count?
What is the error when the max is reached? Overflow or reset of the Semaphore?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply