Opened 19 years ago

Last modified 18 years ago

#43 closed defect (fixed)

assertion failed on start in unusual environment

Reported by: x05elmja Owned by: x05elmja
Priority: critical Milestone:
Component: Version:
Keywords: Cc: x05elmja, Adrian Pop

Description


Attachments (2)

omc-runtime-error-dialog.png (8.7 KB ) - added by x05elmja 19 years ago.
screen shot of the error dialog
OmcCrash.zip (1.3 KB ) - added by x05elmja 19 years ago.
The java program that triggers the accertion failure.

Download all attachments as: .zip

Change History (8)

comment:1 by x05elmja, 19 years ago

Omc fails to start if the following java code is used to start it:

Runtime.getRuntime().

exec(new String[] {"c:
OpenModelica13
omc.exe",

"+d=interactiveCorba"},

new String[] {"MODELICAPATH=c:
OpenModelica13"

+ "
ModelicaLibrary"});

The above code runs the command

'C:\OpenModelica13\omc.exe +d=interactiveCorba'

in an environment where the MODELICAPATH variable is set
to 'c:\OpenModelica13\ModelicaLibrary'.

However if you use the VC++ build of OMC version 1.3 (from the homepage) it
fails with the error message:

'This application has requested the Runtime to terminate it in a unusual

way...'

See the attached screenshot.

It also prints an error message to the stdout:

transport\tcp.cc:218: assertion failed

by x05elmja, 19 years ago

screen shot of the error dialog

comment:2 by x05elmja, 19 years ago

Created an attachment (id=1)
screen shot of the error dialog

by x05elmja, 19 years ago

Attachment: OmcCrash.zip added

The java program that triggers the accertion failure.

comment:3 by x05elmja, 19 years ago

Created an attachment (id=2)
The java program that triggers the accertion failure.

To run the program, unzip the archive it and type:

java OmcCrash

The program assumes that omc.exe is located in C:\OpenModelica13\

comment:4 by Peter Aronsson, 19 years ago

The following assert is triggered in mico source

MICO::TCPTransportServer::TCPTransportServer ()
{

OSNet::sock_init();

fd = ::socket (PF_INET, SOCK_STREAM, 0);
assert (fd >= 0);

....

Most probable cause: Security settings does not allow to open sockets???

comment:5 by Peter Aronsson, 19 years ago

owered severity to minor since most users wont trigger this bug. /PA.

comment:6 by Adrian Pop, 18 years ago

the environment of the call was wrong,
the MODELICAHOME variable has to be appended to the existing environment.
I think this bug was fixed since a lot of time now.

Note: See TracTickets for help on using tickets.