Pages: 1 [2]
  Print  
Author Topic: Lua Extension  (Read 4657 times)
Offline (Unknown gender) sorlok_reaves
Reply #15 Posted on: May 04, 2015, 09:46:39 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
Ah, my fix was just for saving + loading with constants. LGM doesn't actually freeze that much on Linux. I can still post the jar if you want.

Are you sure that LGM is getting enough memory on Windows?

As a point of reference, I've never had LGM crash during either of the 2 Ludum Dares I did (so, 2 * 48h).
Logged
Offline (Unknown gender) TheExDeus
Reply #16 Posted on: May 05, 2015, 10:25:33 AM

Developer
Joined: Apr 2008
Posts: 1914

View Profile
Maybe it's a Windows only bug. I haven't used LGM with Linux that much. Memory wise there shouldn't be a problem, as it crashes also when no project is opened. Just open LGM, add a room and press Run. At about 30% rate it will crash. And when it crashes with a an open project, the project doesn't need to be complicated. Here is a screenshot:

You can see it crashes at "Populating communication buffer". Memory is low (200mb) and the project is empty. In this case I had to compile the project 3 times until it crashed. The first two it didn't. On average it takes about three times, but it has happened on the first one as well. It does seem that the memory slightly increases every time I press Compile. Maybe some kind of memory leak? It doesn't allow me to debug in Windows, as the ENIGMA.exe doesn't even run then. And I don't know how to debug .jar's. Maybe on Linux regular wallgrind can do it?
Logged
Offline (Unknown gender) TheExDeus
Reply #17 Posted on: May 10, 2015, 10:36:23 AM

Developer
Joined: Apr 2008
Posts: 1914

View Profile
I cannot find any information on why it keeps crashing. Sometimes it's so frustrating that it crashes 10 times in a row. It doesn't write any crash dump (maybe windows does?) and I cannot run any of it in some kind of debug mode. I think the problem is in either the JNA or the plugin, as the crashes happen ONLY when using the plugin buttons (Run, Compile etc.). But that means the .jar talks with another .jar and so it makes sense that I cannot debug it. Maybe someone with more Java knowledge can see what is up. Because the crashing is unbearable.

edit: The only windows log that is created is this: http://pastebin.com/3GT9hQ2f . I have a .egm that crashes every time on my PC (so I cannot run it at all), but runs fine on my laptop ("fine" meaning it crashes 50% of time, not 100%). When I save a .gmk I can get it to run with the 50% though.
« Last Edit: May 10, 2015, 11:08:32 AM by TheExDeus » Logged
Offline (Male) WizzardMaker
Reply #18 Posted on: May 11, 2015, 04:43:52 AM
Member
Joined: Feb 2015
Posts: 35

View Profile
A possible way to fix it is to finish the cpp/c version of LGM, that would fix the problem and remove the need of java
Logged
Offline (Unknown gender) TheExDeus
Reply #19 Posted on: May 11, 2015, 06:12:40 AM

Developer
Joined: Apr 2008
Posts: 1914

View Profile
You mean NaturalGM? Sadly we have problems with developers in this regard. Java was developed for almost 10 years or so, and thus it's not that easy to replicate all that very rapidly. If all else fail I will start creating an IDE in ENIGMA, but that will be slow and probably not really functional for a long time (especially if I make it alone). Right now I'm working on GUI stuff and fixing bugs in ENIGMA, but right now i'm the only one working on it.
« Last Edit: May 11, 2015, 06:26:54 AM by TheExDeus » Logged
Offline (Unknown gender) Darkstar2
Reply #20 Posted on: May 14, 2015, 01:48:29 PM
Member
Joined: Jan 2014
Posts: 1211

View Profile Email
It is something I tried once doing and intended to, but I don't know the format used for the room data, it is all a mystery to me.  If I were to make an IDE though, I would use the same system as GMS, meaning use all your resources externally instead of saving everything packed in the project file.  Currently, the way enigma plugin works is that it takes whatever is loaded in memory and passes it along....it's ridiculous, I think GMS' has a better approach to handling this.

If we had a fully functional CLI it would greatly help to do an IDE.
Or even integrate that CLI to the current IDE and get rid of the current plugin, as definitely what is causing stability issues is NOT the IDE alone but the enigma plugin.  When using the LGM alone without the plugin it's a whole different ball game.
Logged
Offline (Male) Goombert
Reply #21 Posted on: July 31, 2015, 12:59:36 AM

