Opened 8 years ago
Closed 7 years ago
#4368 closed defect (fixed)
Failed to merge Modelica text @ comment and newline before equation
Reported by: | Jan Kokert | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | maint/1.12 |
Component: | Interactive Environment | Version: | |
Keywords: | Internal error After merging the strings comment newline | Cc: |
Description (last modified by )
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).
Attachments (1)
Change History (7)
by , 8 years ago
comment:1 by , 8 years ago
Component: | Frontend → Interactive Environment |
---|---|
Priority: | normal → high |
comment:2 by , 8 years ago
Description: | modified (diff) |
---|
comment:3 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 7 years ago
comment:5 by , 7 years ago
https://github.com/OpenModelica/OMCompiler/pull/2099 should fix this issue. Hopefully some of the other tickets as well.
comment:6 by , 7 years ago
Milestone: | Future → maint/1.12 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Summary: | Internal error After merging the strings... @ comment and newline before equation → Failed to merge Modelica text @ comment and newline before equation |
Fixed in maint/1.12 and master
Smaller example triggering the bug:
Note for myself: triggers in 2 places;
fixMoveOperations
causes the comment to be duplicated while disabling it causes the comment to be removed...