Pyfmi, OpenModelica FMU, and IPython (JSON involved)

5 posts / 0 new
Last post
Alfred
Offline
Joined: 2015-08-14
Pyfmi, OpenModelica FMU, and IPython (JSON involved)

Trying to load an FMU compiled by omc (OpenModelica's compiler) provoke a nasty crash under IPython.

Running

    import pyfmi
    pyfmi.load_fmu("path/to/fmu")
    
makes IPython crash with message
    
    JSON object expected ',' or '}', got: "lineEnd":67,"colSta
    Aborted (core dumped)

I tried both IPython 5.4 and 4.2, for Python 2.7.13 (Anaconda 64-bit) on Ubuntu 16.04.

An example FMU for reproducing the bug can be found here:
https://trac.fmi-standard.org/browser/branches/public/Test_FMUs/FMI_2.0/...

This seems to be specific to OpenModelica as a JModelica compiled FMU (https://trac.fmi-standard.org/browser/branches/public/Test_FMUs/FMI_2.0/...) does not trigger the error.

Both FMUs pass the FMU compliance check.

Do you have any idea about the problem's root and how to solve it?

I already experienced segfaults with older version of OpenModelica, as mentionned here: http://www.jmodelica.org/27816. They were however rare enough to be only a nuisance, not a show stopper.

chria
Offline
Joined: 2009-07-29
Hi,   I tried the FMU that

Hi,

 

I tried the FMU that you pointed to and could not reproduce the problem. I'm running Ubuntu 16.04 with Ipython 4.1.2 (Anaconda 4.0.0). From the looks of it the JSON problem seems to point to something outside of PyFMI as we do not use from our side.

I've also run the model through valgrind which reports quite a few issues with jumps dependent on uninitialized values but I don't believe these would be responsible for any crash though...

 

Best

/Christian

 

Alfred
Offline
Joined: 2015-08-14
Dear Christian, Thank you

Dear Christian,

Thank you very much for your answer. I will try different version combinations to further narrow the issue. What python do you use? 2.x or 3.x?

Kind regards

Alfred
Offline
Joined: 2015-08-14
Downgrading to Anaconda 4.0.0

Downgrading to Anaconda 4.0.0 suppress the bug.

Thanks a lot for this hint! Anyway, there seems to be something wicked comming this way.

chria
Offline
Joined: 2009-07-29
Hi,   No problem. I tested

Hi,

 

No problem. I tested with Python 2.7.

 

Best

/Christian

Login or register to post comments