You are here

Segmentation Violation

I was attempting to replace the code in aparameter with one about fifty percent larger. After deleting the original and then replacing with the new code I get an error message "segmentation violation" when I strick OK. I also get a "cannot find channel named file17e1400"  The expanation was that Simile could not delete its temporary folder C:/Document...Jroger04/My Documents/My Simile file sim1125000. I.ve closed my computer, restared and I get the same error.  However when I replace the original code above with a shorter version it works.  Is there a limit on the amount of code for one parameter? 5.94

Any advice.

Reporter: 
John E. Rogers04
Created: 
Wed, 01/08/2012 - 21:10
Updated: 
Fri, 12/10/2012 - 12:43

Comments

From our fault log:

If you enter a very large equation, e.g.,

if time()<0 then 0
elseif time()<1 then 10
elseif time()<2 then 20
elseif time()<3 then 30
elseif time()<4 then 40
elseif time()<5 then 50
.....
elseif time()<316 then 3160
elseif time()<317 then 3170
elseif time()<318 then 3180
elseif time()<319 then 3190
elseif time()<320 then 3200 else -10

Simile crashes instantly. With a slightly smaller one (300 lines) it enters OK but then if you cut and paste the component, it crashes (although after you save, exit, restart and reopen, the component can be cut and pasted many times).

Solution: find some shorter way to express the function you want, e.g., the above is equivalent to:

if time()<0 then 0 elseif time()<320 then 10*ceil(time()) else -10

If your code is long because it contains a lot of irreducible domain data, put this in a file parameter instead. Your models will be smaller, faster and more reliable.