View previous topic :: View next topic |
Author |
Message |
xander_P
Joined: 11 Sep 2006 Posts: 10
|
Posted: Wed Sep 20, 2006 1:17 pm Post subject: CreateCompatibleBitmap Failure |
|
|
During the process of coding/debugging my program, I sometimes fubar up my code enough that I seem to cause problems for DPLOT. When this happens I get a messagebox from DPLOTJR saying "In CopyBitmap, CreateCompatibleBitmap failed with width=973, height=733".
Now I don't know exactly how I cause this to happen, it seems to happen sometimes when I exit my program abruptly and then start it back up. Anyway that is all my problem. Unfortunately though, once this error message pops up, the only was I can get DPLOTJR to work again is to restart my machine. I've tried killing the DPLOTJR.EXE process, and restarting VB6. But it doesn't help.
Basically I am hoping to get some insight into why DPLOTJR reports this error, so that I may be able to track down what is happening on my side. Also if there is a command, or a method, I could use to reset DPLOTJR to work again, that would be nice to know about.
Any help would be appreciated,
xander |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Wed Sep 20, 2006 1:56 pm Post subject: |
|
|
Quote: | I get a messagebox from DPLOTJR saying "In CopyBitmap, CreateCompatibleBitmap failed with width=973, height=733". |
The error is unrelated to anything you've done with DPlot, it simply indicates that your system was unable to create a blank bitmap of those dimensions. That most likely indicates that you're severely low on memory, possibly (probably?) because you've already created (but not destroyed) too many graphic objects (in particular bitmaps).
If you're running into this problem after many calls to any of the functions that create/return a bitmap (DPlot_GetBitmap, DPlot_GetBitmapEx, DPlot_PlotBitmap, DPlot_PlotBitmap8), check to make sure that you're eventually deleting those bitmaps with DeleteObject. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
xander_P
Joined: 11 Sep 2006 Posts: 10
|
Posted: Wed Sep 20, 2006 2:12 pm Post subject: |
|
|
Ahh, thanks. I am using a timer to constantly display the bitmaps of a moving spectrum. I am using the DeleteObject before I draw the next one. But I am stopping my program at various breakpoints, so it may not get to delete the bitmap eveytime, thus by the end of the day I've used up too much memory.
I have been able to clear up the issue by killing my programs processes, and I would assume, as a result freeing up the memory the bitmaps were using. I'll have to keep an eye out to make sure I don't have a memory leak somewhere else, and that it is really is caused by my debug process. Anyway thanks again for the help. As always your support for this product is excellent. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|