Hi all,
while running the unit tests from command line like "FreeCAD.exe" --run-test 0", FreeCAD does not close anymore. I get this output in FreeCAD:
----------------------------------------------------------------------
Ran 349 tests in 288.675s
OK
Exception (Fri Aug 31 13:23:49 2018): System exit
Debug: DraftGui.todo.doTasks: queue contains a deleted object, skipping
I cant see any errors in the tests.
Any idea why FreeCAD does not close anymore?
It is strange that the execution works with appveyor.
After some debuging i found that PyRun_String in (src\Base\Interpreter.cpp line 235) returns a Null Ptr when running the unit test. (While other calls returning a valid pointer) This throws a SystemExitException with (System exit 0).
The exeption is catched in (src\Gui\MainWindow.cpp line 1040), after this the methode "MainWindow::delayedStartup" will then return. While this is a signal triggered function, the main app still runs.
Some while ago the try catch block was inserted to handle exit codes from the unit tests, but now it does not close the app anymore.
Has anyone a proposel how to solve this?
I know it is strange that the build on appveyor works.
Thanks in advance.
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14500 (Git)
Build type: Debug
Branch: master
Hash: 022653331fa6c14de235f5aebd48785b774c0ed6
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: English/Germany (en_DE)
[Solved] When running unit tests from command line FreeCAD does not shutdown anymore
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[Solved] When running unit tests from command line FreeCAD does not shutdown anymore
Last edited by apeltauer on Tue Sep 04, 2018 1:59 pm, edited 1 time in total.
Re: When running unit tests from command line FreeCAD does not shutdown anymore
The behaviour to run unit tests from the command line in GUI mode is relatively new so I can't say if the application has exited for system exceptions. Anyway: git commit fb1a0be84while running the unit tests from command line like "FreeCAD.exe" --run-test 0", FreeCAD does not close anymore. I get this output in FreeCAD:
Re: When running unit tests from command line FreeCAD does not shutdown anymore
Thanks Werner for the fast code change.
I will test your commit on monday morning and will give you quick feedback...
Thanks a lot...
I will test your commit on monday morning and will give you quick feedback...
Thanks a lot...
Re: When running unit tests from command line FreeCAD does not shutdown anymore
Just tested our code change and it works like expected.
If the test returns with no error the exit code of FreeCAD is 0. If a test fails it returns with 1.
Thanks a lot again!
If the test returns with no error the exit code of FreeCAD is 0. If a test fails it returns with 1.
Thanks a lot again!
Re: When running unit tests from command line FreeCAD does not shutdown anymore
please mark topic as [Solved]. Thank you
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs