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: adeas31
Priority: blocker Milestone: 1.14.0
Component: OMEdit Version: v1.13.0-dev-nightly
Keywords: OMEdit crahes startup Cc: lochel

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@… 5 years ago.
TempOMEdit.zip (1.7 KB) - added by anonymous 5 years ago.

Download all attachments as: .zip

Change History (44)

comment:1 Changed 6 years ago by casella

  • Milestone changed from Future to 1.13.0
  • Priority changed from high to blocker

This should be investigated and solved before the 1.13.0 release

comment:2 Changed 6 years ago by adrpo

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

Version 0, edited 6 years ago by adrpo (next)

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

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

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 follow-up: Changed 6 years ago by adrpo

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

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

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

comment:7 in reply to: ↑ 5 Changed 6 years ago by adeas31

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

@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 Changed 6 years ago by igor.timofeyev@…

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

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

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 Changed 6 years ago by casella

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 Changed 6 years ago by Christoph Buchner <buchner@…>

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 Changed 6 years ago by adrpo

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 Changed 6 years ago by igor.timofeyev@…

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 Changed 6 years ago by igor.timofeyev@…

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 Changed 6 years ago by casella

  • Milestone changed from 1.13.0 to 1.14.0

Rescheduled to 1.14.0

comment:17 Changed 6 years ago by anonymous

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

comment:18 Changed 5 years ago by casella

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

comment:19 Changed 5 years ago by adeas31

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

Changed 5 years ago by igor.timofeyev@…

comment:20 Changed 5 years ago by igor.timofeyev@…

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


comment:21 Changed 5 years ago by adeas31

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

comment:22 Changed 5 years ago by igor.timofeyev@…

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

comment:23 follow-up: Changed 5 years ago by casella

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

comment:24 in reply to: ↑ 23 Changed 5 years ago by anonymous

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 follow-up: Changed 5 years ago by 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.

comment:26 in reply to: ↑ 25 Changed 5 years ago by casella

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

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 Changed 5 years ago by casella

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

comment:29 Changed 5 years ago by casella

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

comment:30 Changed 5 years ago by adeas31

This should work fine now with 33fb7b9/OpenModelica.

comment:31 Changed 5 years ago by igor.timofeyev@…

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.

Changed 5 years ago by anonymous

comment:32 Changed 5 years ago by igor.timofeyev@…

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

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

  • Cc lochel added

comment:35 Changed 5 years ago by adeas31

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

comment:36 Changed 5 years ago by adeas31

@igor please test again with the newest nightly.

comment:37 Changed 5 years ago by casella

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

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

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 Changed 5 years ago by igor.timofeyev@…

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

comment:40 follow-up: Changed 5 years ago by adeas31

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.

comment:41 in reply to: ↑ 40 Changed 5 years ago by lochel

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

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

Thanks!

Note: See TracTickets for help on using tickets.