Author |
Topic: Cannot Create Screen Bitmap (Read 859 times) |
|
Mystic
Junior Member
member is offline
Gender:
Posts: 53
|
|
Cannot Create Screen Bitmap
« Thread started on: Jun 1st, 2015, 7:09pm » |
|
One of my users is getting an error window when he attempts to run my latest program.
The window title is "BBCWin"
And the error is "Cannot create screen bitmap"
As far as I know my program is not trying to open a bitmap.
I'm pinging my user now for additional info that might be different then my beta-testers computers. Like if he is running 64-bit or Windows 8.
|
|
Logged
|
- Rick
|
|
|
Mystic
Junior Member
member is offline
Gender:
Posts: 53
|
|
Re: Cannot Create Screen Bitmap
« Reply #1 on: Jun 1st, 2015, 7:24pm » |
|
The user installed it into a fresh directory and that seemed to fix the issue.
Not sure if he had a bunch of other programs open also and rebooted then tried it or whatever...
Guess it'll remain a mystery unless I can recreate it.
Found an answer from Richard or the Yahoo message bored which helped explain it a little, but not sure if I can find if the culprit is my program or another program causing the issue.
Any way to write a program to see what programs are opening what bitmap windows?
|
|
Logged
|
- Rick
|
|
|
tsh73
Full Member
member is offline
Gender:
Posts: 210
|
|
Re: Cannot Create Screen Bitmap
« Reply #2 on: Jun 1st, 2015, 7:34pm » |
|
I have this issue with a computer at work, with 1Gb RAM under XP. First after reboot it works - but I let it work for week(s) - literally until it dies - and some program obviously leaks some special kind of memory no other program but LBB needs. Then LBB refuses to start with ("Cannot create screen bitmap") - more exactly, IDE starts, but starting any program from LBB fails. At least this sticks in my head as Richard words - but I cannot find it. Hope he can chime on it and correct me.
EDIT found it at Yahoo group https://groups.yahoo.com/neo/groups/lbb/conversations/topics/769
|
« Last Edit: Jun 1st, 2015, 7:40pm by tsh73 » |
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Cannot Create Screen Bitmap
« Reply #3 on: Jun 1st, 2015, 9:12pm » |
|
on Jun 1st, 2015, 7:09pm, Mystic wrote:And the error is "Cannot create screen bitmap" |
|
Check Task Manager. This is a classic symptom of not correctly closing a program, but leaving it running 'invisibly' in the background. Then each time you run a new copy, you add another instance. Eventually you run out of resources and an error results.
In 'modern' versions of Windows you will probably be able to run hundreds of copies before an error results, but I would guess that the machine which produces this error is running Windows 2000 or XP. In those versions of Windows only a relatively small amount of memory is made available for bitmaps and you may get the error with only a dozen or so copies running.
A temporary fix is to reboot the machine, because that will shut down all the processes and free the bitmap memory. But the only long-term solution is to correct the fault in your code which is leaving a 'zombie' process running (commonly this will be omitting a trapclose).
Richard.
|
|
|
|
Mystic
Junior Member
member is offline
Gender:
Posts: 53
|
|
Re: Cannot Create Screen Bitmap
« Reply #4 on: Jun 1st, 2015, 10:11pm » |
|
Thanks for the quick replies!
I'll check my coding and also have the offending user check their task manager for possible faulty programs.
|
|
Logged
|
- Rick
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Cannot Create Screen Bitmap
« Reply #5 on: Jun 2nd, 2015, 11:43am » |
|
on Jun 1st, 2015, 10:11pm, Mystic wrote: Just to add that Anatoly is of course right in saying that it could be another program at fault rather than yours, but I think that's relatively unlikely. Either way I would expect Task Manager to reveal the culprit.
LB doesn't trigger the same issue because its mainwin is a text-only window, but LBB's mainwin is graphics-capable so is backed by a bitmap:
Code:print "This is the mainwin"
!CIRCLE 400,400,100 Richard.
|
|
|
|
Mystic
Junior Member
member is offline
Gender:
Posts: 53
|
|
Re: Cannot Create Screen Bitmap
« Reply #6 on: Jun 2nd, 2015, 3:01pm » |
|
I've been running Task manager and the Resource Monitor while working with my program and it appears to be working as advertised.
Not seeing anything left open when the program closes, etc...
Since it has only happened with one of my users so far I'm guessing he must have something running on his machine that's interfering.
Thanks for all the idea though for things to check.
|
|
Logged
|
- Rick
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Cannot Create Screen Bitmap
« Reply #7 on: Jun 2nd, 2015, 3:33pm » |
|
on Jun 2nd, 2015, 3:01pm, Mystic wrote:I'm guessing he must have something running on his machine that's interfering. |
|
It's possible, but surprising. If a single application is allocating so much bitmap memory - it would need to be 100 Mbytes or more to have that effect - yours is unlikely to be the only program adversely impacted.
Have you confirmed that he's running XP? I would not expect the error to happen on later versions of Windows, which can make available much larger amounts of memory for bitmaps.
Richard.
|
|
Logged
|
|
|
|
Mystic
Junior Member
member is offline
Gender:
Posts: 53
|
|
Re: Cannot Create Screen Bitmap
« Reply #8 on: Jun 2nd, 2015, 4:12pm » |
|
All of our work systems are Windows 7 at the moment. I joked with him about running XP, but he is not. This is happening on a Windows 7 machine.
The program has been sent out to about 50 people, and so far he was the only one with a problem, so I'm guessing it's something in the way he has his machine configured.
Maybe he's one of these guys that keeps 100 programs running in the background. <shrug>
|
|
Logged
|
- Rick
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Cannot Create Screen Bitmap
« Reply #9 on: Jun 2nd, 2015, 5:31pm » |
|
on Jun 2nd, 2015, 4:12pm, Mystic wrote:This is happening on a Windows 7 machine. |
|
That's surprising, and might indicate a graphics card/driver issue (my understanding is that the graphics driver is given an opportunity to allocate the bitmap in video memory if available; there is a detailed discussion here). It might be worth checking that the graphics driver is up-to-date.
To put things into perspective, the bitmap that LBB tries to allocate is about 8 Mbytes in size, so even if the system imposed a limit of 256 Mbytes (and in my tests Windows 7 usually doesn't) you could still run about 30 simultaneous LBB programs without hitting the limit.
Incidentally is the machine in question running 32-bits or 64-bits Windows 7? If in doubt, run this program:
Code: if isWin64() then
print "64-bit Windows"
else
print "32-bit Windows"
end if
end
function isWin64()
struct p64, yes as long
calldll #kernel32, "IsWow64Process", _
-1 as long, p64 as struct, r as long
isWin64 = p64.yes.struct
end function Richard.
|
|
Logged
|
|
|
|
|