Author Topic: Updating Lem3Edit {v2.1 - 05/05/2018}  (Read 4563 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 2488
    • View Profile
    • Lix
Re: Updating Lem3Edit {v1.3 - 12/02/2018}
« Reply #30 on: February 15, 2018, 02:55:32 am »
We need a spoiler for that? :o ??? :P

Very nice, I had a good laugh earlier. Yeah, maybe others want to see the build fail and discover the exciting errors for themselves. >_>

I forgot about the code tag, which makes far more sense and also limits vertical height of long code.



Okay, I got the CMake/make build to compile: The CMake compiles all C files in src, not only C++ files, and it will link against stdc++fs. With this, the project compiles and links on Linux with GCC. :thumbsup: I will make a pull request from this. No idea whether this library is the same for all compilers.

When I run the game, I get a hollow editor window (you can see through it to application windows or the desktop behind it) and a nice file browser to select the L3CD.EXE.

When I select the L3CD.EXE, program crashes:

Code: [Select]
import Tkinter,tkMessageBox;root=Tkinter.Tk();root.withdraw();res=tkMessageBox.showinfo(icon='info',title='Welcome to Lem3edit!',message='Excellent! You've successfully set up Lem3edit!\n\nThis was one-time installation.');
^
SyntaxError: invalid syntax
Thread 1 "lem3edit" received signal SIGSEGV, Segmentation fault.
0x00007ffff7b09e3c in ?? () from /usr/lib/libSDL2-2.0.so.0
(gdb) bt
#0  0x00007ffff7b09e3c in ?? () from /usr/lib/libSDL2-2.0.so.0
#1  0x00005555555986b1 in Mainmenu::refreshPreviousPackText() ()
#2  0x0000555555597bf3 in Mainmenu::Mainmenu(Ini*, Editor*) ()
#3  0x00005555555a8d8a in main ()

When I run lem3edit again, I get "Oh no! Lem3edit could not find all of the data it will need to run. [...]", and program terminates without segfault.

-- Simon
« Last Edit: February 15, 2018, 03:21:25 am by Simon »

Offline kieranmillar

  • Posts: 185
    • View Profile
Re: Updating Lem3Edit {v1.3 - 12/02/2018}
« Reply #31 on: February 15, 2018, 07:21:26 am »
Well that stinks.

Hopefully your ini file saved the path to L3CD.EXE successfully. It's stored in the same location as the executable. Could you please open it up and check that the first entry shows a valid file path to L3CD.EXE and hopefully not some garbage.

Offline Simon

  • Administrator
  • Posts: 2488
    • View Profile
    • Lix
Re: Updating Lem3Edit {v1.3 - 12/02/2018}
« Reply #32 on: February 15, 2018, 07:29:10 am »
Here's my lem3edit.ini:

Code: [Select]
CD="/home/simon/c/notown/l3cd-edit/L3CD.EXE"
INSTALL=""
DOSBOX=""
LASTPACK=""

The file named between the quotes exists (I can copy this string into a shell, prepend with the 'file' command, and have that tell me it's an MS-DOS executable), and it's the L3 executable.

I haven't tried serious debugging yet. At least in Mainmenu::refreshPreviousPackText, it's not enough to wrap the usage of PreviousPackText in a non-null check. I'll continue to dabble with the debugger and random changes that seem meaningful.

-- Simon

Offline kieranmillar

  • Posts: 185
    • View Profile
Re: Updating Lem3Edit {v1.3 - 12/02/2018}
« Reply #33 on: February 15, 2018, 07:42:38 am »
Ok that's good. However future runs falling over at finding the game data is odd and implies there is some issue with the c++ filesystem code you're linking. Similarly the first line of your error suggests the game data was all found but then there was a problem displaying the message box to tell you it was all OK. Weird.

I'll look into this after work but if you want to help with debugging, then I think validate() in ini.cpp is the first place to start. Or it has a name similar to that at least.

Offline kieranmillar

  • Posts: 185
    • View Profile
Re: Updating Lem3Edit {v1.3 - 12/02/2018}
« Reply #34 on: February 15, 2018, 07:46:02 am »
Actually my ini file doesn't show any of the double quotes on any line. I presume that's just a way it needs to be done on UNIX but maybe that's a source of the problem too, when tying to load that path in future runs.

Offline kieranmillar

  • Posts: 185
    • View Profile
Re: Updating Lem3Edit {v2.0 - 17/02/2018}
« Reply #35 on: February 17, 2018, 11:21:58 pm »
This version sees the first release of the level pack tool, a feature that helps in the organisation of your levels.

It's really important that you read the documentation on this tool in the README file. As long as you don't muck around with the files in the directory manually, it's pretty robust, but may want to make a backup of your precious levels just in case.

v2.0 changelog:
  • New level pack tool! Better organise and re-order your levels with a special interface.
  • Level Editor now asks if you want to save before closing the level.
  • More robust handling of copying single levels.
  • Fixed bug with the ini file saving filepaths with double-quotes when compiling on Linux.
  • Many crash fixes on Linux.
  • Better CMake support and build instructions. (Thanks Simon!)
« Last Edit: February 18, 2018, 12:06:48 am by kieranmillar »

Offline kieranmillar

  • Posts: 185
    • View Profile
Re: Updating Lem3Edit {v2.1 - 05/05/2018}
« Reply #36 on: May 05, 2018, 08:42:30 pm »
Got a new laptop! Discovered when setting things up that the lem3edit download didn't work properly from a fresh install as it was missing a dll! Whoops! Anyway I took the opportunity to fix and outstanding bug and add a feature I was planning to add.

I have also decided that the test level feature isn't something I want to add. I did just fine without it making all of the levels of my L3 pack. As such, there is nothing left that I really want to implement and so I am going to take this tool out of active development and move it into support. I will update any bugs and may add some features if requested. Thanks to all who supported the development of this, particularly Simon. I am sure one day I will finish these 8 remaining Shadow levels and can release a full L3 pack that nobody will ever play. Hooray!

v2.1 changelog:
  • Bug fix: Level starting screen position no longer allows invalid vertical starting positions.
  • Bug fix: Download now contains all dlls needed for the program to function (error in previous version download)
  • Can now scroll through the pack editor lists with the scroll wheel.
  • Main menu no longer contains struck-out Options menu.
  • Added check on program start to ensure gfx folder exists to prevent crash.
  • Ini file no longer contains unused options.

Offline 607

  • Posts: 326
    • View Profile
Re: Updating Lem3Edit {v2.1 - 05/05/2018}
« Reply #37 on: May 22, 2018, 01:27:30 pm »
Very good! I'll have to admit I also likely won't ever use it... :P But I'm glad a fully functional tool exists!