BBC BASIC for Windows
« Is my SPRITELIB.BBC library corrupted? »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:28pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Is my SPRITELIB.BBC library corrupted?  (Read 738 times)
19Grumpah42
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 57
xx Is my SPRITELIB.BBC library corrupted?
« Thread started on: Oct 29th, 2009, 5:39pm »

"All at once" I am getting 0 returns from FN_initsprites(2), in my programme and in the provided demo SPRITES.BBC, so I wonder whether the lib file is corrupted. {Utilities}{List Variables} shows that the two FN and PROCs are loaded.

The md5 value for my current SPRITES.BBC file is

73fcfb63bba0da08ddcd13b26706fc2c

Is there some place I can just download a new version of the LIB?
--Grahame
User IP Logged

C-2-Q 3GB, C-2-Duo 2GB, both GeForce 9500 GT, WinXP sp3. Two Linux Ubuntu boxes (rock solid, lean and mean, but they won't run BB4W!).
admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Is my SPRITELIB.BBC library corrupted?
« Reply #1 on: Oct 29th, 2009, 9:19pm »

Quote:
I wonder whether the lib file is corrupted

BB4W libraries are just regular (tokenised) BASIC program files, so it's very easy to check for corruption simply by loading them into the editor. It's extremely unlikely that file corruption could cause the symptom you described anyway.

If you look at the code of SPRITELIB you'll see that the only condition under which FN_initsprites() returns zero is when CreateCompatibleBitmap fails. Therefore it's very likely that the problem is that your kernel memory has become fragmented, or a memory leak has resulted in it being almost entirely exhausted, resulting in there being insufficient space to allocate a 1600x1200 bitmap (around 7 Mbytes).

Quote:
Is there some place I can just download a new version of the LIB?

No. In the unlikely event of needing to replace a file just re-install from the Setup.exe or UPGRADE.EXE from which you last installed (and hopefully kept!).

Given the likely cause of the problem (kernel memory) the solution is to reboot your PC. Afterwards you might want to check whether you're doing anything wrong which could have caused the problem (something that definitely will is calling FN_initsprites without later calling PROC_exitsprites).

Richard.
User IP Logged

19Grumpah42
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 57
xx Re: Is my SPRITELIB.BBC library corrupted?
« Reply #2 on: Nov 1st, 2009, 7:07pm »

Thanks Richard. Yes, the problem went away when I re-booted after a MS "update". I think I too suffer from memory leakage these days, probably no simple cure for that!
--G
User IP Logged

C-2-Q 3GB, C-2-Duo 2GB, both GeForce 9500 GT, WinXP sp3. Two Linux Ubuntu boxes (rock solid, lean and mean, but they won't run BB4W!).
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