Opened 8 years ago

Last modified 7 years ago

#4368 closed defect

Internal error After merging the strings... @ comment and newline before equation — at Version 2

Reported by: Jan Kokert Owned by: somebody
Priority: high Milestone: maint/1.12
Component: Interactive Environment Version:
Keywords: Internal error After merging the strings comment newline Cc:

Description (last modified by Jan Kokert)

Dear developers,

I noticed, that from time to time OMEdit will shrink my source code together when I manipulate my model graphically. At the beginning, it seemed random, but I narrowed it down to a single issue (took me a while).

The Issue: When a model contains a comment sitting in the very front of the line AND followed by one (or) more newlines (can have white spaces) AND followed by equation (algorithm is fine actually), so this:

  Modelica.Electrical....
// comment at the very beginning and followed by a new line

equation
  connect ...

then the error message will pop up, as soon as you move components in the DiagramView:

[C:/dev/OpenModelica64bit/OMCompiler/Compiler/Script/CevalScriptBackend.mo: 1054:13-1054:204]: Internal error After merging the strings, the semantics changed for some reason (will simply return s2):
s1:
model test 
  Modelica.Electrical.Analog.Basic.Ground ground1 annotation( ... ) 

...

Please find attached the example.

Finally, your code is screwed up (all comment are cluttered and new lines are removed).

Change History (3)

by Jan Kokert, 8 years ago

Attachment: test.mo added

comment:1 by Jan Kokert, 8 years ago

Component: FrontendInteractive Environment
Priority: normalhigh

comment:2 by Jan Kokert, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.