ENIGMA Forums

General fluff => General ENIGMA => Topic started by: sorlok_reaves on June 13, 2014, 05:47:50 PM

Title: Timelines won't update correctly after saving.
Post by: sorlok_reaves on June 13, 2014, 05:47:50 PM
Hello!

I've been tracking down the issue egofree reported in the Timelines announcement thread, and I think I've finally got it narrowed down. Please refer to the image at the bottom of this post. Also, you'll need egofree's test game:
https://dl.dropboxusercontent.com/u/29802501/TestTimeLine.gmx.zip

Open the game, and open the first timeline's Step 60 code. You'll see show_message(60);. This (at least on Linux) will fail to compile, so change it to:  show_message("60"); (note the quotes). Now, save the game and compile it without closing the editor. As you can see from the picture:
A) the "code" window shows the updated text
B) the filesystem itself shows the updated text
C) the compiler is still using the old text.

After some more digging, I found out that:

Does anyone (esp. Robert) know if there's special code that "refreshes" objects when they're saved to disk (or when the "ok" button is checked in Lateral GM), and if the same logic is not being run for timelines? I can try to narrow this down further, but I honestly haven't done much work with Lateral GM, so if this is an easy fix I'd appreciate if someone could let me know.

(http://i.imgur.com/0BPyGtj.png)
Title: Re: Timelines won't update correctly after saving.
Post by: Josh @ Dreamland on June 14, 2014, 09:14:02 AM
Amazing how we do no caching and still have cache problems. What if you click the green check in the code window? That should almost certainly fix it without reloading LGM.

It may be that the "Save" action is custom-tailored to iterate open dialogs and grab their updated version.
Title: Re: Timelines won't update correctly after saving.
Post by: sorlok_reaves on June 15, 2014, 07:42:08 PM
Amazing how we do no caching and still have cache problems. What if you click the green check in the code window? That should almost certainly fix it without reloading LGM.

It may be that the "Save" action is custom-tailored to iterate open dialogs and grab their updated version.

Clicking the green check mark in the code window does not fix the problem.
Title: Re: Timelines won't update correctly after saving.
Post by: Josh @ Dreamland on June 15, 2014, 08:32:27 PM
In the code and the timeline? And opening them back up reveals the changes have been saved internally? There's literally no other place for this information to exist.... If that's really happening, something more than a little fishy is going on.
Title: Re: Timelines won't update correctly after saving.
Post by: sorlok_reaves on June 15, 2014, 08:59:26 PM
In the code and the timeline? And opening them back up reveals the changes have been saved internally? There's literally no other place for this information to exist.... If that's really happening, something more than a little fishy is going on.

Yes, that is what I think is happening. It is entirely possible I am making a mistake, so I've uploaded a video that shows the entire process. (Please view at 1080p.) Note the error in the output console, and the correct text (every time) in the code window:

https://www.youtube.com/watch?v=LdcxRaT_3-o&vq=hd1080
Title: Re: Timelines won't update correctly after saving.
Post by: Josh @ Dreamland on June 15, 2014, 10:08:52 PM
(http://ecx.images-amazon.com/images/I/41X6gycIbIL._SY300_.jpg)

Well, I don't cache anything. I don't know where this is happening. It's possible someone butchered the code I wrote that checks if a file will change before re-writing it (touching it) to reduce compile time, and managed to just not update timelines at compile time. Could you print the code ENIGMA is receiving and verify it's up-to-date? If it isn't, it's being cached LGM-side. Otherwise, it's either somehow cached in the compiler (old pointer, somehow? horrifying) or just not updating the file. The second compile in that video appeared to be REALLY fast, yeah? I'd guess the latter.
Title: Re: Timelines won't update correctly after saving.
Post by: sorlok_reaves on June 16, 2014, 10:37:06 PM
Figured it out; my "clever hack" was not quite clever enough. One line fix for a very confusing error:
https://github.com/enigma-dev/enigma-dev/pull/755
Title: Re: Timelines won't update correctly after saving.
Post by: time-killer-games on June 16, 2014, 10:41:01 PM
Yo josh that wtf image you posted - wtf is that thing? A floss or tic tac container?
Title: Re: Timelines won't update correctly after saving.
Post by: TheExDeus on June 17, 2014, 09:02:02 AM
Rly guy? It's a freaking rubber stamp (http://en.wikipedia.org/wiki/Rubber_stamp).
Title: Re: Timelines won't update correctly after saving.
Post by: Goombert on June 17, 2014, 12:27:52 PM
wtf
Title: Re: Timelines won't update correctly after saving.
Post by: Darkstar2 on June 17, 2014, 01:07:31 PM
More like a plastic stamp than rubber......unless the rubber has a glossy shiny finish  ;D ;D ;D
Title: Re: Timelines won't update correctly after saving.
Post by: TheExDeus on June 17, 2014, 01:38:44 PM
"Rubber" in "Rubber stamp" refers to the STAMP, i.e., the bottom that makes the image (http://en.wikipedia.org/wiki/File:MODOInkStamp.jpg). http://en.wikipedia.org/wiki/Rubber_stamp
Title: Re: Timelines won't update correctly after saving.
Post by: Darkstar2 on June 17, 2014, 01:52:14 PM
Oh ok the rubber stamps I used were all made of rubber :P
Title: Re: Timelines won't update correctly after saving.
Post by: TheExDeus on June 17, 2014, 01:54:32 PM
I remember the cool ones which allowed you to customize it, like put blocks of rubber with letters and symbols on the bottom. Then there are the ones which allow you to select dates and numbers on the top, but they are less customizable. Haven't really seen a stamp in a few years though.
Title: Re: Timelines won't update correctly after saving.
Post by: time-killer-games on June 17, 2014, 01:55:03 PM
Stampede!!!
Title: Re: Timelines won't update correctly after saving.
Post by: Darkstar2 on June 17, 2014, 02:12:25 PM
I remember the cool ones which allowed you to customize it, like put blocks of rubber with letters and symbols on the bottom. Then there are the ones which allow you to select dates and numbers on the top, but they are less customizable. Haven't really seen a stamp in a few years though.

lol that is old stuff mate.

Now they have built-in printers into the rubber stamps, with OLED touch screen, you customise your shit put the stamp on the paper and press stamp and
you got it, no ink no mess :P
Title: Re: Timelines won't update correctly after saving.
Post by: Goombert on June 17, 2014, 05:47:20 PM
wtf