Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#3296 closed defect (fixed)

OMEdit crashes on startup since rev.25700

Reported by: zbigniew.wolanski@… Owned by: Adeel Asghar
Priority: high Milestone: 1.9.4
Component: OMEdit Version: trunk
Keywords: Cc: Adrian Pop

Description

OMEdit crashes on startup in revision 25700 and all consecutive revs.
Last tested revision with defect: 25747.
Last working revision: 25670.
Tested on 3 PCs: two Windows 7, one Windows 8.1
Crash reports was sent from each incident.

Attachments (5)

openmodelica.stacktrace.OMEdit (1.6 KB ) - added by Adeel Asghar 10 years ago.
openmodelica.stacktrace.2.OMEdit (1.6 KB ) - added by anonymous 10 years ago.
omeditcommands.mos (155 bytes ) - added by Zbigniew.Wolanski@… 10 years ago.
omeditcommunication.log (326 bytes ) - added by Zbigniew.Wolanski@… 10 years ago.
These attachments are from one of the Windows 7 PCs exhibiting the crash
openmodelica.stacktrace.3.OMEdit (1.6 KB ) - added by Zbigniew.Wolanski@… 10 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by Adeel Asghar, 10 years ago

We haven't got any crash report. It seems like crash reports are broken as well :). I will check it.
Can you post the following files?
%TEMP%/omeditcommunication.log
%TEMP%/omeditcommands.mos
%TEMP%/openmodelica.stacktrace.OMEdit

by Adeel Asghar, 10 years ago

comment:2 by Adeel Asghar, 10 years ago

Cc: Adrian Pop added

by anonymous, 10 years ago

by Zbigniew.Wolanski@…, 10 years ago

Attachment: omeditcommands.mos added

by Zbigniew.Wolanski@…, 10 years ago

Attachment: omeditcommunication.log added

These attachments are from one of the Windows 7 PCs exhibiting the crash

by Zbigniew.Wolanski@…, 10 years ago

comment:3 by Adrian Pop, 10 years ago

I looked a bit into this.
We do: omdevPath = Util.makeValueOrDefault(System.readEnv,"OMDEV","");
and if OMDEV is not present I guess we get a crash. And yes, via cmd.exe

> cd \Path\to\OMEdit.exe
> set OMDEV=
> .\OMEdit

will reproduce the issue.
We have

extern const char* System_readEnv(const char *envname)
{
  char *envvalue = getenv(envname);
  if (envvalue == NULL) MMC_THROW();
  return strcpy(ModelicaAllocateString(strlen(envvalue)),envvalue);
}

which means that if the env variable does not exist we do a throw and die because we don't do
MMC_TRY_TOP_INTERNAL for omc_Main_setWindowsPaths.

Adeel, can you wrap the call to omc_Main_setWindowsPaths within a try catch block?
Then try to see if it works by un-setting OMDEV variable.

comment:4 by Adeel Asghar, 10 years ago

Resolution: fixed
Status: newclosed

Fixed in r25813.

comment:5 by Dietmar Winkler, 9 years ago

Milestone: Futurepre1.9.4

It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.

comment:6 by Martin Sjölund, 7 years ago

Milestone: pre1.9.41.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.