calculix / cae

CalculiX Advanced Environment is designed to guide you through the CalculiX keywords creation process and is aimed to help you reach the correct input file with no mistakes.
GNU General Public License v3.0
143 stars 34 forks source link

Cae crashes on startup #17

Closed ndkazu closed 1 year ago

ndkazu commented 3 years ago

Hello, I am trying to use Cae on windows10. I have anaconda installed with python 3.8. I tried to start the application both from anaconda command line and from windows explorer. in both cases, the application starts, both windows are displayed, but then the left window freezes or shuts down after a few seconds. The picture shows the state in which the application froze.

Kazunobu cae_crash

ndkazu commented 3 years ago

Update: I tried directly opening the dichtstoff_2_HE8.inp found in the examples bundle. the UI does not crashes, but I get an interesting message in the log: read F\calculix\cae=20200725=windows\config\iso.fbd ERROR in readfbd: The input file "F\calculix\cae=20200725=windows\config\iso.fbd" could not be opened. cae_crash

imirzov commented 3 years ago

Hello, and thank you for reporting bugs.

It'll be very difficult to find the reason of the crash, because I do not have Windows at all. But if you could attach a log file, generated during model opening, - it'll help. Previously application crashed due to multiple threads wrote logs at the same time and they wrote messages too fast. It was bug of the PyQt5, but I've solved it. So another reason is unknown and will be new to me.

iso.fbd - is just a script that rotates model to the isometric view at startup. It has no effect on crashes. If your OS can't find the file - check the path. I see it has symbols '='. I think you'd better avoid using special characters in file paths.

ndkazu commented 3 years ago

Hello, I am sending the log generated after a crash and the corresponding inp file. hueeber1.log hueeber1.zip

Kazu

imirzov commented 3 years ago

OK, thank you, now we have something to speak about.

In the latest release v0.8.0 default logging level is DEBUG. But you have only INFO messages in the log file. Why? Have you changed default settings? Or are you using old version?

So, first, please, download latest release (source code) and run it: https://github.com/calculix/cae/releases/tag/v0.8.0

When you run the application by default it opens model ./examples/default.inp (your first screenshot) and generates default.log in the same directory. Please, attach here that log file (with DEBUG messages, not only INFO). It'll give me some information about app's crash. I will pay attention to messages "DEBUG: Stopping threads..."

Thank you.

P.S. As you can see, on Linux app v0.8.0 works just fine! 1 2

imirzov commented 3 years ago

And ensure you are not using special characters in file paths. I can not predict app's behavior in this case: 3

ndkazu commented 3 years ago

Hello, First of all, thank you for the tool and support. Now let me answer a few questions: 1) version used: I am using the latest version (0.80) 2) special characters: Strangely I do not use any special characters in folder's name. take a look the log file generated with the default *.inp: on line7 is the correct name of my folder, but for some strange reason, this path name is changed in lines 87 to 91 default.log I hope that you will find a hint about what's wrong in the log file.

Regards, Kazunobu

imirzov commented 3 years ago

Dear Kazunobu,

Looks like I've found why folders are different in the .log file. Method, which sends commands from keyword editor to CGX, translates keyboard codes incorrectly. Translation table is given in window.py file in class Windows_window(Window), variable self.keyboardMapping. Looks like this table depends not only on operating system, but on something else (like locale and/or keyboard type).

You can test it in a separate application: https://github.com/imirzov/sendkeys

On your computer symbol ":" is translated as "*" and "_" - as "=". And now I'm not able to fix it. I just do not know how. I do not know how to account for OS, keyboard type and locale. I've tested it on Windows 7 installed on virtual machine. Looks like Windows 10 needs a different keyboard mapping. I do not know.

Nevertheless, this problem doesn't affect DEBUG messaging in your log files. And isn't relevant to CAE's crash. To switch on DEBUG logging, please, edit file ./config/Settings_windows.py, line 11 should be: self.logging_level = 'DEBUG'

Thank you for reporting problems. Please, continue.

imirzov commented 3 years ago

Dear Kazunobu, How is it going with DEBUG logging?

ndkazu commented 3 years ago

Hello, sorry for the delay: I7ve been busy with my daily job. I've edited the Settings_windows.py as instructed in your previous message. unfortunately, the application still crashes after opening the default model, and the log file does not show anything for it. I am kind of stuck....

Kazu default.log

imirzov commented 3 years ago

Dear Kazu,

Cool! There are no errors which I have suspected: I see only one thread writing to the log window. Another thing is that you're using binaries. Have you tried running the software from sources? Latest released sources are here: https://github.com/calculix/cae/archive/v0.8.0.zip

Here is how to use: https://github.com/calculix/cae#how-to-use

I've compiled binaries under virtual machine with Windows 7. And nobody knows how do they work. So, please, try sources. And do not forget to set logging level to DEBUG.