vm crash from BalloonEngine (maybe B2DPlugin or BitBltPlugin)
In order to reproduce it, draw a rectangle with radial gradient fill, with direction and normal, both of length 1. This one works (no vm crash): |form canvas fill direction normal| direction := 1@0. normal := 0@0. form := Form extent:300@300 depth:32. canvas := form getCanvas. fill := GradientFillStyle new colorRamp:{0 -> Color white . 0.5 -> Color green . 1 -> Color blue};origin:150@150 ;direction:direction;normal:normal;radial:true;yourself. canvas fillRectangle: (50@50 extent:200@200) fillStyle: fill. Display getCanvas drawImage: form at: 300@300. direction := 1@0. normal := 0@0. -> OK direction := 0@0. normal := 0@1. -> OK direction := 1@0. normal := 0@1. -> VM-Crash (Pharo and Squeak) Pharo: VM Version: Cog VM 4.0.0 (release) from Feb 16 2015 Compiler: gcc 4.6.2 Interpreter Build: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.21 uuid: 4d9b9bdf-2dfa-4c0b-99eb-5b110dadc697 Feb 16 2015 Cogit Build: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.21 uuid: 4d9b9bdf-2dfa-4c0b-99eb-5b110dadc697 Feb 16 2015 Source Version: https://github.com/pharo-project/pharo-vm.git Commit: 55fbd0b0279998a4a33852f5afb3d213986cc3ae Date: 2015-02-16 17:54:00 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #14895 Current byte code: -1 Primitive index: 117 Smalltalk stack dump: 0x24c830 M BalloonEngine>copyLoopFaster 0x6b09b80: a(n) BalloonEngine 0x24c848 M BalloonEngine>copyBits 0x6b09b80: a(n) BalloonEngine 0x24c860 M BalloonEngine>postFlushIfNeeded 0x6b09b80: a(n) BalloonEngine 0x24c884 I BalloonEngine>drawRectangle:fill:borderWidth:borderColor:transform: 0x6b09b80: a(n) BalloonEngine 0x24c8b8 I BalloonCanvas>drawRectangle:color:borderWidth:borderColor: 0x6b099c0: a(n) BalloonCanvas 0x24c8e8 I BalloonCanvas>fillRectangle:basicFillStyle: 0x6b099c0: a(n) BalloonCanvas Squeak: VM Version: Cog VM 4.0.0 (release) from Aug 22 2013 Compiler: gcc 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) Interpreter Build: CoInterpreter VMMaker.oscog-eem.331 uuid: 37d2e4b0-2f37-4e2d-8313-c63637785e59 Aug 22 2013 Cogit Build: StackToRegisterMappingCogit VMMaker.oscog-eem.333 uuid: 84da9cb8-7f30-4cb7-b4fb-239a11f63b54 Aug 22 2013 Source Version: VM: r2776 http://www.squeakvm.org/svn/squeak/branches/Cog Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins Current byte code: -1 Primitive index: 117 nicolai
On Wed, Apr 08, 2015 at 05:33:20PM +0200, Nicolai Hess wrote:
In order to reproduce it, draw a rectangle with radial gradient fill, with direction and normal, both of length 1.
This one works (no vm crash): |form canvas fill direction normal| direction := 1@0. normal := 0@0. form := Form extent:300@300 depth:32. canvas := form getCanvas. fill := GradientFillStyle new colorRamp:{0 -> Color white . 0.5 -> Color green . 1 -> Color blue};origin:150@150 ;direction:direction;normal:normal;radial:true;yourself. canvas fillRectangle: (50@50 extent:200@200) fillStyle: fill. Display getCanvas drawImage: form at: 300@300.
direction := 1@0. normal := 0@0. -> OK
direction := 0@0. normal := 0@1. -> OK
direction := 1@0. normal := 0@1. -> VM-Crash (Pharo and Squeak)
The VM crash is happening in primitiveRenderScanline in B2DPlugin, called from BalloonEngine>>primRenderScanline:with: This probably indicates that a bounds check needs to be added to the primitive, although I expect that there also is something in the image that is allowing the primitive to be called with unreasonable parameters. Dave
participants (2)
-
David T. Lewis -
Nicolai Hess