Strange issue with particle editor

overwriting an existing effect causes the new the file and file it is derived from to suddenly not be able to find the texture anymore, the weird part is if u click the browse button it opens to the path the editor complains about and the texture is there, then I have to select the image all over again for each layer, every time I re-open the file



when re-opened





expected “doesn’t look as it should as a still”





jme fx files: firestart3 is the original

all layers use the bubble.jpg texture





error

Apr 16, 2008 11:34:25 AM com.jme.util.resource.ResourceLocatorTool locateResource
WARNING: Unable to locate: ../workspace/jme/build/jmetest/data/texture/bubble.jpg
Apr 16, 2008 11:34:25 AM com.jme.util.TextureManager loadImage
WARNING: loadImage(URL file, boolean flipped): defaultTexture used
java.io.FileNotFoundException: ..workspacejmebuildjmetestdatatexturebubble.jpg (The system cannot find the path specified)
   at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.<init>(Unknown Source)
   at java.io.FileInputStream.<init>(Unknown Source)
   at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
   at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
   at java.net.URL.openStream(Unknown Source)
   at com.jme.util.TextureManager.loadImage(TextureManager.java:447)
   at com.jme.util.TextureManager.loadImage(TextureManager.java:428)
   at com.jme.util.TextureManager.loadTexture(TextureManager.java:331)
   at com.jme.util.TextureManager.loadTexture(TextureManager.java:300)
   at com.jme.image.Texture.read(Texture.java:977)
   at com.jme.util.export.binary.BinaryImporter.readObject(BinaryImporter.java:247)
   at com.jme.util.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:458)
   at com.jme.util.export.binary.BinaryInputCapsule.readSavableArray(BinaryInputCapsule.java:446)
   at com.jme.util.export.binary.BinaryInputCapsule.readSavableArrayList(BinaryInputCapsule.java:550)
   at com.jme.scene.state.TextureState.read(TextureState.java:736)
   at com.jme.util.export.binary.BinaryImporter.readObject(BinaryImporter.java:247)
   at com.jme.util.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:458)
   at com.jme.util.export.binary.BinaryInputCapsule.readSavableArray(BinaryInputCapsule.java:446)
   at com.jme.scene.SceneElement.read(SceneElement.java:853)
   at com.jme.scene.Spatial.read(Spatial.java:824)
   at com.jme.scene.Geometry.read(Geometry.java:841)
   at com.jmex.effects.particles.ParticleGeometry.read(ParticleGeometry.java:1037)
   at com.jmex.effects.particles.ParticleMesh.read(ParticleMesh.java:363)
   at com.jme.util.export.binary.BinaryImporter.readObject(BinaryImporter.java:247)
   at com.jme.util.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:458)
   at com.jme.util.export.binary.BinaryInputCapsule.readSavableArray(BinaryInputCapsule.java:446)
   at com.jme.util.export.binary.BinaryInputCapsule.readSavableArrayList(BinaryInputCapsule.java:550)
   at com.jme.scene.Node.read(Node.java:649)
   at com.jme.util.export.binary.BinaryImporter.readObject(BinaryImporter.java:247)
   at com.jme.util.export.binary.BinaryImporter.load(BinaryImporter.java:156)
   at com.jme.util.export.binary.BinaryImporter.load(BinaryImporter.java:184)
   at com.jme.util.export.binary.BinaryImporter.load(BinaryImporter.java:179)
   at jmetest.effects.RenParticleEditor.showOpenDialog(RenParticleEditor.java:541)
   at jmetest.effects.RenParticleEditor.access$9(RenParticleEditor.java:532)
   at jmetest.effects.RenParticleEditor$4.actionPerformed(RenParticleEditor.java:300)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)

I had a similar problem when importing a saved effect into the game, the editor was able to find the texture file but ingame i got the "missing texture" image.

So when i load the effect i now use

Thread.currentThread().getContextClassLoader()

instead of

classname.class.getClassLoader()

. Maybe this will work for you to.

thanks for the advice, but this isn't ready for ingame scene yet, still needs work, and thats really the issue, the problem happens if you overwrite an existing particle file with a new one i.e give the new one the name of the old one. 

I gave it a try and your right, whenever u use a texture that is not in the buildpath the resourcelocatortool cant find the texture anymore and it throws a java.io.FileNotFoundException

at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.<init>(Unknown Source)
   at java.io.FileInputStream.<init>(Unknown Source)
   at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
   at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
   at java.net.URL.openStream(Unknown Source)
   at com.jme.util.TextureManager.loadImage(TextureManager.java:447)
   at com.jme.util.TextureManager.loadImage(TextureManager.java:428)
   at com.jme.util.TextureManager.loadTexture(TextureManager.java:331)
   at com.jme.util.TextureManager.loadTexture(TextureManager.java:300)
   at com.jme.image.Texture.read(Texture.java:977)
   at com.jme.util.export.binary.BinaryImporter.readObject(BinaryImporter.java:247)
   at com.jme.util.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:458)
   at com.jme.util.export.binary.BinaryInputCapsule.readSavableArray(BinaryInputCapsule.java:446)
   at com.jme.util.export.binary.BinaryInputCapsule.readSavableArrayList(BinaryInputCapsule.java:550)
   at com.jme.scene.state.TextureState.read(TextureState.java:736)
   at com.jme.util.export.binary.BinaryImporter.readObject(BinaryImporter.java:247)
   at com.jme.util.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:458)
   at com.jme.util.export.binary.BinaryInputCapsule.readSavableArray(BinaryInputCapsule.java:446)
   at com.jme.scene.SceneElement.read(SceneElement.java:853)
   at com.jme.scene.Spatial.read(Spatial.java:824)
   at com.jme.scene.Geometry.read(Geometry.java:841)
   at com.jmex.effects.particles.ParticleGeometry.read(ParticleGeometry.java:1037)
   at com.jmex.effects.particles.ParticleMesh.read(ParticleMesh.java:363)
   at com.jme.util.export.binary.BinaryImporter.readObject(BinaryImporter.java:247)
   at com.jme.util.export.binary.BinaryImporter.load(BinaryImporter.java:156)
   at com.jme.util.export.binary.BinaryImporter.load(BinaryImporter.java:184)
   at com.jme.util.export.binary.BinaryImporter.load(BinaryImporter.java:179)
   at jmetest.effects.RenParticleEditor.showOpenDialog(RenParticleEditor.java:541)
   at jmetest.effects.RenParticleEditor.access$9(RenParticleEditor.java:532)
   at jmetest.effects.RenParticleEditor$4.actionPerformed(RenParticleEditor.java:300)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)


The weird thing is this doesent happen when u save it as a new file and try to open it again
You still get the WARNING: Unable to locate: .......
but he will open the file

well I,ve tried over and over to save it as a completely new file but the problem persists :?