ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: edsquare on May 24, 2014, 04:10:50 pm

Title: Linux GMFormatException SOLVED
Post by: edsquare on May 24, 2014, 04:10:50 pm
Downloaded yet again from git

Got rid of every single folder related to the old enigma, including .enigma

Compiled, corrected the gcc.ey file, created the bash launcher file, started a game, loaded a single sprite in png format, told enigma to create a folder and saved the project, so far so good but...

When trying to open the project enigma created I get the error:

org.lateralgm.file.GmFormatException: java.lang.NullPointerException: null
   at org.lateralgm.file.GMXFileReader.readProjectFile(GMXFileReader.java:323)
   at org.lateralgm.file.GMXFileReader.readProjectFile(GMXFileReader.java:234)
   at org.lateralgm.main.FileChooser$ProjectReader.read(FileChooser.java:378)
   at org.lateralgm.main.FileChooser$1.run(FileChooser.java:550)
   at java.lang.Thread.run(Thread.java:744)

Latest Enigma-LGM from git
Latest JDK and JRE
LinuxMint 15 (Ubuntu Raring) cinnamon desktop

Any Ideas?
Title: Re: Linux GMFormatException
Post by: edsquare on May 24, 2014, 04:23:33 pm
Searching the forum found another Ubuntu user with the same problem, I can save as gmk and it opens correctly the game so I think I can wait for the fix.
Title: Re: Linux GMFormatException
Post by: Goombert on May 24, 2014, 09:54:11 pm
Because you have an older LGM, I can't honestly tell you exactly where the error is occurring. It is pointing to a bullshit line in the latest revision.
https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/file/GmFileReader.java#L323

You should try running install.py again or manually update LGM and the plugin.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages

You may also need to git-fetch from the main repository.
Title: Re: Linux GMFormatException
Post by: edsquare on May 25, 2014, 12:21:36 am
Because you have an older LGM, I can't honestly tell you exactly where the error is occurring. It is pointing to a bullshit line in the latest revision.
https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/file/GmFileReader.java#L323

I do not have an older version, I downloaded from git two times today, the second one erased everything before building.
Unless the version in <code>https://github.com/enigma-dev/enigma-dev</code>  is not the new version?

You should try running install.py again or manually update LGM and the plugin.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages

Okey, will do so right away, first with install.py and as second resort the download you point at.

You may also need to git-fetch from the main repository.

And the main repository is this?

<code>https://github.com/enigma-dev/enigma-dev</code>

Title: Re: Linux GMFormatException
Post by: edsquare on May 25, 2014, 12:34:28 am
Updated via install.py

opened a gmk file and saved it as 1200 with force extension since it didn't recognice the gmx extension any other way

when trying to open it the same error:

org.lateralgm.file.GmFormatException: java.lang.NullPointerException: null
   at org.lateralgm.file.GMXFileReader.readProjectFile(GMXFileReader.java:323)
   at org.lateralgm.file.GMXFileReader.readProjectFile(GMXFileReader.java:234)
   at org.lateralgm.main.FileChooser$ProjectReader.read(FileChooser.java:378)
   at org.lateralgm.main.FileChooser$1.run(FileChooser.java:550)
   at java.lang.Thread.run(Thread.java:744)

Is there a working difference in saving with one format or another?

I mean saving as 800 vs saving as 1200 are there restrictions in the development? some feature not in the older formats? or are all features available no matter what format I save my games? If the latter is true then I don't mind saving as gmk, and even can keep trying the solutions as a kind of betta tester until the issue is no more.

But if the former is true then I will keep trying to fix it one way or the other.

Should I now download from the extra packages?
Title: Re: Linux GMFormatException
Post by: Goombert on May 25, 2014, 12:38:26 am
No there aren't restrictions, the GMX writer/reader is just buggy obviously. But there is also differences in the format such as addition of shaders and things, you should bother trying to use the GMK format at all. If you send the GMK file I can further asses where the bug is occurring.
Title: Re: Linux GMFormatException
Post by: edsquare on May 25, 2014, 12:52:45 am
No there aren't restrictions, the GMX writer/reader is just buggy obviously. But there is also differences in the format such as addition of shaders and things, you should bother trying to use the GMK format at all. If you send the GMK file I can further asses where the bug is occurring.

The GMK file? don't you mean the GMX file?

I'll open one of the examples and save it as GMX then atach it in a reply in this thread.
Title: Re: Linux GMFormatException
Post by: edsquare on May 25, 2014, 08:59:42 am
Here is the GMK:

