question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cursor pixmap behaviour unstable after 27 march on 1.10.1-SNAPSHOT

See original GitHub issue

Issue details

Cursor started behaving very unstable, its pixmap has a lot of unnecessary artefact pixels and is cluttered with other pixmaps loaded before.

Reproduction steps/code

This is the code that changes cursors. I have experimented, changed to directly loading file to pixmap but the issue still persists. Attaching a test project I did that still has issue, also tested on other PC and issue still there. Java version 1.8.0_321.

` int index = 0;

        for (int i = 0; i < 3; i++)

            for (int j = 0; j < 3; j++) {

                TextureRegion[][] cursor_sprites_split = TextureRegion.split(new Texture("images/cursor_big.png"), 64, 64);

                TextureRegion textureRegion = cursor_sprites_split[i][j];

                TextureData textureData = textureRegion.getTexture().getTextureData();

                if (!textureData.isPrepared())

                    textureData.prepare();

                Pixmap pixmap = new Pixmap(textureRegion.getRegionWidth(), textureRegion.getRegionHeight(), textureData.getFormat());

                pixmap.drawPixmap(textureData.consumePixmap(), 0, 0, textureRegion.getRegionX(), textureRegion.getRegionY(), textureRegion.getRegionWidth(), textureRegion.getRegionHeight());

                cursors[index++] = Gdx.graphics.newCursor(pixmap, 0, 0);

                pixmap.dispose();

            }`

Version of libGDX and/or relevant dependencies

    gdxVersion = '1.10.1-SNAPSHOT'
    roboVMVersion = '2.3.15'
    box2DLightsVersion = '1.5'
    ashleyVersion = '1.7.4'
    aiVersion = '1.8.2'
    gdxControllersVersion = '2.2.1'

Stacktrace

Please select the affected platforms

  • Android
  • iOS
  • HTML/GWT
  • [x ] Windows
  • Linux
  • macOS
  • test.zip

Update 28.03.2022: after reverting this everything went back to normal.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
tommyettingercommented, Apr 29, 2022

All right, guess this can be closed, a month and a day later, after some truly mind-bending debugging. Hooray!

0reactions
redy5commented, Apr 29, 2022

@redy5 this should be fixed since #6815 and #6818 were reverted. Can you confirm this?

Yeah, the issue was fixed after those were reverted, and has not came back since. Moreover, if I remember corectly, #6818 was reverted ~hour before #6815 and it started working right away after I pulled the changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found