I notice that simulating an FMU with no outputs creates a 'Bad file descriptor' exception in Ubuntu 16.04, and it leaves the interpreter hanging.
To replicate the problem, this is the FMU file (renamed to .fmu.zip to comply to GitHub's restrictions on attaching files to issues) NoOutputSystem.fmu.zip that is creating the problem, that was generated using OpenModelica from this Modelica model:
traversaro@turati:~/: ipython
Python 2.7.12 (default, Nov 20 2017, 18:23:56)
In [1]: import fmpy
In [2]: fmu = "NoOutputSystem.fmu"
In [3]: fmpy.simulate_fmu(fmu)
Out[3]:
array([(0.02,), (0.04,), (0.08,), (0.1,), (0.12000000000000001,), (0.14,),
(0.18,), (0.21999999999999997,), (0.25999999999999995,),
(0.27999999999999997,), (0.3,), (0.32,), (0.34,),
(0.36000000000000004,), (0.38000000000000006,),
(0.4000000000000001,), (0.4200000000000001,), (0.4400000000000001,),
(0.46000000000000013,), (0.48000000000000015,),
(0.5200000000000001,), (0.5400000000000001,), (0.5600000000000002,),
(0.5800000000000002,), (0.6000000000000002,), (0.6200000000000002,),
(0.6400000000000002,), (0.6600000000000003,), (0.6800000000000003,),
(0.7000000000000003,), (0.7200000000000003,), (0.7400000000000003,),
(0.7600000000000003,), (0.7800000000000004,), (0.8000000000000004,),
(0.8200000000000004,), (0.8400000000000004,), (0.8600000000000004,),
(0.8800000000000004,), (0.9000000000000005,), (0.9200000000000005,),
(0.9400000000000005,), (0.9600000000000005,), (0.9800000000000005,),
(1.0200000000000005,), (1.0400000000000005,), (1.0600000000000005,),
(1.0800000000000005,), (1.1000000000000005,), (1.1200000000000006,),
(1.1400000000000006,), (1.1600000000000006,), (1.1800000000000006,),
(1.2000000000000006,), (1.2200000000000006,), (1.2400000000000007,),
(1.2600000000000007,), (1.2800000000000007,), (1.3000000000000007,),
(1.3200000000000007,), (1.3400000000000007,), (1.3600000000000008,),
(1.3800000000000008,), (1.4000000000000008,), (1.4200000000000008,),
(1.4400000000000008,), (1.4600000000000009,), (1.4800000000000009,),
(1.5000000000000009,), (1.520000000000001,), (1.540000000000001,),
(1.560000000000001,), (1.580000000000001,), (1.600000000000001,),
(1.620000000000001,), (1.640000000000001,), (1.660000000000001,),
(1.680000000000001,), (1.700000000000001,), (1.720000000000001,),
(1.740000000000001,), (1.7600000000000011,), (1.7800000000000011,),
(1.8000000000000012,), (1.8200000000000012,), (1.8400000000000012,),
(1.8600000000000012,), (1.8800000000000012,), (1.9000000000000012,),
(1.9200000000000013,), (1.9400000000000013,), (1.9600000000000013,),
(1.9800000000000013,), (2.0000000000000013,), (2.0200000000000014,),
(2.0400000000000014,), (2.0600000000000014,), (2.0800000000000014,),
(2.1000000000000014,), (2.1200000000000014,), (2.1400000000000015,),
(2.1600000000000015,), (2.1800000000000015,), (2.2000000000000015,),
(2.2200000000000015,), (2.2400000000000015,), (2.2600000000000016,),
(2.2800000000000016,), (2.3000000000000016,), (2.3200000000000016,),
(2.3400000000000016,), (2.3600000000000017,), (2.3800000000000017,),
(2.4000000000000017,), (2.4200000000000017,), (2.4400000000000017,),
(2.4600000000000017,), (2.4800000000000018,), (2.5000000000000018,),
(2.520000000000002,), (2.540000000000002,), (2.560000000000002,),
(2.580000000000002,), (2.600000000000002,), (2.620000000000002,),
(2.640000000000002,), (2.660000000000002,), (2.680000000000002,),
(2.700000000000002,), (2.720000000000002,), (2.740000000000002,),
(2.760000000000002,), (2.780000000000002,), (2.800000000000002,),
(2.820000000000002,), (2.840000000000002,), (2.860000000000002,),
(2.880000000000002,), (2.900000000000002,), (2.920000000000002,),
(2.940000000000002,), (2.960000000000002,), (2.980000000000002,),
(3.000000000000002,), (3.0200000000000022,), (3.0400000000000023,),
(3.0600000000000023,), (3.0800000000000023,), (3.1000000000000023,),
(3.1200000000000023,), (3.1400000000000023,), (3.1600000000000024,),
(3.1800000000000024,), (3.2000000000000024,), (3.2200000000000024,),
(3.2400000000000024,), (3.2600000000000025,), (3.2800000000000025,),
(3.3000000000000025,), (3.3200000000000025,), (3.3400000000000025,),
(3.3600000000000025,), (3.3800000000000026,), (3.4000000000000026,),
(3.4200000000000026,), (3.4400000000000026,), (3.4600000000000026,),
(3.4800000000000026,), (3.5000000000000027,), (3.5200000000000027,),
(3.5400000000000027,), (3.5600000000000027,), (3.5800000000000027,),
(3.6000000000000028,), (3.6200000000000028,), (3.640000000000003,),
(3.660000000000003,), (3.680000000000003,), (3.700000000000003,),
(3.720000000000003,), (3.740000000000003,), (3.760000000000003,),
(3.780000000000003,), (3.800000000000003,), (3.820000000000003,),
(3.840000000000003,), (3.860000000000003,), (3.880000000000003,),
(3.900000000000003,), (3.920000000000003,), (3.940000000000003,),
(3.960000000000003,), (3.980000000000003,), (4.020000000000002,),
(4.060000000000001,), (4.1000000000000005,), (4.14,),
(4.179999999999999,), (4.219999999999998,), (4.259999999999997,),
(4.299999999999996,), (4.339999999999995,), (4.379999999999995,),
(4.419999999999994,), (4.459999999999993,), (4.499999999999992,),
(4.539999999999991,), (4.57999999999999,), (4.6199999999999894,),
(4.659999999999989,), (4.699999999999988,), (4.739999999999987,),
(4.779999999999986,), (4.819999999999985,), (4.859999999999984,),
(4.8999999999999835,), (4.939999999999983,), (4.979999999999982,),
(5.019999999999981,), (5.05999999999998,), (5.099999999999979,),
(5.139999999999978,), (5.1799999999999775,), (5.219999999999977,),
(5.259999999999976,), (5.299999999999975,), (5.339999999999974,),
(5.379999999999973,), (5.419999999999972,), (5.4599999999999715,),
(5.499999999999971,), (5.53999999999997,), (5.579999999999969,),
(5.619999999999968,), (5.659999999999967,), (5.699999999999966,),
(5.739999999999966,), (5.779999999999965,), (5.819999999999964,),
(5.859999999999963,), (5.899999999999962,), (5.939999999999961,),
(5.9799999999999605,), (6.01999999999996,), (6.059999999999959,),
(6.099999999999958,), (6.139999999999957,), (6.179999999999956,),
(6.219999999999955,), (6.2599999999999545,), (6.299999999999954,),
(6.339999999999953,), (6.379999999999952,), (6.419999999999951,),
(6.45999999999995,), (6.499999999999949,), (6.5399999999999485,),
(6.579999999999948,), (6.619999999999947,), (6.659999999999946,),
(6.699999999999945,), (6.739999999999944,), (6.779999999999943,),
(6.8199999999999426,), (6.859999999999942,), (6.899999999999941,),
(6.93999999999994,), (6.979999999999939,), (7.019999999999938,),
(7.059999999999937,), (7.099999999999937,), (7.139999999999936,),
(7.179999999999935,), (7.219999999999934,), (7.259999999999933,),
(7.299999999999932,), (7.3399999999999315,), (7.379999999999931,),
(7.41999999999993,), (7.459999999999929,), (7.499999999999928,),
(7.539999999999927,), (7.579999999999926,), (7.6199999999999255,),
(7.659999999999925,), (7.699999999999924,), (7.739999999999923,),
(7.779999999999922,), (7.819999999999921,), (7.85999999999992,),
(7.8999999999999195,), (7.939999999999919,), (7.979999999999918,),
(8.019999999999918,), (8.059999999999917,), (8.099999999999916,),
(8.139999999999915,), (8.179999999999914,), (8.219999999999914,),
(8.259999999999913,), (8.299999999999912,), (8.339999999999911,),
(8.37999999999991,), (8.41999999999991,), (8.459999999999908,),
(8.499999999999908,), (8.539999999999907,), (8.579999999999906,),
(8.619999999999905,), (8.659999999999904,), (8.699999999999903,),
(8.739999999999903,), (8.779999999999902,), (8.8199999999999,),
(8.8599999999999,), (8.899999999999899,), (8.939999999999898,),
(8.979999999999897,), (9.019999999999897,), (9.059999999999896,),
(9.099999999999895,), (9.139999999999894,), (9.179999999999893,),
(9.219999999999892,), (9.259999999999891,), (9.29999999999989,),
(9.33999999999989,), (9.379999999999889,), (9.419999999999888,),
(9.459999999999887,), (9.499999999999886,), (9.539999999999885,),
(9.579999999999885,), (9.619999999999884,), (9.659999999999883,),
(9.699999999999882,), (9.739999999999881,), (9.77999999999988,),
(9.81999999999988,), (9.859999999999879,), (9.899999999999878,),
(9.939999999999877,), (9.979999999999876,), (10.0,), (10.0,)],
dtype=[('time', '<f8')])
In [4]: Exception in thread Thread-38:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/eventloop/inputhook.py", line 68, in thread
input_is_ready_func(wait=True)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/eventloop/posix.py", line 101, in ready
return self._ready_for_reading(current_timeout[0] if wait else 0) != []
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/eventloop/posix.py", line 188, in _ready_for_reading
fds = self.selector.select(timeout)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/eventloop/select.py", line 100, in select
return self._select_selector.select(timeout)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/eventloop/select.py", line 182, in select
return select.select(self._fds, [], [], timeout)[0]
error: (9, 'Bad file descriptor')
^[[70;1R
The same example works fine by turning "x" in a output variable.