Title: Re: Linux GMFormatException
Post by: edsquare on May 25, 2014, 09:00:24 am
And here the GMX
Title: Re: Linux GMFormatException
Post by: Goombert on May 25, 2014, 06:30:04 pm
Ok you only uploaded the main GMX, which only has the tree, that is useless because it contains no resource data. At any rate, I just downloaded the GMK, opened it in LGM, compiled it (ran fine), saved it as a GMX, reloaded it several times and successfully recompiled the game.

I have attached the GMX in a 7zip which I changed to GMZ because GMZ is simply a 7zip'd GMX.

Here is a screenshot of the settings I used when saving to GMX:

(http://i.imgur.com/JYe6RR7.png)
Title: Re: Linux GMFormatException
Post by: edsquare on May 25, 2014, 10:16:07 pm
Ok you only uploaded the main GMX, which only has the tree, that is useless because it contains no resource data. At any rate, I just downloaded the GMK, opened it in LGM, compiled it (ran fine), saved it as a GMX, reloaded it several times and successfully recompiled the game.

I have attached the GMX in a 7zip which I changed to GMZ because GMZ is simply a 7zip'd GMX.


Thank you for all your help, I already downloaded it, tomorrow morning first thing I will open it and see what happens. Wish me luck?  :)
Title: Re: Linux GMFormatException
Post by: Goombert on May 25, 2014, 11:54:17 pm
Yes, but since LGM does not load GMZ, you'll have to extract it first using 7zip.
Title: Re: Linux GMFormatException
Post by: edsquare on May 27, 2014, 12:17:31 am
Yes, but since LGM does not load GMZ, you'll have to extract it first using 7zip.

Sorry For the delay, life and my son got in the way :)

Anyway it made no difference, I keep getting the same error when trying to open your gmx file (After I extracted it ofcourse).

org.lateralgm.file.GmFormatException: java.lang.NullPointerException: null
   at org.lateralgm.file.GMXFileReader.readProjectFile(GMXFileReader.java:323)
   at org.lateralgm.file.GMXFileReader.readProjectFile(GMXFileReader.java:234)
   at org.lateralgm.main.FileChooser$ProjectReader.read(FileChooser.java:378)
   at org.lateralgm.main.FileChooser$1.run(FileChooser.java:550)
   at java.lang.Thread.run(Thread.java:744)

Parafrasing someone:

A solution! A solution! My kingdom for a solution! :)

Ofcourse It's not that urgent, I can keep following the tutorials and saving as gmk, by the way I have the two GM books and from the images the interface is diferent, I'll open another thread asking for the differences one of this days.

Well I'm of to sleep, thanks again for your patience and help.

Edit1: The terminal output is this:

Code: [Select]

Java Version: 10700 (1.7.0_51)
Loading lib files in /home/eduardo/enigma/lateralgm.jar
01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl
 05_score.lgl 06_extra.lgl 07_draw.lgl
Llamando `make eTCpath=""`
> make -j 3 -C CompilerSource
> make[1]: se ingresa al directorio «/home/eduardo/enigma/CompilerSource»
> make[1]: No se hace nada para «all».
> make[1]: se sale del directorio «/home/eduardo/enigma/CompilerSource»
0
Process terminated
Comenzando Enigma:
Failed to create make directory at /home/eduardo/.enigma/
Linking up to IDE
Implementing JDI basics
UnimplementedUnimplemented

Choosing language: C++
Reading GCC builtins
Read key `defines` as `cpp -dM -x c++ -E $blank`
Parsed `cpp` `-dM -x c++ -E "/home/eduardo/.enigma/enigma_blank.txt"`: redirect=yes
TRUE




*********** EXECUTE
  `/usr/bin/cpp`
  `-dM`
  `-x`
  `c++`
  `-E`
  `/home/eduardo/.enigma/enigma_blank.txt`



Call succeeded
Read key `searchdirs` as `gcc -E -x c++ -v $blank`
Parsed `gcc` `-E -x c++ -v "/home/eduardo/.enigma/enigma_blank.txt"`: redirect=yes
TRUE




*********** EXECUTE
  `/usr/bin/gcc`
  `-E`
  `-x`
  `c++`
  `-v`
  `/home/eduardo/.enigma/enigma_blank.txt`



Call succeeded
Searching for directories between "" and ""
Toolchain returned 30 search directories:
Creating parse context
Parsing settings...
TOINT: 0
TOINT: 0
TOINT: 1
TOINT: 0
TOINT: 0
Setting up IDE editables...
%e-yaml
---
treat-literals-as: 0
inherit-equivalence-from: 0
make-directory: "%HOME%/.enigma/"
scalar-precision: 0
angular-unit: 0
inherit-strings-from: 0
inherit-negatives-as: 0
inherit-escapes-from: 0
inherit-objects: true
inherit-increment-from: 1

