LB Booster
« Cannot Create Screen Bitmap »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:08am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Cannot Create Screen Bitmap  (Read 858 times)
Mystic
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 53
xx 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.
User IP Logged

- Rick
Mystic
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 53
xx 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?
User IP Logged

- Rick
tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx 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 » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx 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.
« Last Edit: Jun 1st, 2015, 9:31pm by Richard Russell » User IP Logged

Mystic
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 53
xx 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. wink
User IP Logged

- Rick
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Cannot Create Screen Bitmap
« Reply #5 on: Jun 2nd, 2015, 11:43am »

on Jun 1st, 2015, 10:11pm, Mystic wrote:
I'll check my coding

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.
« Last Edit: Jun 2nd, 2015, 11:44am by Richard Russell » User IP Logged

Mystic
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 53
xx 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.
User IP Logged

- Rick
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx 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.
User IP Logged

Mystic
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 53
xx 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>
User IP Logged

- Rick
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx 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.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls