Opened 6 years ago

Closed 5 years ago

#5192 closed defect (fixed)

OMEdit since 1.13 crashes if there are non-ASCII characters in the Windows username

Reported by: igor.timofeyev@… Owned by: Adeel Asghar
Priority: blocker Milestone: 1.14.0
Component: OMEdit Version: v1.13.0-dev-nightly
Keywords: OMEdit crahes startup Cc: Lennart Ochel

Description

I installed OpenModelica 1.13 nightly build on my Windows 7 machine. When clicking on "C:\OpenModelica1.13.0-dev-64bit\bin\OMEdit.exe" the following message appears:

"Microsoft Visual C++ Runtime library:
This application has requested the Runtime to terminate it in an unusual way."

Other OM tools works ok (OMShell, OMNotebook)

If I uninstall OpenModelica 1.13 and install 1.12, it will work fine.

I see the issue with the same error: #3364 (but 3 years ago). So I tried to restart, and checked environment variables, that they point to correct location, but this didn't help.

Env variables:
OPENMODELICAHOME = C:\OpenModelica1.13.0-dev-64bit\
OPENMODELICALIBRARY=C:\OpenModelica1.13.0-dev-64bit\lib\omlibrary

Attachments (2)

Error.png (20.7 KB ) - added by igor.timofeyev@… 6 years ago.
TempOMEdit.zip (1.7 KB ) - added by anonymous 6 years ago.

Download all attachments as: .zip

Change History (44)

comment:1 by Francesco Casella, 6 years ago

Milestone: Future1.13.0
Priority: highblocker

This should be investigated and solved before the 1.13.0 release

comment:2 by Adrian Pop, 6 years ago

After the crash, can you attach all the files in %TEMP%\OpenModelica\OMEdit* to this ticket?

Last edited 6 years ago by Adeel Asghar (previous) (diff)

comment:3 by igor.timofeyev@…, 6 years ago

There are no changes in %TEMP%\OpenModelica\OMEdit:
I removed all files from %TEMP%, then run OMEdit again - got the same error, and only empty folder "%TEMP%\OpenModelica\OMEdit" was created.

If I press then "details" in windows "App crash window", I see that the "name of the module with error" is "libstdc++-6.dll", and an "exception code" is "40000015", "exception offset" is "00000000000223da"

comment:4 by Adeel Asghar, 6 years ago

I just installed the latest 64-bit nightly on a clean Windows 10 environment and OMEdit worked fine. Seems like there is something wrong with your installation. Maybe you can try re-install. First uninstall the version you have. Make sure you also delete the folder C:\OpenModelica1.13.0-dev-64bit after uninstall and then install the latest nightly.

comment:5 by Adrian Pop, 6 years ago

Could it be that you have special characters (or spaces) in your Windows username?

comment:6 by igor.timofeyev@…, 6 years ago

I tried re-install several times (with different nightly 1.13.0). As I remember, I removed totally folder C:\OpenModelica1.13.0-dev-64bit before new installation.

Yes, I have Cyrillic symbols in User name (and in TEMP folder path). But OMEdit 12.0 works fine on the same computer under the same user

in reply to:  5 comment:7 by Adeel Asghar, 6 years ago

Replying to adrpo:

Could it be that you have special characters (or spaces) in your Windows username?

If it is an issue of special characters then the OMShell etc. will also not work.

comment:8 by Adeel Asghar, 6 years ago

@adrpo could it be because of OMSimulator linking? That is the only big difference between 12 & 13, right?

@igor.timofeyev@… can you go to C:\OpenModelica1.13.0-dev-64bit\bin and run OMSimulator.exe --version.

comment:9 by igor.timofeyev@…, 6 years ago

C:\OpenModelica1.13.0-dev-64bit\bin>OMSimulator.exe --version
OMSimulator v2.0.0-dev-725-gb9eae0b-mingw

comment:10 by igor.timofeyev@…, 6 years ago

Looks like it is truly because of Cyrillic letters in the user name. When I changed the user, OMEdit runs, but it says at first, that there are no MODELICAPATH variable, but then loaded without any problems.