target-networking: None
target-audio: OpenAL
target-windowing: xlib
target-compiler: gcc
target-graphics: OpenGL1
target-widget: None
target-collision: Precise

extensions: Universal_System/Extensions/Alarms,Universal_System/Extensions/Timelines,Universal_System/Extensions/Paths,Universal_System/Extensions/MotionPlanning,Universal_System/Extensions/DateTime,Universal_System/Extensions/ParticleSystems,Universal_System/Extensions/DataStructures

Creating swap.
Dumping whiteSpace definitions...
Opening ENIGMA for parse...
Successfully loaded builtin variant type
Successfully loaded builtin var type
Successfully loaded builtin varargs type
ERROR in parsing engine file: The parser isn't happy. Don't worry, it's never happy.
ERROR: UnknownContinuing anyway.
Creating dummy primitives for old ENIGMA
Initializing EDL Parser...
Grabbing locals...
Finding parent...Found parent scope
 >> Checking ancestor object_collisions
 >> Checking ancestor object_transform
 >> Checking ancestor object_graphics
 >> Checking ancestor object_planar
 >> Checking ancestor object_basic
Determining build target...




Starting platform inspection
 - ENIGMAsystem/SHELL/Platforms/Android/Info/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/iPhone/Info/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/Cocoa/Info/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/Win32/Info/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/General/Info/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/xlib/Info/About.ey: Opened.
 Done.


How do I put a scrollbox around the text?
Title: Re: Linux GMFormatException
Post by: Goombert on May 27, 2014, 06:47:20 am
Wow, I am stumped honestly edsquare, you have the latest LGM and it opens fine for me. I will have to go over and test Linux when I can to make sure it loads for me there as well.

I've also double checked the hash on the packages repo is correct, and it is.
https://github.com/enigma-dev/ExtraPackages/blob/master/Packages.md5
Title: Re: Linux GMFormatException
Post by: edsquare on May 27, 2014, 11:28:28 am
Wow, I am stumped honestly edsquare, you have the latest LGM and it opens fine for me. I will have to go over and test Linux when I can to make sure it loads for me there as well.

I've also double checked the hash on the packages repo is correct, and it is.
https://github.com/enigma-dev/ExtraPackages/blob/master/Packages.md5

I thank you again for all your help and the hardwork you (and the team) put to give us this great tool, regarding my problem, no hurry, I can keep on going with the other formats until it's solved, what I found on google is several similar errors regarding java and java applications, so maybe it's not enigma but LGM?
Title: Re: Linux GMFormatException
Post by: Goombert on May 27, 2014, 10:56:59 pm
Luckily for you I am able to reproduce it in my virtual machine, there appears to be some issue with loading GMX on Linux.

(http://i.imgur.com/vGlx0Ke.jpg)

It is specifically occurring while loading Global Game Settings. More specifically when loading the ICO file because GMX does not use Unix compatible file paths. And I can not make LGM write them that way because Studio's IDE can't handle UNIX file paths. So I will need to make it convert the file paths to UNIX when reading binary files.
Title: Re: Linux GMFormatException
Post by: Goombert on May 27, 2014, 11:50:04 pm
Ok I have fixed it and now managed to successfully load the project on XLIB.

You can obtain the fixed LGM by downloading and replacing it manually from the extra packages page or by running python install.py
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages

This was the commit where I made the reader convert file paths to be UNIX compatible.
https://github.com/IsmAvatar/LateralGM/commit/5844d1bb5ca2d659a431c121276b9659dfabb714

(http://i.imgur.com/7voRbPd.jpg)
Title: Re: Linux GMFormatException
Post by: edsquare on May 28, 2014, 12:46:01 pm
Ok I have fixed it and now managed to successfully load the project on XLIB.

You can obtain the fixed LGM by downloading and replacing it manually from the extra packages page or by running python install.py
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages

This was the commit where I made the reader convert file paths to be UNIX compatible.
https://github.com/IsmAvatar/LateralGM/commit/5844d1bb5ca2d659a431c121276b9659dfabb714



You did it!
Thank you! Thank you! Thank you! Thank you!
I ran install.py and now it opens correctly the GMX, you're a genius!
Another point for ENIGMA-LGM, response time from reporting a bug (or was it a feature?  ;) ) and the fix is almost instantaneous; I know that some bugs take longer than others but still GM has bug complaints that don't get adressed or the buggy feature is retired instead of fixed WTF?
Title: Re: Linux GMFormatException SOLVED
Post by: Goombert on May 28, 2014, 04:46:28 pm
Yes a lot of people keep saying that about ENIGMA. The issue with them is a lot of the bugs they don't see as bugs and simply don't care to fix. They are basically making mole hills out of mountains.