Cursor pixmap behaviour unstable after 27 march on 1.10.1-SNAPSHOT
See original GitHub issueIssue 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:
- Created a year ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
All right, guess this can be closed, a month and a day later, after some truly mind-bending debugging. Hooray!
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.