comment:11 by Francesco Casella, 6 years ago

This is in fact a special case of #4504. I wonder if this specific issue can be solved easily, since apparently it was not present in 1.12.0. Could it be related to the new OMSimulator stuff?

comment:12 by Christoph Buchner <buchner@…>, 6 years ago

In my own software projects I'd use git bisect to find the offending commit that introduced the bug (converges logarithmically, so can be quite fast). I'm wondering if that would be a feasible approach here? The main rubbing points will be if every commit in the history is supposed to work/compile or not, and the OM build time for every step.

comment:13 by Adrian Pop, 6 years ago

I really don't think 1.12 is working on systems with special chars in the username. It might be that the working directory was set manually to another directory than %TEMP% (which includes the user name).

comment:14 by igor.timofeyev@…, 6 years ago

I have never had any problems with OpenModelica 1.12. But my user name was always the same - and it fully consists from Cyrillic characters. Whenever I tried new 1.13 nightly build version - it crashes and I had to switch back to 1.12.

But I had one more user on my computer - in english characters, and what I have done - just switched to it, and run OpenModelica 1.13 - and it works ok.

May be it is not because of characters, but because of another user.

comment:15 by igor.timofeyev@…, 6 years ago

Just created two new users - one with cyrillic letters, and another one with latin letters. Run OMEdit in both. Under cyrillic user it crashed in the same way. Under latin - run successfully.

comment:16 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0

comment:17 by anonymous, 6 years ago

Same issue with Latin Extended-A like "ü", which is part of my username. OMEdit starts, but quits without warning etc.

comment:18 by Francesco Casella, 6 years ago

Summary: OMEdit since 1.13 crashes at startup (windows 7)OMEdit since 1.13 crashes if there are non-ASCII characters in the Windows username

comment:19 by Adeel Asghar, 6 years ago

Can you please test this again with 69a67b2/OpenModelica.
A new nightly build should be available tomorrow.

by igor.timofeyev@…, 6 years ago

Attachment: Error.png added

comment:20 by igor.timofeyev@…, 6 years ago

Tested on version v1.14.0-dev-26491-g6bcd564584. Same result, unfortunately:


comment:21 by Adeel Asghar, 6 years ago

Is there any file in %TEMP%/OpenModelica/OMEdit this time?

comment:22 by igor.timofeyev@…, 6 years ago

No, no files in "C:\Users\Игорь\AppData\Local\Temp\OpenModelica\OMEdit" (but directory exists)

comment:23 by Francesco Casella, 6 years ago

My Russian student who reported the issue says the nightly build works fine. However, he's using OMNotebook, not OMEdit

in reply to:  23 comment:24 by anonymous, 6 years ago

Replying to casella:

My Russian student who reported the issue says the nightly build works fine. However, he's using OMNotebook, not OMEdit

Yes, there have been no problems with OMNotebook - it works and have been worked (there is a note about it in description of the bug)

comment:25 by Adeel Asghar, 6 years ago

With the latest changes OMEdit should work also I have fixed more things in 767bbe4/OpenModelica and Lennart have fixed OMSimulator to not to crash at least in ecb96a4/OMSimulator.

With the above two fixes at least the crash should not happen. But the simulation won't work. I have been trying to fix the simulation issue as well. I already have a PR that fixes the compilation issue. The only thing left that need to handle the special characters is the simulation runtime. I will try to fix it asap.

in reply to:  25 comment:26 by Francesco Casella, 6 years ago

Replying to adeas31:

With the latest changes OMEdit should work also I have fixed more things in 767bbe4/OpenModelica and Lennart have fixed OMSimulator to not to crash at least in ecb96a4/OMSimulator.

With the above two fixes at least the crash should not happen. But the simulation won't work. I have been trying to fix the simulation issue as well. I already have a PR that fixes the compilation issue. The only thing left that need to handle the special characters is the simulation runtime. I will try to fix it asap.

Thanks Adeel, this is very much appreciated!

I understand this is basically all we need to finally close #4504, and allow Windows user to install OMC in the proper default place instead of C:\OpenModelica. This is crucial in corporate (and possibly academic) environments where PCs are administered centrally and people cannot access such a directory.

