[Cuis-dev] Bitmap size mismatch
Juan Vuletich
juan at cuis.st
Wed Oct 25 10:18:44 PDT 2023
On 10/24/2023 10:34 PM, Vanessa Freudenberg via Cuis-dev wrote:
> Hi all,
>
> I was trying to run Cuis on SqueakJS for fun. The spur images need
> some prims that SqueakJS doesn't have yet, but the v3 image worked. Or
> almost worked. The Transcript was showing tons of errors which made
> the system unusable:
>
> HybridCanvas(MorphicCanvas)>>drawWorld:repair:
>
> BitBIt >> copyBits failed. Will retry with parameters rounded.
> Requested parameters are:
>
> #('dest, source, halftone, rule:' Form(1512x807×32) nil a Bitmap:1
> of length 1 0)
>
> #('dest, extent, source, clipOrigin, clipExtent' 523 at 46 158 at 280
> 0 at 0 0 at 0 681 at 326)
>
> #('colorMap' a Bitmap:4096 of length 4096)
>
> #copyBitsAgain failed. Requested BitBIt operation not performed.
> Call stack follows:
>
> BitBitCanvasEngine(BitBIt)>>copyBitsAgain
>
>
> Turned out the BitBlt failed because some bitmaps were 1 word longer
> than width*height would require, and my (10 year old) version of
> BitBlt complained about that, it expected an exact size match.
>
> I implemented a workaround in my VM which warns about the mismatch but
> doesn't fail the BitBlt primitive. It works now, try it here 🎉
>
> https://tinyurl.com/cuis6053
>
> Cuis on a phone 😍 although not exactly usable there (you could set
> highdpi to false in the URL but then the UI gets huge).
>
> But my question is: Was the image wrong or the VM? I've never seen
> this problem in Squeak images, old or new.
>
> Vanessa
>
> IMG_0FC5A40A0908-1.jpeg
>
Hi Vanessa,
This is very nice, thank you!
WRT the (self wordsPerLine * height) + 1, it is there because of a bug
in VectorEnginePlugin, that could access an invalid position beyond the
end. See senders of #VEPapi5. But as SqueakJS doesn't include the
VectorEnginePlugin, that hack is not needed. Just pushed an update for
that. In order to use it, you'd need to pull repo, start Cuis with an
OpenSmalltalk VM, do World / Changes / Install new updates, then save
the image.
Still, I wonder why the Spur image flavors won't run on SqueakJS. Is
Cuis using some primitive that Squeak doesn't use? (I mean, Spur Squeak
does run on SqueakJS, right?) If so, do you plan to include them? If
not, please tell which they are, I can borrow workaround code for them
from older Cuis, or from Squeak, so Spur Cuis will run on SqueakJS.
Main reason is that in the future I'd like to have a single, immediate,
Unicode ready Character class. Right now Character is the old byte style
from Smalltalk-80, and UnicodeCodePoint is immediate on Spur but not on
V3. I'd like to clean all that.
Thanks!
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20231025/9ebd1c6a/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 88802 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20231025/9ebd1c6a/attachment-0001.jpe>
More information about the Cuis-dev
mailing list