This morning I have encounted a bug when using plant sim which caused it to crash when I opened a attribute of data type table which is being observed by a observer of that object.
After looking into it, I have noticed that the following can be done to reproduce the error but have managed to cause it through other methods as well.
I have found that it will only crash if the table is different from the table in the object you are using to replace it with, if they are the same then the program will work normally. It can be different in any way, have tested it with both formating and contents and both can crash the program.
Attached is a print screen of the crash window with the call stack and also the method that it refers to in the report. As you can see it has crashed on line 2 of the code which is the very last line and is empty.
Plant Sim Version: 12.2.1
I was able to reproduce the crash. I found the cause for the crash and fixed it. The next maintenance pack will include this bugfix.
Please note that an observer that observes a user-defined attribute of data type table (or list/stack/queue) is questionable. The observer will not observe the content of the table, but the table itself. So the obersver method will only be called when an entire table is assigned to the user-defined attribute, but not if you assign a value to a single cell of the table.
Thank you for looking into this, depending on what I find to be the best approatch this might be a issue later on when using the item.
Yes, I did find that the ovserver did not trigger as much as I liked it to do so, and I could not observe the Changed sub attribute of the table, instead I have put in place a plausbility control for now which takes in the row and column so I know what has been edited (probaly a better way anyway as it tells me what has changed and not just that something has changed) and will look into other approtaches in a few days time.