A problem with Metafier
- Alexey_Nigin
- Posts: 326
- Joined: August 4th, 2014, 12:33 pm
- Location: Ann Arbor, MI
- Contact:
A problem with Metafier
I have got Golly 2.7b2 and Python 2.7 (both 64-bit). My OS is Windows 7. When I try to run Metafier, the following thing happens:
Approximate translation of the text into English:
"Program "Golly.exe" has been terminated.
Windows is seeking a way to get rid of this problem..."
Other scripts seem to work normally.
Approximate translation of the text into English:
"Program "Golly.exe" has been terminated.
Windows is seeking a way to get rid of this problem..."
Other scripts seem to work normally.
There are 10 types of people in the world: those who understand binary and those who don't.
Re: A problem with Metafier
This is a crash and exit while the script is trying to build the OFF tile, correct? I wrote that script, so most likely it's my fault somehow.Alexey_Nigin wrote:I have got Golly 2.7b2 and Python 2.7 (both 64-bit). When I try to run Metafier, the following thing happens... Other scripts seem to work normally.
Is there now a "metapixel-OFF.rle" file in your Golly data directory, or no? I assume there's no "metapixel-ON.rle" since the status line shows that the script didn't get that far.
The script still works fine for me under the conditions you mentioned. It might offer a useful clue if you could pinpoint exactly what the script is doing when the crash occurs. You could just add a bunch of annoying g.note() statements to the script -- e.g.,
Code: Select all
g.note("Got this far -- #1")
- Alexey_Nigin
- Posts: 326
- Joined: August 4th, 2014, 12:33 pm
- Location: Ann Arbor, MI
- Contact:
Re: A problem with Metafier
No.Dave Greene wrote:Is there now a "metapixel-OFF.rle" file in your Golly data directory, or no?
It is already midnight in my TZ, so I will probably do it tomorrow.Dave Greene wrote:You could just add a bunch of annoying g.note() statements to the script...
There are 10 types of people in the world: those who understand binary and those who don't.
- Alexey_Nigin
- Posts: 326
- Joined: August 4th, 2014, 12:33 pm
- Location: Ann Arbor, MI
- Contact:
Re: A problem with Metafier
How to deal with this:
There are 10 types of people in the world: those who understand binary and those who don't.
Re: A problem with Metafier
Sorry -- make sure there are four spaces at the beginning of each g.note() line, instead of the two that I quoted.Alexey_Nigin wrote:How to deal with this:...
Just have to line up the text so that it matches the indentation in that part of the Python code.
- Alexey_Nigin
- Posts: 326
- Joined: August 4th, 2014, 12:33 pm
- Location: Ann Arbor, MI
- Contact:
Re: A problem with Metafier
After some skewed binary search I figured out the problematic part of the script:
(For a reason I don't understand, forums sometimes interpret a long line of whitespaces as a line break, so excuse incorrect indentation inside code box).
I do see "Ku!" but do not see "Q!".
In case you were wondering, these two similar words were taken from a particular film.
Edit: This is the exact line where the script breaks:
Code: Select all
g.note("Ku!")#####################################################################################
# The metafier-OFF and -ON files technically should not exist (we just checked
# at the beginning of the script). Shouldn't do any harm to check again, though:
if os.access(OFFcellFileName, os.W_OK) or not os.access(OFFcellFileName, os.F_OK):
try:
OFFcell.save (OFFcellFileName, "Metapixel OFF cell: Brice Due, Spring 2006")
except:
# if tile can't be saved, it will be rebuilt next time --
# no need for an annoying error, just a note in the status bar
g.show("Failed to save file version of OFF cell: " + OFFcellFileName)
os.remove (OFFcellFileName)
g.note("Q!")######################################################################################
I do see "Ku!" but do not see "Q!".
In case you were wondering, these two similar words were taken from a particular film.
Edit: This is the exact line where the script breaks:
Code: Select all
OFFcell.save (OFFcellFileName, "Metapixel OFF cell: Brice Due, Spring 2006")
There are 10 types of people in the world: those who understand binary and those who don't.
Re: A problem with Metafier
Interesting! I've been able to duplicate the problem now, by tracking down and deleting the ON and OFF metapixels in Golly's data folder. Apparently these were created by a previous version of Golly, and 2.6 is having trouble with some part of the glife library. The same crash now happens on my laptop. Time to report a bug to golly-test -- thanks for doing all the binary-search detective work!Alexey_Nigin wrote:Edit: This is the exact line where the script breaks:
Code: Select all
OFFcell.save (OFFcellFileName, "Metapixel OFF cell: Brice Due, Spring 2006")
There are a couple of easy workarounds. One is to remove all of the code that you quoted, and a similar set of six lines a little farther down the script -- starting with "if os.access...". Those lines just save a copy of the metapixel ON and OFF cells so that future runs of metafier will run faster. The script works fine when those lines are removed -- you probably won't even notice a difference in the run time.
Alternatively, you could copy the two attached files to Golly's data folder -- C:\Users\{username}\AppData\Roaming\Golly\ on Windows. That also seems to allow the script to work with no problems.
EDIT: Golly 2.7 doesn't seem to crash when it hits that .save line, so maybe that will be the final solution for this bug...!
EDIT2: Oops, no, 64-bit Golly 2.7 still crashes if the two attached files aren't present. Have done some more testing and am pretty confident it will be fixed in Golly 2.8...!
- Attachments
-
- metapixel-ON.rle
- (157.22 KiB) Downloaded 434 times
-
- metapixel-OFF.rle
- (62.32 KiB) Downloaded 428 times
-
- Posts: 25
- Joined: November 25th, 2015, 5:26 pm
Re: A problem with Metafier
...any idea when 2.8 is going to come out?
Re: A problem with Metafier
Speaking only for myself: no, no idea, except in the sense that it's already available as a beta. See the golly-test list for the most recent message from Andrew about a final 2.8 release.SuperJedi224 wrote:...any idea when 2.8 is going to come out?
It has already been "a good month or two" since that message, of course... We're starting to see more people trying out Lua scripting, and if we wait long enough it's possible that Golly 2.8 will also include native support for isotropic rules.
Meanwhile, starting this weekend I'm hoping to get some momentum back on the Life Lexicon update project, and also check in a number of long-overdue updates to the pattern collection. With any luck it will all come together, sometime before the end of this year!