Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TileSprite in Headless mode crashes #4297

Closed
clesquir opened this issue Jan 13, 2019 · 2 comments
Closed

TileSprite in Headless mode crashes #4297

clesquir opened this issue Jan 13, 2019 · 2 comments

Comments

@clesquir
Copy link
Contributor

Version

  • Phaser Version: v3.15.1-FB
  • Operating system: OSX
  • Browser: Chrome

Description

Running a game with the HEADLESS mode renderer will crash if there is a tileSprite created in the game.

Example Test Code

new Phaser.Game({
    type: Phaser.HEADLESS,
    parent: 'phaser-example',
    width: 800,
    height: 600,
    scene: {
        preload: function() {
            this.load.image('pic', 'assets/pics/baal-loader.png');
        },
        create: function() {
            this.add.tileSprite(0,0,400,300,'pic');
        }
    }
});
@samme
Copy link
Contributor

samme commented Jan 14, 2019

[Log] Phaser v3.15.1 (Headless | Web Audio) https://phaser.io (3.15.1.js, line 143017)
[Error] TypeError: null is not an object (evaluating 'this.renderer.gl')
updateTileTexture (3.15.1.js:33518)
setFrame (3.15.1.js:33437)
TileSprite (3.15.1.js:33371)
(anonymous function) (3.15.1.js:129878)
create (Anonymous Script 1 (line 29))
create (3.15.1.js:81750)
loadComplete (3.15.1.js:81644)
emit (3.15.1.js:2255)
loadComplete (3.15.1.js:114244)
fileProcessComplete (3.15.1.js:114203)
onProcessComplete (3.15.1.js:4333)
onload (3.15.1.js:10557)

@photonstorm
Copy link
Collaborator

Thanks for opening this issue, and for submitting a PR to fix it. We have merged your PR into the master branch and attributed the work to you in the Change Log. If you need to tweak the code for whatever reason please submit a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants