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.

IllegalArgumentException: No enum constant com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape.false

See original GitHub issue

Issue details

Use the .p file created in the wiki’s particle editor (http://libgdx.badlogicgames.com/nightlies/) to report errors when running in code:

Exception in thread "LWJGL Application" java.lang.RuntimeException: Error parsing emitter: boom
	at com.badlogic.gdx.graphics.g2d.ParticleEmitter.load(ParticleEmitter.java:1160)
	at com.badlogic.gdx.graphics.g2d.ParticleEmitter.<init>(ParticleEmitter.java:103)
	at com.badlogic.gdx.graphics.g2d.ParticleEffect.newEmitter(ParticleEffect.java:227)
	at com.badlogic.gdx.graphics.g2d.ParticleEffect.loadEmitters(ParticleEffect.java:173)
	at com.badlogic.gdx.graphics.g2d.ParticleEffect.load(ParticleEffect.java:153)
	at com.github.airsaid.sample.ParticleSample.create(ParticleSample.java:24)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:149)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
Caused by: java.lang.IllegalArgumentException: No enum constant com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape.false
	at java.lang.Enum.valueOf(Enum.java:238)
	at com.badlogic.gdx.graphics.g2d.ParticleEmitter$SpawnShape.valueOf(ParticleEmitter.java:1637)
	at com.badlogic.gdx.graphics.g2d.ParticleEmitter$SpawnShapeValue.load(ParticleEmitter.java:1622)
	at com.badlogic.gdx.graphics.g2d.ParticleEmitter.load(ParticleEmitter.java:1107)
	... 7 more

Reproduction steps/code

Use code:

public class ParticleSample extends Game {

    private ParticleEffect particleEffect;
    private SpriteBatch batch;

    @Override
    public void create() {
        batch = new SpriteBatch();

        particleEffect = new ParticleEffect();
        particleEffect.load(Gdx.files.internal("particle/boom.p"), Gdx.files.internal("particle"));
        particleEffect.setPosition(Gdx.graphics.getWidth() / 2, Gdx.graphics.getHeight() / 2);
    }

    @Override
    public void render() {
        super.render();
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

        batch.begin();
        float deltaTime = Gdx.graphics.getDeltaTime();
        particleEffect.draw(batch, deltaTime);
        batch.end();
    }

    @Override
    public void dispose() {
        super.dispose();
        particleEffect.dispose();
        batch.dispose();
    }
}

Version of LibGDX and/or relevant dependencies

gdxVersion = '1.9.8'
roboVMVersion = '2.3.3'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.0'
aiVersion = '1.8.0' 

Stacktrace

Exception in thread "LWJGL Application" java.lang.RuntimeException: Error parsing emitter: boom
	at com.badlogic.gdx.graphics.g2d.ParticleEmitter.load(ParticleEmitter.java:1160)
	at com.badlogic.gdx.graphics.g2d.ParticleEmitter.<init>(ParticleEmitter.java:103)
	at com.badlogic.gdx.graphics.g2d.ParticleEffect.newEmitter(ParticleEffect.java:227)
	at com.badlogic.gdx.graphics.g2d.ParticleEffect.loadEmitters(ParticleEffect.java:173)
	at com.badlogic.gdx.graphics.g2d.ParticleEffect.load(ParticleEffect.java:153)
	at com.github.airsaid.sample.ParticleSample.create(ParticleSample.java:24)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:149)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
Caused by: java.lang.IllegalArgumentException: No enum constant com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape.false
	at java.lang.Enum.valueOf(Enum.java:238)
	at com.badlogic.gdx.graphics.g2d.ParticleEmitter$SpawnShape.valueOf(ParticleEmitter.java:1637)
	at com.badlogic.gdx.graphics.g2d.ParticleEmitter$SpawnShapeValue.load(ParticleEmitter.java:1622)
	at com.badlogic.gdx.graphics.g2d.ParticleEmitter.load(ParticleEmitter.java:1107)
	... 7 more

.p File(Easy to upload and modify to .txt):

boom.txt

Please select the affected platforms

  • Android
  • iOS (robovm)
  • iOS (MOE)
  • HTML/GWT
  • Windows
  • Linux
  • MacOS

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
metaphorecommented, Aug 24, 2018

It’s actually a bit frustrating fact that there are no tools’ distributions for the latest stable release at all. It doesn’t feel like a right thing to do, keep only bleeding edge nightly version available publicly on the site. many new devs could be confused with the same problem as they may don’t realize those breaking changes and compatibility issues, and they most likely won’t build them from source, rather then just look for a distribution executable. I guess the same is about stable compiled jar release files, looks like they are also absent on the site.

@badlogic what do you think?

3reactions
obigucommented, Aug 24, 2018

I definitely agree the Tools Jars should be available for the latest stable release and not only the nigthly build. The fact that libGDX hasn’t had a stable release for so long makes it worse.

Best chance to get a reply is from @Tom-Ski , @badlogic is not actively mantaining the project atm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error parsing emitter LibGDX ParticleEffects - Stack Overflow
I am using LibGDX 1.9.8 and attempting to add ParticleEffects made with the ParticleEditor . I try to load a new effect with:...
Read more >
[Solved] java.lang.IllegalArgumentException: No enum constant
Solutions: Always use valid constant values to resolve this issue and while trying to call this enum.valueOf() method always handle exception so ...
Read more >
解析发射器LibGDX ParticleEffects时出错- java - 45码 - 45MA
IllegalArgumentException : No enum constant com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape.false at java.lang.Enum.valueOf(Enum.java:238) at ...
Read more >
No enum constant org.apache.hadoop.io.SequenceFile ...
This error is reported when the compression property is set at the Hadoop connection. Solution.
Read more >
Solved: Datanode fails to start | No enum constant org.apa...
IllegalArgumentException : No enum constant org.apache.hadoop.security.SaslRpcServer.QualityOfProtection.FALSE at java.lang.Enum.
Read more >

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