Pages: 1 2 »
  Print  
Author Topic: Timelines won't update correctly after saving.  (Read 3011 times)
Offline (Unknown gender) sorlok_reaves
Posted on: June 13, 2014, 05:47:50 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
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:
  • The same error occurs in EGM format (not just GMX folder format).
  • Closing and re-opening the project will "fix" the issue (as egofree reported)
  • The same issue does NOT affect objects (which compile similarly to timelines).

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.

Logged
Offline (Male) Josh @ Dreamland
Reply #1 Posted on: June 14, 2014, 09:14:02 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) sorlok_reaves
Reply #2 Posted on: June 15, 2014, 07:42:08 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
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.
Logged
Offline (Male) Josh @ Dreamland
Reply #3 Posted on: June 15, 2014, 08:32:27 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) sorlok_reaves
Reply #4 Posted on: June 15, 2014, 08:59:26 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
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
Logged
Offline (Male) Josh @ Dreamland
Reply #5 Posted on: June 15, 2014, 10:08:52 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email


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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) sorlok_reaves
Reply #6 Posted on: June 16, 2014, 10:37:06 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
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
Logged
Offline (Male) time-killer-games
Reply #7 Posted on: June 16, 2014, 10:41:01 PM

Contributor
Location: Virginia Beach
Joined: Jan 2013
Posts: 1166

View Profile Email
Yo josh that wtf image you posted - wtf is that thing? A floss or tic tac container?
Logged
Offline (Unknown gender) TheExDeus
Reply #8 Posted on: June 17, 2014, 09:02:02 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Rly guy? It's a freaking rubber stamp (http://en.wikipedia.org/wiki/Rubber_stamp).
Logged
Offline (Male) Goombert
Reply #9 Posted on: June 17, 2014, 12:27:52 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
wtf
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) Darkstar2
Reply #10 Posted on: June 17, 2014, 01:07:31 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
More like a plastic stamp than rubber......unless the rubber has a glossy shiny finish  ;D ;D ;D
Logged
Offline (Unknown gender) TheExDeus
Reply #11 Posted on: June 17, 2014, 01:38:44 PM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
"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
Logged
Offline (Unknown gender) Darkstar2
Reply #12 Posted on: June 17, 2014, 01:52:14 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
Oh ok the rubber stamps I used were all made of rubber :P
Logged
Offline (Unknown gender) TheExDeus
Reply #13 Posted on: June 17, 2014, 01:54:32 PM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
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.
Logged
Offline (Male) time-killer-games
Reply #14 Posted on: June 17, 2014, 01:55:03 PM

Contributor
Location: Virginia Beach
Joined: Jan 2013
Posts: 1166

View Profile Email
Stampede!!!
Logged
Pages: 1 2 »
  Print