[SOLUTION] Rescuing a messed up scene / Random Colors

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

[SOLUTION] Rescuing a messed up scene / Random Colors

Postby yatta » Fri Feb 19, 2010 8:43 am

Since I finally found a way to rescue my damaged scene, ill share it :

There is this "random colors bug" in both Phun and Algodoo:
It resets all your scenes object's properties and makes all colors random. It happens when you load a scene (*lets call that imaginary scene "THESCENE"), and then any other scene you load will be affected with the same issue.

What causes it, as fair as i know, is that when Phun/Algodoo opens THESCENE, there is something in it that causes fail, and the fail is somehow spread to the program config file. I suppose it should only happen if you used some scripting in that scene.

So, to make Phun/Algodoo work again, it is rather simple :
Either delete your config.cfg file (in "my documents/Algodoo" or in Phun base folder - the program will generate a fresh config.cfg file next time) or clean it up manually if you have the courage and you really have some important custom params in your config.

Beware ! If you load THESCENE again, the bug will come back.
So you should not open that scene ever after.

But what if that scene has quite a few hours of work involved, and you really dont want it to be lost ?

Well, here's how I recued my scene from the mean bug :

1) Find your scene file. It should be located in "my documents/Algodoo/scenes" or Phun base directory/scenes,

2) Just in case, create a backup of this file (copy/paste),

3) Extract it with any zip-extraction tool (as you might know, *.phz files are actually zip files),

4) In the extracted files, open "scene.phn",

5) Theres a few paragraphs of various settings (Fileinfo, Sim, App ...), followed by your "scene.my" variables
if you use any. Locate the end of your "scene.my" definition list,

6) Right after this list, there should be lines defining parameters for some object, **not included in any structure**, juste like in the following exemple :
Code: Select all
[...]
Scene.my.fullslot := 1;
Scene.my.gouttes := 0;
Scene.my.suppr1 := 0;
Scene.my.desn1 := 0;
Scene.my.ticks := 320;
Scene.my.alter := 1.5;
Scene.my.dens1 := 0.02;
Scene.my.dens2 := 0.02;
               **** BELOW ARE THE BAD LINES ****
collideWater = false;
restitution = 0.24;
friction = 0.07;
color = [0.90246165, 0.6633004, 0.7075551, 1.0];
collideSet = 16;
entityID = 191;
zDepth = 32.0;
geomID = 281;
pos = [212.55194, -1024.7266];
angle = 0.005977381;
glued = true;
             **** END OF THE BAD LINES ****
App.Grid -> {
     [...]
};
App.GUI.Forces -> {
     [...]
};
Scene.Camera -> {
     [...]
};
App.Background -> {
     [...]
};
Scene.addPolygon {
     [...]
}
[...]

Well, those are the bad ones. Delete those lines !

7) Save the file just as it ("scene.phn"), or rename it if you like (keeping the .phn of course).

8) Before starting Phun/Algodoo again, you still have to clean up or delete the config file (see the begining of this post).

9) Start Phun/Algodoo again, open the file ("scene.phn" or whatever you named it - its not required to place it back in a phz-zip file)

10) It should work now. I sure hope so. Save your scene with a new name, and continue making your Incredible Machine.

Notes:
- Had the bug on both Phun and Algodoo. This scene-rescue trick should work for both, but was only tested with Algodoo.
- If you dont have the bad lines in your scene.phn as pictured in the exemple, it could either be that your scene has no problem but you didnt properly clean up /reset the program's config (the program has to be closed before deleting the config file, obviously), or that the problem in your scene is caused by something else. Try checking for suspicious scripts in the file.

Advice: ALWAYS use incremental save : every time you think you have made some progress in your scene, save it with a new name : scene1.phz, scene2.phz, scene3.phz [...], and dont worry about disk space, those files are light. If one of your saves triggers the bad bug again, you can still do the config cleanup and load the last working save instead of manually editing stuff.

Hope this will help someone, someday. °_°

Pardon me if there's already a thread about rescuing a damaged scene, if there is I couldnt find it :( ...
Last edited by yatta on Fri Feb 19, 2010 10:43 am, edited 3 times in total.
yatta
 
Posts: 3
Joined: Fri Feb 19, 2010 5:59 am

Re: [SOLUTION] Rescuing a messed up scene / Random Colors

Postby Mystery » Fri Feb 19, 2010 10:24 am

:) this is very helpful many users have complained about this (Even Experienced users)

The best cure is prevention I did a search in Algobox for "THESCENE" and it yielded no results (I assume it is a scene on algobox). If you have the link to this scene PM it to Link So he can promptly remove the scene before it causes further harm.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: [SOLUTION] Rescuing a messed up scene / Random Colors

Postby yatta » Fri Feb 19, 2010 10:45 am

"THESCENE" is just an imaginary name for reference, to make the post easier to understand.
Apparently, it does not achieve this goal. I guess im bad at making things easier to understand ... sorry. @_@
yatta
 
Posts: 3
Joined: Fri Feb 19, 2010 5:59 am

Re: [SOLUTION] Rescuing a messed up scene / Random Colors

Postby Mr. crash » Fri Feb 19, 2010 1:01 pm

This happened to me too. BTW I did understand "THESCENE" ;)
I like crashes alot!
User avatar
Mr. crash
 
Posts: 266
Joined: Fri Sep 18, 2009 9:56 pm
Location: Joensuu, Finland

Re: [SOLUTION] Rescuing a messed up scene / Random Colors

Postby emilk » Tue Mar 09, 2010 3:10 pm

I believe the cause of this problem has been fixed in the 1.7 beta (1.6.4), but you are welcome to help me verify that it has.
Emil Ernerfeldt, lead developer
emilk
 
Posts: 616
Joined: Mon Aug 31, 2009 11:01 am
Location: Umeå, Sweden


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 6 guests