Contributor
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3060

View Profile
Was this merged into the main repo?

I've moved this temporarily down to Function Peer Review as I am not quite sure where it belongs on the board.
Logged
Offline (Unknown gender) TheExDeus
Reply #22 Posted on: July 31, 2015, 04:40:38 PM

Developer
Joined: Apr 2008
Posts: 1914

View Profile
No, it is an extension and is not meant to be in main repo. It adds an additional dependency. We should have an additional way to share extensions trough some kind of extension database which could even be integrated in ENIGMA/LGM. But until more people are making extensions the forum suffices. I also have an AngelScript extension which I won't put in the repo. I haven't shared it here either though.
Logged
Offline (Male) HitCoder
Reply #23 Posted on: September 05, 2015, 11:50:47 AM

Member
Location: King's Lynn, Norfolk, England, United Kingdom
Joined: Aug 2014
Posts: 128

View Profile WWW Email
error...

Code: [Select]
In file included from Universal_System/Extensions/Lua/lua.cpp:1:0:
Universal_System/Extensions/Lua/include.h:10:22: fatal error: LuaState.h: No such file or directory
 #include <LuaState.h>
                      ^
compilation terminated.
g++ -std=c++11 -Wall -s -O3 -fno-rtti -fno-exceptions -DPATH_EXT_SET -IPlatforms/xlib/Info -IGraphics_Systems/OpenGL1/Info -IAudio_Systems/OpenAL/Info -ICollision_Systems/Precise/Info -IWidget_Systems/None/Info -INetworking_Systems/None/Info -IUniversal_System/Info -I. -I/home/hitcoder/.enigma/ -Wall -s -O3 -fno-exceptions -fexceptions  -MMD -MP -c -o /home/hitcoder/.enigma/.eobjs/Linux/Linux/Run/SHELLmain.o SHELLmain.cpp
In file included from /home/hitcoder/.enigma/API_Switchboard.h:48:0,
                 from SHELLmain.cpp:60:
./Universal_System/Extensions/Lua/include.h:10:22: fatal error: LuaState.h: No such file or directory
 #include <LuaState.h>
                      ^
compilation terminated.
make[1]: Leaving directory `/home/hitcoder/enigma-dev/ENIGMAsystem/SHELL'
make: *** [Game] Error 2

sorry for large text dump :/

OS: Linux Mint XFCE 17.2
« Last Edit: September 05, 2015, 11:52:38 AM by HitCoder » Logged
Offline (Male) WizzardMaker
Reply #24 Posted on: September 06, 2015, 04:23:24 AM
Member
Joined: Feb 2015
Posts: 35

View Profile
The included files are all in the mingw folder of my repository and I dont have enigma on my linux so I dont know what your include folder is called, you could move/copy those files to the folder of the extension and rewrite the include line
Logged
Offline (Male) WizzardMaker
Reply #25 Posted on: January 11, 2016, 04:10:50 PM
Member
Joined: Feb 2015
Posts: 35

View Profile
Its been a long time since somebody replied to this topic, and I want to know if there is something I should do with this extension, if somebody is using it, or if its utterly broken but no one wants to tell me.
Logged
Offline (Male) HitCoder
Reply #26 Posted on: January 11, 2016, 04:43:47 PM

Member
Location: King's Lynn, Norfolk, England, United Kingdom
Joined: Aug 2014
Posts: 128

View Profile WWW Email
Been unable to use it as I haven't opened Enigma for weeks, been messing with visual studio, but if I get the opportunity I'll take a look in the next couple of days.
Logged
Offline (Male) Garo
Reply #27 Posted on: January 12, 2016, 01:30:00 PM

Member
Location: Szczecin, Poland
Joined: Sep 2014
Posts: 22

View Profile
I gave it a try. I several things and it seemed to finally work when I moved the folder from Additional to usr. Unfortunately it seems that the static library files weren't compatible with Linux.
Logged
Offline (Male) WizzardMaker
Reply #28 Posted on: January 13, 2016, 12:39:11 AM
Member
Joined: Feb 2015
Posts: 35

View Profile
Yeah, Linux is something I cant really try as I dont have a stable linux machine. I will try to fix some problems using a VM
Logged
Pages: 1 [2]
  Print