Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#3296 closed defect (fixed)

OMEdit crashes on startup since rev.25700

Reported by: zbigniew.wolanski@… Owned by: adeas31
Priority: high Milestone: 1.9.4
Component: OMEdit Version: trunk
Keywords: Cc: adrpo

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 adeas31 9 years ago.
openmodelica.stacktrace.2.OMEdit (1.6 KB) - added by anonymous 9 years ago.
omeditcommands.mos (155 bytes) - added by Zbigniew.Wolanski@… 9 years ago.
omeditcommunication.log (326 bytes) - added by Zbigniew.Wolanski@… 9 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@… 9 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 9 years ago by adeas31

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

Changed 9 years ago by adeas31

comment:2 Changed 9 years ago by adeas31

  • Cc adrpo added

Changed 9 years ago by anonymous

Changed 9 years ago by Zbigniew.Wolanski@…

Changed 9 years ago by Zbigniew.Wolanski@…

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

Changed 9 years ago by Zbigniew.Wolanski@…

comment:3 Changed 9 years ago by adrpo

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 Changed 9 years ago by adeas31

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r25813.

comment:5 Changed 9 years ago by dietmarw

  • Milestone changed from Future to pre1.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 Changed 7 years ago by sjoelund.se

  • Milestone changed from pre1.9.4 to 1.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.