Author |
Topic: Is my SPRITELIB.BBC library corrupted? (Read 737 times) |
|
19Grumpah42
Junior Member
member is offline


Gender: 
Posts: 57
|
 |
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
|
|
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
member is offline


Posts: 1145
|
 |
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.
|
|
Logged
|
|
|
|
19Grumpah42
Junior Member
member is offline


Gender: 
Posts: 57
|
 |
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
|
|
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!).
|
|
|
|