ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: egofree on January 18, 2014, 11:03:15 AM

Title: There was an issue loading the project
Post by: egofree on January 18, 2014, 11:03:15 AM
Hello,

I've installed Linux Mint on my PC, and i've installed the latest version ENIGMA. When i try to load my project 'Son of blagger', made with GM Studio, i've the following error message : 'There was an issue loading the project'. It seems it didn't load all the rooms.
Here is a link to the game source code : http://www78.zippyshare.com/v/59487524/file.html
Any help is welcome.
Title: Re: There was an issue loading the project
Post by: Goombert on January 18, 2014, 12:09:07 PM
Hello egofree, I have just attempted to load your project and did so without any errors. There appeared to be no issues with the project and there were no exception messages reported in the output log.
(http://i.imgur.com/YTiEZAS.png)

The rooms also appeared fine.
(http://i.imgur.com/xb88x8T.png)

Perhaps, you should try using the LGM from the extra packages page, something may be messed up and perhaps you obtained an older version.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages
Title: Re: There was an issue loading the project
Post by: egofree on January 18, 2014, 12:22:15 PM
Thanks for your help Robert. With windows version i manage to load the project without errors, but when i try to save it in a new format (egm), it  doesn't load correctly the next time i try to load it.
Would you mind to share your 'converted version' ?
Title: Re: There was an issue loading the project
Post by: Josh @ Dreamland on January 18, 2014, 12:34:16 PM
Congrats, Robert; that was your 1337th post.
Title: Re: There was an issue loading the project
Post by: Goombert on January 19, 2014, 03:05:13 AM
egofree, this appears to have been the GMX Reader and Writer handling the GUID incorrectly, I fixed it now properly and thoroughly tested converting your game to an EGM and it works just as expected.

Please update both LateralGM and the Plugin jars which you can obtain from the Extra Packages page.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages#LateralGM
If you do not wish to manually replace the files, you can simply download the updated Portable Zip on Windows.
http://enigma-dev.org/docs/Wiki/Install:Windows

I hope this fixes the issue, please let me know if it does.
Title: Re: There was an issue loading the project
Post by: egofree on January 19, 2014, 06:34:57 AM
Please update both LateralGM and the Plugin jars which you can obtain from the Extra Packages page.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages#LateralGM

That's what i've done yesterday, but it didn't change anything. Anyway i've downloaded today the latest windows version, with your fix, and it's better. I can save the project to egm and i can open it again, but if i make a change to the code, and save it again, it's not possible to open again the egm project. I tried several times, same result. Here is my egm file : https://dl.dropboxusercontent.com/u/29802501/son_of_blagger.project.gmx.egm
There is also a a new egm.gb1 file in the directory. Is this important ?
Title: Re: There was an issue loading the project
Post by: Goombert on January 19, 2014, 01:09:46 PM
The issue is the path resource ego, I am working on fixing it now this is a really illusive bug.

Don't worry about the gb files, those are global backup files, or rather just GMK's that are saved each time you save your project in case of corruption, I am going to add a preference to turn it off.
Title: Re: There was an issue loading the project
Post by: TheExDeus on January 19, 2014, 01:46:35 PM
I always though "gb" stood for "game backup". Makes more sense than global.
Title: Re: There was an issue loading the project
Post by: Goombert on January 19, 2014, 02:03:00 PM
I just fixed it, it was a plugin bug, once again, egofree please update the LGM and plugin jar files with the fixed version.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages

This was the commit that fixed the paths causing the EGM corruption.
https://github.com/enigma-dev/lgmplugin/commit/c5d181a1c76a1569554f23d2f7e425749e71b550

I have also updated the Portable ZIP.
http://enigma-dev.org/docs/Wiki/Install:Windows

Again, let me know if the issue is fixed.

But Harri, wow, I never realized that, but they aren't necessarily game backup either, every body on Google just says they are a backup, but I can't find anything on what the extension stood for. I wonder where I got the idea to call them global backup? But I guess game backup does make more sense.
https://www.google.com/#q=gb1+file

I can't even find a result of IsmAvatar or LGM, though I could have swore she called them a global backup too.
Title: Re: There was an issue loading the project
Post by: Goombert on January 20, 2014, 02:33:48 PM
In addition to this ego, I hope my fix worked, but I just finally realized, Studio corrupted your project. A fresh extraction of your game and viewing the rooms/main.room.gmx you can see in the following code that there are a ton of instances placed with no object type.

Code: (XML) [Select]
    <instance objName="&lt;undefined&gt;" x="2896" y="64" name="inst_7EB3A43B" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="&lt;undefined&gt;" x="2896" y="80" name="inst_4EF3260D" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="arch_right_2" x="2896" y="112" name="inst_84826BAB" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="arch_right_2" x="2896" y="192" name="inst_5A72409E" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="arch_right_2" x="2896" y="304" name="inst_27403B1E" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="arch_right_2" x="2896" y="400" name="inst_3DCE8317" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="slide_left_1" x="2896" y="432" name="inst_9F6A0363" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="slide_left_1" x="2896" y="464" name="inst_C8D4D44D" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="arch_left_1" x="2896" y="560" name="inst_07B3E806" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="wall_left" x="2896" y="672" name="inst_F96DAA20" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="wall_left" x="2896" y="736" name="inst_3D5421DE" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="&lt;undefined&gt;" x="2896" y="1040" name="inst_EBBBAA82" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
    <instance objName="&lt;undefined&gt;" x="2896" y="1056" name="inst_EB8C7F39" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>

Now when I open up the GMX in ENIGMA, it becomes clear what happened.
(http://i.imgur.com/qg29FSt.png)
Studio placed a null instance of no object type, everywhere you placed a tile, notice I deleted some in the top left of the room to show the tiles underneath.
Title: Re: There was an issue loading the project
Post by: egofree on January 25, 2014, 05:00:03 AM
Robert, again, thanks for your help. I can import my old gmx with the windows version. I try now to fix the remaining bugs. I've several problems. For example, in the create event of objects i've declared counter variables, but i've the following error message:

Quote
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectaccess.h: In function 'var& enigma::varaccess_counter(int)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectaccess.h:564:70: error: 'struct enigma::OBJ_obj_display_level' has no member named 'counter'
       case obj_display_level: return ((OBJ_obj_display_level*)inst)->counter;

I don't have this error with GM. Here is my EGM file : https://dl.dropboxusercontent.com/u/29802501/son_of_blagger.project.gmx.egm
Title: Re: There was an issue loading the project
Post by: Goombert on January 25, 2014, 02:44:53 PM
Ok, about time, at least we got the LGM/plugin bugs out of the way. So now we are trying to compile with ENIGMA correct?

Also, I am going to do something about that save dialog always screwing up the extensions on files, that's quite annoying, it should not be .project.gmx.egm, it should just be .egm

This looks like more issues with ENIGMA parsing Drag and Drop actions.

Here is the full compile log for anybody else taking a look.
http://pastie.org/8667165
Title: Re: There was an issue loading the project
Post by: egofree on January 25, 2014, 03:33:28 PM
I did more tests in order to understand what is the problem. With the object 'obj_display_level', i've removed everything, except the variable declaration, in the create event (Action : Set variable counter to 2). Always the same error. If i duplicate the object, same error with the new object, but if i create manually a new object with the same declaration, no error. Very strange !
Title: Re: There was an issue loading the project
Post by: Goombert on January 25, 2014, 03:34:35 PM
Try giving it a different name, counter might be used somewhere else in our engine and not namespaced properly, call it mycounter or something, see if that works.
Title: Re: There was an issue loading the project
Post by: egofree on January 25, 2014, 03:38:19 PM
Try giving it a different name, counter might be used somewhere else in our engine and not namespaced properly, call it mycounter or something, see if that works.

Yes, it works. But explain to me why this problem occurs only with the imported objects !?  ??? If you create a new object with the variable counter, there is no problem. Doesn't that mean it could be a problem in the import function ?
Title: Re: There was an issue loading the project
Post by: egofree on January 25, 2014, 03:41:30 PM
Also, in the object 'obj_game_controller', i've the same error message, despite that nowhere in this object i use a counter variable. So in this case i don't know that to do.
Title: Re: There was an issue loading the project
Post by: Goombert on January 25, 2014, 04:12:10 PM
I'll have to take a look after bit dude, I just got done shoveling snow, but this is a weird issue.

Edit: this is even more weird, the variable "counter" is defined nowhere in ENIGMA's engine
Title: Re: There was an issue loading the project
Post by: Josh @ Dreamland on January 25, 2014, 04:36:23 PM
If creating a duplicate object manually fixes the problem, then there's likely an issue in the code LGM is sending ENIGMA. So there's an invisible problem in the code that was imported.
Title: Re: There was an issue loading the project
Post by: Goombert on January 25, 2014, 04:41:34 PM
I just checked the preprocessor environment folder, and indeed the variable is not being declared for the object.
Code: (C++) [Select]
 
struct OBJ_obj_display_level: object_locals
{
  // Local variables
  var LEVEL_DISPLAYED;
  var game_state;
  var rectangle_height;

Josh, this can't be anything LGM related, as this game compiled in just the last few releases, and I haven't changed anything to do with writing objects or any of that.

Testing on a blank project, for some reason, does allow a variable to be named "counter".
Changing the DND actions to a code action with
Code: (EDL) [Select]
rectangle_height = view_hview[0]/2;
counter = 2;

in the create event, does not resolve the problem.
Title: Re: There was an issue loading the project
Post by: egofree on January 26, 2014, 05:17:25 AM
I did more tests and i think there is still problems with the LateralGM editor and its importing function. I did a new import of my project and i removed everything except object 'obj_display_level' and the variable counter :

(http://nsa20.casimages.com/img/2014/01/26/14012611080174077.png)

And i've still a lot error messages. I saved the project and i tried to open again the project and i've seen that it didn't remove everything :

(http://nsa31.casimages.com/img/2014/01/26/140126112153613967.png)

So i removed again the remaining objects, except the objet 'obj_display_level', and this time it worked ! So i think the problem comes from the importing function.
Title: Re: There was an issue loading the project
Post by: Goombert on January 26, 2014, 07:08:09 PM
Either that or the project could be corrupted in another way, I'll take a look again in the morning egofree, I am tired at the moment from diagnosing the ICO format issue.

The resources reappearing was an issue in LateralGM when I implemented the recursive deletion I did not have it recursively iterate children of group nodes.
https://github.com/IsmAvatar/LateralGM/commit/b63cf18a1efdf5607bafbe453a39feba607250fe
Please update LateralGM and the plugin and you'll be able to delete multiple resources at once properly.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages

I have also updated the Windows Portable ZIP.
http://enigma-dev.org/docs/Wiki/Install:Windows

You are good at finding bugs egofree, but hey at least were getting them fixed. Now back to figuring out why it won't compile.
Title: Re: There was an issue loading the project
Post by: egofree on January 27, 2014, 12:35:54 PM
Concerning the error with the counter variable, it was caused by not converting a 'globalvar counter' to 'Int counter' in a script.
I think i found another importing error. In the event 'End of Path' of the object 'obj_game_over' and in the event 'press <Any Key>' of the object 'obj_title', i've used the action 'Go to room'. But in the converted project, the room is set to none, and if i try to set the room, i've still the following error message :

Quote
In file included from SHELLmain.cpp:82:0:
Universal_System/actions.h:221:13: note: declared here
 inline void action_another_room(const int roomind, const int transition) {
             ^
ty.h: In member function 'virtual variant enigma::OBJ_obj_game_over::myevent_pathend()':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:2266:28: error: too few arguments to function 'void enigma_user::action_another_room(int, int)'
   action_another_room(title);

It's not possible to set the transition effect. It can be fixed if i create again the action.
Title: Re: There was an issue loading the project
Post by: Goombert on January 28, 2014, 03:27:37 AM
Alright I just got done implementing some other plugin fixes, I'll investigate and fix this and it will be included in a major plugin/LGM update.

You were correct it was not adding a postponed reference for the room.
Code: (XML) [Select]
        <functionname>action_another_room</functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>11</kind>
            <room>title</room>
          </argument>
        </arguments>

The reason was because Room's were missing from the Action Library reading for GMX. I have addressed the issue fully in the following commit.
https://github.com/IsmAvatar/LateralGM/commit/22d6fd2bfc5fd5aff7a6fcaedf06916eb912c03a

I have tested this very well and it appears to have resolved the issue now and both of the actions in both objects load and save with the correct room. Please update both LateralGM and the plugin this time as this will include other bug fixes, you can obtain them from the following page.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages
When you have patched both jar files you need to run git fetch then git pull to have my new compiler callback implemented.

You can also simply update via re-downloading the Windows Portable ZIP.
http://enigma-dev.org/docs/Wiki/Install:Windows
Title: Re: There was an issue loading the project
Post by: egofree on January 28, 2014, 04:14:02 AM
Ok, i've fixed the previous errors. But now in the progress windows it says an error occurred, but i don't see any in the log : http://pastebin.com/TiiLv5Pr

Here is my latest project file : https://dl.dropboxusercontent.com/u/29802501/son_of_blagger.egm
Title: Re: There was an issue loading the project
Post by: Goombert on January 28, 2014, 04:38:40 AM
Looks like it failed to output the reason which was according to output_log.txt the following.

Quote
Creating room creation code scope and parsing
scr_init_title ( ) Second pass...
done. collecting variables...
Collecting some variables...
  Calls script `scr_init_title'
 done>scr_init_game ( ) ; scr_init_sound_system Syntax error in room creation code for room 1 (`main'):
2

When I looked at the code, only the first script was highlighted.
Code: (EDL) [Select]
scr_init_game();
scr_init_sound_system();
And sure enough, the script called scr_init_sound_system doesn't exist under the Scripts folder.
Title: Re: There was an issue loading the project
Post by: egofree on January 28, 2014, 05:24:41 AM
There is still the errors with the 'Goto room'. Now the room is set correctly, but it's still not possible to set the transition.
Title: Re: There was an issue loading the project
Post by: Goombert on January 28, 2014, 06:08:20 AM
Ugh, that is the result of not updating the action library, I'll fix it in the morning.
Title: Re: There was an issue loading the project
Post by: egofree on January 28, 2014, 12:23:04 PM
I've no more errors message at compile time.  Things are getting interesting.  :D
I use 'sprite fonts' to display text. There is a problem : all characters indexes are shifted by one (A->B, B->C, etc.) :

(http://nsa20.casimages.com/img/2014/01/28/140128062053291246.png)

The text should be : 'Press a key to start'. So i told to myself, let's add an empty font in the sprite spr_fonts, by adding a new sub-image, and it works. Then i save the project, and i load it again, and all fonts are erased ! I tried this operation several times, same result. Here is the project file, before inserting the new empty character : https://dl.dropboxusercontent.com/u/29802501/son_of_blagger%20original.egm
Title: Re: There was an issue loading the project
Post by: Goombert on January 28, 2014, 06:55:03 PM
Ok, well at least you got it running, give me tonight and I'll come back with most if not all of those bugs fixed.

I did a fresh extraction of your GMX and also discovered that you for some reason have an fout and vout shader stored under your sprites/images folder. Those two shader files are not supposed to be in that folder and they arent in the original resource tree either, so why did Studio put those files there?
(http://i.imgur.com/NQctaOK.png)

Quote
Now the room is set correctly, but it's still not possible to set the transition.
The reason you can't set the room transition is because those were deprecated in Studio.
(http://i.imgur.com/aUdHaDx.png)
I'll see what I can do about it.

Quote
There is a problem : all characters indexes are shifted by one (A->B, B->C, etc.) :
I'll do a regression test and see what caused this bug to popup again.

Quote
Then i save the project, and i load it again, and all fonts are erased ! I tried this operation several times, same result.
I was able to reproduce this bug and fix it in the following commit.
https://github.com/IsmAvatar/LateralGM/commit/b4c289246e754af525446169a62b482bb1896eac
Title: Re: There was an issue loading the project
Post by: egofree on January 29, 2014, 04:36:50 AM
Those two shader files are not supposed to be in that folder and they arent in the original resource tree either, so why did Studio put those files there?

I think at first i made some tests with shaders, then i deleted them in the projects, but they remain in the folder.

The reason you can't set the room transition is because those were deprecated in Studio.

This is strange as i use the latest version of Studio (Well, it was 6 months ago). Anyway it's not a big deal, as i can fix easily the problem by creating again these actions.
Title: Re: There was an issue loading the project
Post by: Goombert on January 29, 2014, 04:54:03 AM
Quote
I think at first i made some tests with shaders, then i deleted them in the projects, but they remain in the folder.
Ok, but in the Sprite images folder? lol how did it get in that exact folder?

Quote
This is strange as i use the latest version of Studio (Well, it was 6 months ago). Anyway it's not a big deal, as i can fix easily the problem by creating again these actions.
Oh wow, this shouldn't even be an issue, the reason it is, it is hardcoded into the GMX. I decided to file a bug report specifically for this issue.
https://github.com/IsmAvatar/LateralGM/issues/106
I have added support for both versions of action_another_room in ENIGMA's engine in the following commit.
https://github.com/RobertBColton/enigma-dev/commit/88bdcf48441bb18359f6f9437312af25bf49c744

LGM's default action_another_room, does let you set the transition.
(http://i.imgur.com/l68ObDX.png)

Quote
There is a problem : all characters indexes are shifted by one (A->B, B->C, etc.) :
I fixed it in the following commit. This time, I removed the fix, this also fixes the same issue in cheeseboys game. So that means this bug was magically fixed along the way and our hack fix was breaking it this time, possibly I fixed it with something I did LGM side?
https://github.com/RobertBColton/enigma-dev/commit/6f5292a4964d3e4be9a4152b99837819224d0ffb
Title: Re: There was an issue loading the project
Post by: egofree on January 29, 2014, 08:37:30 AM
Ok, another problem when converting  :D : Constants are not converted. In my gmx project file, i've 24 constants defined, but none are defined in the converted project.

EDIT: If i try to manually add constants, they are not saved in the project. If you try to load again the project, constants are gone.
Title: Re: There was an issue loading the project
Post by: Goombert on January 29, 2014, 03:34:08 PM
Quote
Ok, another problem when converting  :D : Constants are not converted. In my gmx project file, i've 24 constants defined, but none are defined in the converted project.
I never added them to the GMX reader, I can add them next, this might be an issue though since GMX stores several copies, I'll work this out next.

At any rate, if you want the fixes from last night, update from the repository with the following commands.
Code: (Bash) [Select]
cd enigma-dev
git fetch
git pull

Then replace both the LateralGM and plugin jars.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages

You can also download the newest version of the Windows Portable ZIP.
http://enigma-dev.org/docs/Wiki/Install:Windows
Title: Re: There was an issue loading the project
Post by: egofree on January 30, 2014, 02:11:02 PM
Great, a lot of errors have been fixed.  (Y)
If you enter some code in 'Definitions' (Enigma Settings), you save the project, and you restart a new project, the code is still there.
I've some problems with arrays. I try to use multi-dimensional arrays. I think they are based on c++ structure.

I tried :

Code: [Select]
int jump_path [1][1];
jump_path[1,1] = 1;

or

Code: [Select]
int jump_path [1][1];
jump_path[1][1] = 1;

But i've the same following error message:

Quote
In file included from SHELLmain.cpp:102:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_scr_0(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:34:17: error: 'jump_path' cannot be used as a function
   jump_path(1, 1)= 1;

Am i doing something wrong ?