Error In 3DS Converter

Hi,



I tried to convert a 3DS file to a JME file but I have a NullPointException.



11 juin 2007 21:43:30 com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
Exception in thread "main" java.lang.NullPointerException
   at com.jmex.model.XMLparser.Converters.TDSChunkingFiles.MaterialBlock.initializeVariables(Unknown Source)
   at com.jmex.model.XMLparser.Converters.TDSChunkingFiles.MaterialBlock.<init>(Unknown Source)
   at com.jmex.model.XMLparser.Converters.TDSChunkingFiles.EditableObjectChunk.processChildChunk(Unknown Source)
   at com.jmex.model.XMLparser.Converters.TDSChunkingFiles.ChunkerClass.chunk(Unknown Source)
   at com.jmex.model.XMLparser.Converters.TDSChunkingFiles.EditableObjectChunk.<init>(Unknown Source)
   at com.jmex.model.XMLparser.Converters.TDSChunkingFiles.TDSFile.processChildChunk(Unknown Source)
   at com.jmex.model.XMLparser.Converters.TDSChunkingFiles.ChunkerClass.chunk(Unknown Source)
   at com.jmex.model.XMLparser.Converters.TDSChunkingFiles.TDSFile.<init>(Unknown Source)
   at com.jmex.model.XMLparser.Converters.MaxToJme.convert(Unknown Source)
   at utils.JmeFromMaxMaker.<init>(JmeFromMaxMaker.java:41)
   at utils.JmeFromMaxMaker.main(JmeFromMaxMaker.java:74)



I have written the same code to convert MD2 to JME and I have no problem :


public class JmeFromMaxMaker
{
   private Node _pSavedNode;
   final String FILETOCONVERT = "media/test/maison_pauvre.3DS";
   final String FILETOSAVE = "media/test/maison_pauvre.jme";
   
/**
 * Constructeur
 */
   public JmeFromMaxMaker() {
      
      MaxToJme pConverter = new MaxToJme();
      
      ByteArrayOutputStream pBO = new ByteArrayOutputStream();
      URL pModel = JmeFromMaxMaker.class.getClassLoader().getResource(FILETOCONVERT);
      _pSavedNode = null;
      
      try {
         long lTime = System.currentTimeMillis();
         pConverter.convert(pModel.openStream(), pBO);
         pConverter.setProperty("texurl",pModel);
         _pSavedNode = (Node)BinaryImporter.getInstance().load(new ByteArrayInputStream(pBO.toByteArray()));
         System.out.println("Time to convert from 3DS to .jme : "+ ( System.currentTimeMillis() - lTime));
         
      } catch (IOException e) {
         System.out.println("damn exceptions:" + e.getMessage());
      }
      
      try {
         long lTime = System.currentTimeMillis();
         BinaryExporter.getInstance().save(_pSavedNode, new File(FILETOSAVE));
         System.out.println("Time to generate the .jme file : "+ ( System.currentTimeMillis() - lTime));
      } catch (IOException e) {
         System.out.println("damn exceptions:" + e.getMessage());
      }

   }
   
/**
 * M

Where you are getting the NPE is in a block of code that uses the DisplaySystem to create states.  Make sure your display is inited before you load the 3ds model.