Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

FS Ruby user state management

For general discussion related FlowStone

FS Ruby user state management

Postby tulamide » Mon Jul 06, 2015 6:00 pm

Another one of those guess-what-really-happened-errors. I post it here because it refers to a method that doesn't exist throughout the whole schematic. The error message appeared with a freshly started FS (and of course disappeared after having clicked into the instance once, to make it even harder to find a meaning in such error messages). :lol:

My guess: As I used my acm (which in turn uses the schematic to save colors via user state management) in an earlier version, then removed and replaced it and finally saved the new sturctured schematic, I'm afraid FS does not clear the schematic from older user states. If so, I call it a huge bug!

loadstatewtf.png
loadstatewtf.png (19.93 KiB) Viewed 8600 times
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: FS Ruby user state management

Postby KG_is_back » Mon Jul 06, 2015 10:06 pm

I've got similar bugs all all-round Flowstone. saveState and loadState methods save/load the variables via Marshal rutine. If a class does not have "_dump" and "_load" methods it cannot be saved/loaded. Also remember, that @ins and @outs are saved and loaded by the loadState/saveState methods too.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: FS Ruby user state management

Postby tulamide » Tue Jul 07, 2015 11:36 am

Thanks for the help, KG.

KG_is_back wrote:saveState and loadState methods save/load the variables via Marshal rutine. If a class does not have "_dump" and "_load" methods it cannot be saved/loaded.
Yes, I am aware of that. As I said, there is no saveState or loadState throughout the schematic, so this is not an issue.

KG_is_back wrote:Also remember, that @ins and @outs are saved and loaded by the loadState/saveState methods too.
I'm not sure what you mean. If using marshalling to keep the state of the inputs and outputs was meant, then I'm aware of that too.

The cause of this error message had nothing to with marshalling. It was an incorrect order of RubyEdit-initializations. FS is overly sensitive in that matter. I described that I removed a module from the schematic, replacing it by another one. The removed one was the first added to the schematic, removing it changed the order. I knew about this and normally take care of the right order, but in this case I didn't see the need as it was the first one, but not the one with the class definition). However, after cut'n'paste everything but the new module, it works fine now.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: FS Ruby user state management

Postby KG_is_back » Tue Jul 07, 2015 2:26 pm

Oh, now I get it... it seems the Class isn't initialized when loadState is called, right?
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: FS Ruby user state management

Postby tulamide » Tue Jul 07, 2015 8:34 pm

KG_is_back wrote:Oh, now I get it... it seems the Class isn't initialized when loadState is called, right?

Yes, I have an input where a class is expected (the fourth one in the image), but the class was initialized after the request :)
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany


Return to General

Who is online

Users browsing this forum: No registered users and 65 guests