Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Shape:setFillStyle() crashing on Android without matrix as third argument — Gideros Forum

Shape:setFillStyle() crashing on Android without matrix as third argument

In my pre-release testing using Gideros 2023.7 I'm seeing a crash when calling Shape:setFillStyle() without the third argument, an optional transformation matrix. Passing in Matrix.new() as a third argument seems to prevent it. The crash also happens on Android, but not on Windows.


  • MoKaLuxMoKaLux Member
    edited August 2023
    Hi PaulH I don't seem to have an issue with this on my android phone :|
    I use this code for example:
    	-- image
    	local img = Shape.new()
    	img:setLineStyle(params.shapelinewidth, params.shapelinecolor, params.shapelinealpha) -- (width, color, alpha)
    	if params.texpath then
    		local tex
    		if not params.istexpot then
    			tex = Texture.new(params.texpath, false, {wrap = Texture.REPEAT, extend = false})
    			tex = Texture.new(params.texpath, false, {wrap = Texture.REPEAT})
    		local skewanglex = math.rad(params.skewx)
    		local skewangley = math.rad(params.skewy)
    		local matrix = Matrix.new(params.scalex, math.tan(skewanglex), math.tan(skewangley), params.scaley, 0, 0)
    		img:setFillStyle(Shape.TEXTURE, tex, matrix) --> OK
    		tex = nil
    	elseif params.color then
    		img:setFillStyle(Shape.SOLID, params.color) --> OK
    		img:setFillStyle(Shape.NONE) --> OK
    You can see three use case for setFillStyle and no crash so far using latest Gideros 2023.7 :|
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    Accepted Answer
    I spotted the bug, it must have been there for years. I will fix it tomorrow.

    Likes: MoKaLux, PaulH

    +1 -1 (+2 / -0 )Share on Facebook
  • That's odd. This worked fine for me until I switched to 2023.7. But thanks for the fix!
Sign In or Register to comment.