- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » modelica 3D Visualisation problems
modelica 3D Visualisation problems
modelica 3D Visualisation problems
I'm trying to visualise a simulation with modelica 3d
I can run my model without the visualisation fine.
when I load the modelica 3D services it will no longer run
I think that the main error is
"[D:\users\Lewis\Modelica\001_OpenModelica\lib\omlibrary\ModelicaServices 3.2.1 modelica3d\package.mo:693:5-694:97:writable] Error: Base class Modelica.Utilities.Internal.PartialModelicaServices.ExternalReferences.PartialLoadResource not found in scope ModelicaServices.ExternalReferences.loadResource.
But I don't understand what I should do about it
Code
I have the dbus server running (it says "Running dbus-server...)
Does anybody have any suggestions?
Thanks
Dexter
- Dexter22
- 24 Posts
Re: modelica 3D Visualisation problems
Do you have MSL 3.1 or 3.2.1 loaded? getVersion(Modelica) should tell.
- sjoelund.se
- 1700 Posts
Re: modelica 3D Visualisation problems
3.2.1
- Dexter22
- 24 Posts
Re: modelica 3D Visualisation problems
Then do not load the Internal.mo. It is only for MSL 3.1. Skip that or simply call: loadModelica3D()
- sjoelund.se
- 1700 Posts
Re: modelica 3D Visualisation problems
Thanks, but I still have a problem:
true
""
"3.2.1"
true
""
true
""
true
""
record SimulationResult
resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'Visualize_DoublePendulum', options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
messages = "Failed to build model: Visualize_DoublePendulum",
timeFrontend = 0.0,
timeBackend = 0.0,
timeSimCode = 0.0,
timeTemplates = 0.0,
timeCompile = 0.0,
timeSimulation = 0.0,
timeTotal = 0.0
end SimulationResult;
"Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
Error: Error building simulator. Build log: gcc -falign-functions -msse2 -mfpmath=sse -I"D:/users/Lewis/Modelica/001_OpenModelica//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o Visualize_DoublePendulum.o Visualize_DoublePendulum.c
gcc -falign-functions -msse2 -mfpmath=sse -I"D:/users/Lewis/Modelica/001_OpenModelica//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o Visualize_DoublePendulum_functions.o Visualize_DoublePendulum_functions.c
gcc -falign-functions -msse2 -mfpmath=sse -I"D:/users/Lewis/Modelica/001_OpenModelica//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o Visualize_DoublePendulum_records.o Visualize_DoublePendulum_records.c
gcc -falign-functions -msse2 -mfpmath=sse -I"D:/users/Lewis/Modelica/001_OpenModelica//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o Visualize_DoublePendulum_01exo.o Visualize_DoublePendulum_01exo.c
Visualize_DoublePendulum_functions.c:10:22: error: modcount.h: No such file or directory
Visualize_DoublePendulum_functions.c:11:20: error: modbus.h: No such file or directory
Visualize_DoublePendulum_functions.c: In function 'omc_ModelicaServices_modbus_Connection_constructor':
Visualize_DoublePendulum_functions.c:693: warning: assignment makes pointer from integer without a cast
Visualize_DoublePendulum_functions.c: In function 'omc_ModelicaServices_modbus_Message_constructor':
Visualize_DoublePendulum_functions.c:1317: warning: assignment makes pointer from integer without a cast
Visualize_DoublePendulum_functions.c: In function 'omc_ModelicaServices_modcount_Context_constructor':
Visualize_DoublePendulum_functions.c:1331: warning: assignment makes pointer from integer without a cast
Visualize_DoublePendulum_functions.c: In function 'omc_ModelicaServices_modcount_getString':
Visualize_DoublePendulum_functions.c:1393: warning: assignment makes pointer from integer without a cast
Visualize_DoublePendulum_functions.c: In function 'omc_ModelicaServices_modcount_HeapString_constructor':
Visualize_DoublePendulum_functions.c:1420: warning: assignment makes pointer from integer without a cast
gcc -falign-functions -msse2 -mfpmath=sse -I"D:/users/Lewis/Modelica/001_OpenModelica//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o Visualize_DoublePendulum_02nls.o Visualize_DoublePendulum_02nls.c
mingw32-make: *** [Visualize_DoublePendulum_functions.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
"
- Dexter22
- 24 Posts
Re: modelica 3D Visualisation problems
You should have the files in: D:/users/Lewis/Modelica/001_OpenModelica/lib/omlibrary/ModelicaServices 3.2.1 modelica3d/Resources/Include/
If you don't, it might have been fixed in the nightly build.
- sjoelund.se
- 1700 Posts
Re: modelica 3D Visualisation problems
Thanks,
I don't seem to have a resources folder there. I'll download the new build
- Dexter22
- 24 Posts
Re: modelica 3D Visualisation problems
Right, I think I'm getting closer, but still have an error:
true
""
"3.2.1"
""
true
""
true
""
true
""
record SimulationResult
resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'Visualize_DoublePendulum', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
messages = "Simulation execution failed for model: Visualize_DoublePendulum
process 1036: arguments to dbus_message_iter_append_basic() were incorrect, assertion \"_dbus_check_is_valid_utf8 (*string_p)\" failed in file dbus-message.c line 2598.
This is normally a bug in some application using the D-Bus library.
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Backtrace:
3 ZwWaitForSingleObject+0x15
3 WaitForSingleObjectEx+0x43
3 WaitForSingleObject+0x12
3 dbus_threads_init+0x2119
3 dbus_malloc+0x182b
3 dbus_pending_call_set_notify+0x844
3 dbus_message_iter_append_basic+0x129
3 omc_OpenModelica_Scripting_Internal_stat+0x4430a
3 omc_OpenModelica_Scripting_Internal_stat+0x443d0
3 omc_ModelicaServices_modbus_addString+0x25
3 omc_ModelicaServices_Modelica3D_setAmbientColor+0xa0
3 omc_OpenModelica_Scripting_Internal_stat+0x24fa7
3 omc_OpenModelica_Scripting_Internal_stat+0x2ed85
3 dbus_server_listen+0x37cda
3 dbus_server_listen+0x39167
3 dbus_server_listen+0x128f3
3 dbus_server_listen+0x12f1f
3 dbus_server_listen+0xacd6
3 dbus_server_listen+0xb28a
3 dbus_server_listen+0xd3e9
2 C:\\Users\\l.barnaby\\Visualize_DoublePendulum.exe+0x13931
2 C:\\Users\\l.barnaby\\Visualize_DoublePendulum.exe+0x10db
2 C:\\Users\\l.barnaby\\Visualize_DoublePendulum.exe+0x1178
3 BaseThreadInitThunk+0x12
3 RtlInitializeExceptionChain+0x63
3 RtlInitializeExceptionChain+0x36
",
timeFrontend = 1.014565460790223,
timeBackend = 0.6924996963059945,
timeSimCode = 0.4708807652891414,
timeTemplates = 1.010064205357063,
timeCompile = 3.058960421675423
end SimulationResult;
"Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
"
dbus says its running, and I'm using the new one in the nightly build ...\lib\omlibrary-modelica3d\osg-gtk
- Dexter22
- 24 Posts
Re: modelica 3D Visualisation problems
It seems we need to make some fixes for modelica3d again... I added a check for an illegal feature used by the library:
Code:
[/home/marsj/trunk/build/lib/omlibrary/ModelicaServices 3.2.1 modelica3d/Modelica3D/package.mo:455:5-505:23:writable] Error: Function Modelica.Mechanics.MultiBody.Visualizers.Advanced.Shape.shapeDescrTo3D returns an external object, but the only function allowed to return this object is ModelicaServices.modcount.HeapString.constructor.
- sjoelund.se
- 1700 Posts
Re: modelica 3D Visualisation problems
Should be fixed in r21083. New nightly builds appear in around 12 hours if nothing breaks them.
- sjoelund.se
- 1700 Posts
Re: modelica 3D Visualisation problems
Brilliant - it works just fine now.
Thanks for your help
- Dexter22
- 24 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » modelica 3D Visualisation problems