Crashes from using Frogatto as a depencency


#1

When I attempt to start any module which uses Frogatto as a dependency (such as Elisa and Weregild), I get an Assertion Error:

Assertion failed
formula.cpp:838 ASSERTION FAILED: Unknown symbol 'screen_shake' in custom_obj At modules/frogatto/data/objects/playable/frogatto_playable.cfg 2705:
level.player.screen_shake( if(facing = 1,180,0), 30, 20,15)
             ^-----------^

It then lists all known symbols, which include _ data, accel _ x, arg, and many others.
Does anyone know a fix for this, or, at least, why this happens?
I got the latest of both Anura and Frogatto sources and compiled from source yesterday. I have gotten the latest Weregild and Elisa folders today.
Thank you in advance.


#2

Hmm, I was also getting stumped there this week, when I was trying to see what needed to be done first in order to fix weregild (it has been on hiatus while we work harder on Frogatto)
Gotta have a look.


#3

@Jetrel was working on screen shaking a few days back - he said the old implementation was junk, and that as he had written it he should know. :slight_smile: I wouldn’t be surprised if level.player.screen_shake has been removed entirely as we switch in the new system. Unfortunately, I don’t know what the new system is - we didn’t use the old screen_shake in Frogatto itself. If you can, just comment out those lines for now.

Unfortunately, Elisa and Weregild are only usually updated for our releases - we need a better system, but it’s an ongoing problem that’s somewhat fallen by the wayside. We could do continuous deployment, just a test really to see if the module still starts up would cover most of the cases due to our type system, but the person who breaks it often isn’t the person who fixes it.


#4

Thank you, that worked well very well! However, I wonder why screen_shake works fine in Frogatto but not when a module uses it as a dependency. It seems strange.


#5

Ahh, I see, elisa and weregild have
"dependencies": "frogatto",
in their module.cfg files; frogatto itself has the lib_2d dependency (where we factored out some graphical methods that we can use for different projects), and the engine isn’t loading frogatto’s dependencies as well
(Is this something that should be looked at, @Dave and @krista?)
So:
I’m not sure what exactly those modules need from the frogatto module; you could try removing that dependency and see what happens. (or I’ll get around to that, later this evening)
Alternatively, for the time being, a better workaround for the problem you faced should be to add lib_2d to the module’s dependencies instead of removing frogatto’s screenshake.


#6

Okay, Dave looked further into this, so the frogatto module makes some assumptions about the player character that don’t apply to the characters in elisa or weregild; I think that tomorrow I’ll focus on making those modules only depend on lib_2d and copy over whatever they actually need from frogatto.


#7

Okay, I’'ve removed frogatto as a dependency for those two modules; there isn’t much in elisa for the time being since I’ve removed the tiles/backgrounds it was borrowing from frogatto, but weregild is almost back to its previous, pre-hiatus state.