Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Unknown index in Table (possible bug)

Hello world!

 

I am encountering some troubles when accessing a cell using Column index, and I think this may be a bug. I am trying to loop through the Row index column of my TableFile and in some cases (not always) I get this run time error:

 

Screenshot.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I am currently using Plant Simulation 15.0.2.1679. Unfortunately, I can not upload the model due to confidentiality restrictions. Has anyone encountered the same problem?

 

Thank you in advance

10 REPLIES 10

Re: Unknown index in Table (possible bug)

Phenom
Phenom

Switch off the Row Index OR move the "Material" column to Column 1.

 

If both Row and Column index are activated,i think  it does not search in the cell (0,0)

Re: Unknown index in Table (possible bug)

Hello Sanchay,

Thanks for commenting. I can not do neither of your ideas, because I use the row indexes later on. Anyway, I randomly get the same error with any of the other columns, not just the "row index" column, so I don't think this would fix the problem.

Re: Unknown index in Table (possible bug)

Siemens Phenom Siemens Phenom
Siemens Phenom

I cannot reproduce the problem. From your description it looks like a bug. Can you reproduce the effect in a smaller (non-confidential) model? Otherwise I suggest you contaxt your local support.

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Unknown index in Table (possible bug)

Phenom
Phenom

@Sanchay 

 with both indexes on, it works.

 

Unbenannt.PNG

,

@Adrian_Gestamp 

 

What concerns me more is this expression ( s. arrow)

 

It seems as if the column [0,0] cannot be addressed with the value.

 

For what ever reason ( hidden chars ?).

 

E.g. a blank in the index addressing triggers the same debugger message.

 

Probably with [0,1]  instead of ["Material",1] it will work.

 

 

Unbenannt.PNG

 

Re: Unknown index in Table (possible bug)

Hello MichaelJoos,

Thank you for your quick answer, it is really a relief knowing that siemens' experts are always online!

I finally solved the error by deleting the table and creating it again, so I suppose it was corrupted in some way. In any case, if that happens again I will try to reproduce it in another model and resume this thread so you can analize the problem.

Thank you.

Re: Unknown index in Table (possible bug)

Hello simulator,

The expression was just a way for you to visualize that even if I force it to read the cell as an input instead of writing "Material", Plant Simulation was not able to evaluate it, so it was not a problem of hidden chars. And of course, if I change it for tDemand[0,i] it works, but as I mentioned to Sanchay I randomly get the same error with any other column, so that would not fix the problem.

In any case, as I explained in the previous post, I managed to solve this by deleting and creating again the table, so I suppose that it was somehow corrupted, but thank you anyway for your help!

Re: Unknown index in Table (possible bug)

Hello @MichaelJoos,

 

After continuing working on my model it crashed again, so I suppose deleting and creating again the tables is not enough to solve the problem. As you proposed, I've made a simplified version of the model that reproduces the same error, but with another column.

 

To trigger the error, just execute the method mUpdate_PlantInfo which is inherited in the frame. In my case, the method not always crashes (execute it multiple times if necessary) and any time it does, it is not due to the same column.

 

Just for you to understand how the real model works, this method retrieves some dates and references from a database and updates the column and row indexes of the tables according to that. In this simplified example, the tDates and tCurrRefs tableFiles represent the data which is imported from the DDBB, and the tPlanning and tDemand tableFiles the tables to be updated.

 

Thank you again!

Re: Unknown index in Table (possible bug)

Siemens Genius Siemens Genius
Siemens Genius

Hello Adrian Gestamp.

 

Thank you for reporting this issue and taking the time to create the simplified model.

We can reproduce the issue and we think that you in fact found a bug. We'll investigate it.

In the meantime, I recommend you contact GTAC and report this issue, so it's tracked in our system and we can contact you on the progress.

 

Thank you.

------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Unknown index in Table (possible bug)

Siemens Genius Siemens Genius
Siemens Genius

For the time being, you can work-around the issue by deactivating fast column index access.

Please try the following: Open the DataTables that cause the issue, i.e. the ones where you want to access the column by name. Select the column header row (row 0) by clicking on the header of that row (the text 'string'). Make sure the List ribbon is active in the toolbar, deactivate format inheritance by clicking 'Inherit Format', then click 'Edit Format', select the 'Data Type' tab, and uncheck 'Fast index access'.

Alternatively, you can set the FastAccessColumnIndex attribute of the relevant DataTables to false.

This is of course not a permanent solution and it decreases the performance slightly, but at least you can continue working.

------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.