Re: [BLACKBOX] TRAP 100 in HostBitmaps.ExportBitmap

From: [at]} <Chris>
Date: Fri, 18 Jan 2013 07:56:11 +1030

----boundary-LibPST-iamunique-130019381_-_-
Content-type: text/plain

> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Thomas
> Sent: Thursday, 17 January 2013 7:54 PM
> To: BLACKBOX{([at]})nowhere.xy
> Subject: [BLACKBOX] TRAP 100 in HostBitmaps.ExportBitmap
>
> I have been having a hard to track problem with the above procedure.
> The trap occurs at the first HALT(100). The res variable gets set to 8
> just before the HALT(100). I suspect a memory leak, the TRAP occurs
> after many (hundreds of) bitmaps have beew processed.
>

I think you are on the right track - WinAPI error #8 is
ERROR_NOT_ENOUGH_MEMORY.

If I were you I'd check the calls to GetDC. You might need to call Release
DC but I can't tell for sure from the following:

"The ReleaseDC function releases a device context (DC), freeing it for use
by other applications. The effect of the ReleaseDC function depends on the
type of DC. It frees only common and window DCs. It has no effect on class
or private DCs."

You will find it in BlackBox in (Win)Api:

  PROCEDURE ReleaseDC* ["USER32.dll", ""] (hWnd: HWND; hDC: HDC): INTEGER;

Regards,
Chris

--
Chris Burrows
CFB Software
Astrobe v4.3: ARM Cortex-M3 Oberon Development System http://www.astrobe.com
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-130019381_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGZiaWRpcyBcZGVmZjB7XGZvbnR0YmwN
CntcZjBcZnN3aXNzIEFyaWFsO30NCntcZjFcZm1vZGVybiBDb3VyaWVyIE5ldzt9DQp7XGYyXGZu
aWxcZmNoYXJzZXQyIFN5bWJvbDt9DQp7XGYzXGZtb2Rlcm5cZmNoYXJzZXQwIENvdXJpZXIgTmV3
O319DQp7XGNvbG9ydGJsXHJlZDBcZ3JlZW4wXGJsd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