Can you please confirm that?

comment:27 by Adeel Asghar, 6 years ago

Well installing in the proper default place means Program Files which includes handling of spaces in the path. We need some more work and testing for that but I already have plans to fix that as well.

comment:28 by Francesco Casella, 6 years ago

OK. In fact, I understood from @adrpo that the issue of spaces had already (mostly?) been fixed.

comment:29 by Francesco Casella, 6 years ago

@igor, can you please check again and report if the newest nightly works for you?

comment:30 by Adeel Asghar, 6 years ago

This should work fine now with 33fb7b9/OpenModelica.

comment:31 by igor.timofeyev@…, 6 years ago

Tested on nightly build v1.14.0-dev-26516-g93a3ce5276 (64-bit)
The same problem - OMEdit crashes. But now I found some information in TEMP (attached). Also I copied crash report, which Windows produces after closing OMEdit.

by anonymous, 6 years ago

Attachment: TempOMEdit.zip added

comment:32 by igor.timofeyev@…, 6 years ago

Windows Crash Report:
Сигнатура проблемы:

Имя события проблемы (event/problem name): APPCRASH
Имя приложения (app): OMEdit.exe
Версия приложения (ver): 0.0.0.0
Отметка времени приложения (time stamp): 5cf866f1
Имя модуля с ошибкой (name of the module with error): libstdc++-6.dll
Версия модуля с ошибкой (ver of the previous): 0.0.0.0
Отметка времени модуля с ошибкой (timestamp of the previous): 00000000
Код исключения (exception code): 40000015
Смещение исключения (exception offset): 00000000000223da
Версия ОС (OS ver): 6.1.7601.2.1.0.768.2
Код языка (lang code): 1049
Дополнительные сведения 1 (additional 1): c125
Дополнительные сведения 2 (additional 2): c12557410ddc4e573cb86f3f5dda4681
Дополнительные сведения 3 (additional 3): ff1b
Дополнительные сведения 4 (additional 4): ff1b9c13b3a5650add0b78790c186af4

comment:33 by Adeel Asghar, 6 years ago

Getting the files generated in the TEMP is a good improvement. From the attached log files I can see that it has crashed inside OMSimulator.

Lennart the OMSimulator submodule needs to updated. Can you please bump it to the latest commit?

comment:34 by Adeel Asghar, 6 years ago

Cc: Lennart Ochel added

comment:35 by Adeel Asghar, 6 years ago

I updated OMSimulator submodule on Friday. Another test of this is required using a new nightly build.

comment:36 by Adeel Asghar, 6 years ago

@igor please test again with the newest nightly.

comment:37 by Francesco Casella, 5 years ago

@igor, can you test with the latest nightly build? We think all issue related to non-ASCII characters in paths are resolved.

comment:38 by igor.timofeyev@…, 5 years ago

Yes, it runs (OMEdit). But there are some errors and ureadable characters in messages pane:

info: Set temp directory to "C:/Users\�����\AppData\Local\Temp\OpenModelica\OMEdit"

error: [setTempDirectory] failed to set temp directory to "C:/Users/Игорь/AppData/Local/Temp/OpenModelica/OMEdit/": boost::filesystem::create_directory: ������� �� ������� ����� ��������� ����: "C:/Users/Игорь/AppData/Local/Temp/OpenModelica/OMEdit/"

comment:39 by igor.timofeyev@…, 5 years ago

OpenModelica v1.14.0-dev-26573-g37e230930d (64-bit)

comment:40 by Adeel Asghar, 5 years ago

Well these are the expected messages from OMSimulator since it doesn't yet support special characters.

Lennart can you create a new issue about it in OMSimulator repo? Then we can close this ticket.

in reply to:  40 comment:41 by Lennart Ochel, 5 years ago

Replying to adeas31:

Lennart can you create a new issue about it in OMSimulator repo? Then we can close this ticket.

Here it is: OMSimulator#699

comment:42 by Adeel Asghar, 5 years ago

Resolution: fixed
Status: newclosed

Thanks!

Note: See TracTickets for help on using tickets.