[SOLVED] Cannot start new game

[SOLVED] Cannot start new game

Postby moonrise » 14 Dec 2014, 13:34

I was unable to find if anyone else had the same trouble. Game builds and launches normally.
From the main menu I can change settings and can exit. But whenever I try to start new game
it just shows me start screen again. When launched from terminal it outputs:
{l Code}: {l Select All Code}
ERROR:/build/buildd/valyriatear-1.0.0/src/engine/script/script.cpp:HandleLuaError:83:
a runtime Lua error has occured with the following error message:
 
ERROR:/build/buildd/valyriatear-1.0.0/src/engine/script/script.cpp:HandleLuaError:85:
dat/actors/map_sprites.lua:612: attempt to index field 'object_supervisor' (a function value)
ERROR:/build/buildd/valyriatear-1.0.0/src/modes/map/map_mode.cpp:_Load:735:
Invalid map Load() function in dat/maps/introduction.lua. The function wasn't called.
WARNING:/build/buildd/valyriatear-1.0.0/src/engine/mode_manager.cpp:Update:286:
Tried to pop off more game modes than were on the stack!
Last edited by moonrise on 19 Dec 2014, 19:52, edited 1 time in total.
User avatar
moonrise
 
Posts: 4
Joined: 14 Dec 2014, 13:29

Re: Cannot start new game

Postby Bertram » 15 Dec 2014, 11:44

Hi moonrise, :)

{l Code}: {l Select All Code}
dat/actors/map_sprites.lua:612: attempt to index field 'object_supervisor' (a function value)

The game seems unable to reach a component from the map mode which is fairly used by the engine in game:
https://github.com/Bertram25/ValyriaTea ... gs.cpp#L83

If I understand correctly, lua is misinterpreting the object_supervisor object as a function, and functions in lua can only be called, not used as objects.

I'm very sorry this is happening to you. I've got an idea on how to improve the situation for the next VT release by turning this lua function back to a C++ one. (I did have to do that for a few ones already since certain objects memory addresses can be randomly misinterpreted depending on the lua versions and the architecture used.)


Can you tell me a few things (might help)?
- Your architecture and distribution or operating system.
- What source or binary version you're currently using.
- Whether you can and are willing to compile the game?

Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Cannot start new game

Postby moonrise » 16 Dec 2014, 19:29

Of course. I'm using Ubuntu 14.10 and I tried VT release 1.0.0 (downloaded source from GitHub).
I tried both 32 and 64 bit architectures with the same result.
I have no problem compiling the game. If anyone else want to try this very build, there is an
Ubuntu package in my PPA: https://launchpad.net/~sbasalaev/+archive/ubuntu/pub
User avatar
moonrise
 
Posts: 4
Joined: 14 Dec 2014, 13:29

Re: Cannot start new game

Postby Bertram » 17 Dec 2014, 09:31

Side-note: I'm glad also Sergey has worked on providing Valyria Tear for Ubuntu :] Thank you Sergey if you somehow read this, I'll add you in the port makers and link the PPA in the website.

Hi moonrise, and thanks for the info and link.

From what I can see, there seem to be a short and a somewhat longer-term fix (or at least an attempt to.):

1. From what I can see in the configure rules of Sergey's package configuration, he's using the system luabind package:

{l Code}: {l Select All Code}
[code]override_dh_auto_configure:
   dh_auto_configure --buildsystem=cmake --parallel -- -DUSE_SYSTEM_LUABIND:BOOL=ON[/code]

It's not that I mistrust Ubuntu's work on luabind, but as we may have different optimization fixes, would you mind to first have a go at downloading the source package,
and try the usual 'cmake . && make' there?
Here is the download link: https://github.com/Bertram25/ValyriaTea ... 0.0.tar.gz
You can also clone the git master version and have a go at compiling that one: https://github.com/Bertram25/ValyriaTear

If you need more info on how to compile, feel free to ask. :)

2. As a longer-term fix, I'm working on streamlining the MapMode and the ObjectSupervisor to get rid of direct member calls and some uselessly twisted logic there.
I'll let you know once I've got a fix on master. If you're willing to download the latest master version there, you'll then be able to test all that.

Just give me a few days and this should be sorted out.

Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Cannot start new game

Postby Akien » 17 Dec 2014, 13:43

Bertram {l Wrote}:Side-note: I'm glad also Sergey has worked on providing Valyria Tear for Ubuntu :] Thank you Sergey if you somehow read this, I'll add you in the port makers and link the PPA in the website.

I think moonrise is Sergey ;-)
Godot Engine project manager and maintainer.
Occasional FOSS gamedev: Lugaru, OpenDungeons, Jetpaca, Minilens.
User avatar
Akien
 
Posts: 737
Joined: 22 Feb 2014, 13:14

Re: Cannot start new game

Postby Bertram » 17 Dec 2014, 15:43

XD Ah well...

If so, he would then read the thank you note. ;)
The map mode and map object have got a lot of rough history code when you come to look at it. So, this will be a nice API and scripting API cleanup and will probably fix the problem.

I'm on it in any case.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Cannot start new game

Postby moonrise » 19 Dec 2014, 19:52

Akien {l Wrote}:I think moonrise is Sergey ;-)


Correct, it's me :)

Rebuilt with internal luabind and it works, thanks!
I think the problem is that in Ubuntu luabind is patched to work with Lua 5.2.
To compile VT I rebuilt it against Lua 5.1, but maybe after patching it became not so
backwards compatible.
User avatar
moonrise
 
Posts: 4
Joined: 14 Dec 2014, 13:29

Re: [SOLVED] Cannot start new game

Postby Bertram » 19 Dec 2014, 20:53

Cool! :)

Yet, I'm on a better fix, that is streamlining a lot of this old API.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: [SOLVED] Cannot start new game

Postby Bertram » 22 Dec 2014, 20:18

@moonrise:

Btw, while I see it, VT should be fully compatible against lua 5.2 if you can use luabind compile against lua 5.2 as well.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Who is online

Users browsing this forum: No registered users and 1 guest