[solved] HTML5 problem with version 3.0.8

Hi

I’m working in a project 100% html5 and after updating to OpenFL 3.0.8 (from 3.0.6) and I’m getting a problem with a sprite where i’m drawing a line. After using the property Sprite.graphics.lineStyle if I add it to the stage it crashes in HTML5, if I add it with alpha 0 it doesn’t crash but it crashes later when I set alpha to 1.

This is the error (BitmapData.hx:1835)

Uncaught TypeError: Cannot read property 'width' of nullopenfl.display.BitmapData.__fromImage @ BitmapData.hx:1835openfl.display.BitmapData.fromCanvas @ BitmapData.hx:692openfl._internal.renderer.canvas.CanvasGraphics.render @ CanvasGraphics.hx:939openfl._internal.renderer.canvas.CanvasShape.render @ CanvasShape.hx:23openfl.display.DisplayObject.$extend.__renderCanvas @ DisplayObject.hx:1146openfl.display.DisplayObjectContainer.$extend.__renderCanvas @ DisplayObjectContainer.hx:844openfl.display.DisplayObjectContainer.$extend.__renderCanvas @ DisplayObjectContainer.hx:860openfl.display.DisplayObjectContainer.$extend.__renderCanvas @ DisplayObjectContainer.hx:860openfl.display.DisplayObjectContainer.$extend.__renderCanvas @ DisplayObjectContainer.hx:860openfl.display.DisplayObjectContainer.$extend.__renderCanvas @ DisplayObjectContainer.hx:860openfl._internal.renderer.canvas.CanvasRenderer.$extend.render @ CanvasRenderer.hx:51openfl.display.Stage.$extend.render @ Stage.hx:969lime.app.Application.$extend.render @ Application.hx:568f @ Keyboard.hx:904lime._backend.html5.HTML5Application.handleUpdateEvent @ HTML5Application.hx:234f @ Keyboard.hx:904`

Is it at least possible to revert to version 3.0.6 before the error occoured?

thanks!

Could should a reproducible sample or code example that I could use to recreate the problem? Thanks!

sure, I’ve created a new empty project and this code breaks it

var sp:Sprite = new Sprite();
sp.graphics.lineStyle(4, 0x6D8DBC);
addChild(sp);

the full project https://dl.dropboxusercontent.com/u/5704466/TestLine.zip

openfl is 3.0.8
lime is 2.4.3
haxe is 3.1.3 (updated now to 3.2 and same result)

Thanks! This is fixed now :smile:

Awesome, it works now!

You are the man @singmajesty!!