-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python automated tests crash #23
Comments
Does anyone have an idea about this? |
Since the executable |
Thanks, @jcfr , I have been debugging Slicer for a decade now, the problem is not this. The question is how do I debug the test in the exact same environment as it is run by ctest. And I think it's not through |
I figured :) Does the program crash if you run it directly from the command line ? If yes, running it in visual studio may help. |
Yes it crashes when run from the command line. I tried to run it that way from VS and that's where the different process became a problem. I'll try running the test python command ( |
Considering the following command:
From within Visual Studio, you should be able to associate all arguments with the Indeed, I don't the execution of the |
Sorry for the late answer! I tried the command you suggested but it is identical with what I tried last, and the debugger returns with no call stack, but without the debugger there is clearly a crash. Unless we get a call stack for this crash we can't fix this, meaning slicer custom apps cannot be tested the usual way. If I run the test python code from within the main window's python interactor (after removing no-main-window and testing and the python-code arguments from the startup command), then the tests pass alright. |
@cpinter or @jcfr Were you all able to resolve this? I think I'm running into this now with my slicer custom app. PS C:\Program Files\MyName 2.0.0-2022-04-25> ./MyName.exe --testing
error: [C:/Program Files/MyName 2.0.0-2022-04-25/bin/MyNameApp-real.exe] exit abnormally - Report the problem. It does not have an issue with a regular Slicer build PS C:\Users\JamesButler\AppData\Local\NA-MIC\Slicer 4.13.0-2022-04-23> ./Slicer.exe --testing
PS C:\Users\JamesButler\AppData\Local\NA-MIC\Slicer 4.13.0-2022-04-23> |
@jamesobutler I could not find a way to attach a debugger to the process where it crashed, and didn't have any additional ideas since then. I ended up running tests from an app started normally using a button in the settings panel, and this was not critical after that. It would be still great if we could fix this, because without it custom apps can't really have a working dashboard. Linking the recent discourse topic here as well: https://discourse.slicer.org/t/slicer-custom-app-crashing-with-testing-arg/23209/2 |
I was trying to debug this on linux with a debug build of my custom app using:
Segfault backtrace: #0 0x00007ffff3b011a2 in QSettings::value(QString const&, QVariant const&) const ()
from /home/fernando/Downloads/GeoSlicer-1.6.0-2022-05-11-linux-amd64_debug/GeoSlicer-1.6.0-2022-05-11-linux-amd64/bin/../lib/GeoSlicer-4.11/libQt5Core.so.5
#1 0x00007ffff5628b94 in qSlicerCoreApplicationPrivate::init (this=0xbbf4a0)
at /root/volume/geoslicerbase/builddebug/slicersources-src/Base/QTCore/qSlicerCoreApplication.cxx:306
#2 0x00007ffff71b1db7 in qSlicerApplicationPrivate::init (this=0xbbf4a0)
at /root/volume/geoslicerbase/builddebug/slicersources-src/Base/QTGUI/qSlicerApplication.cxx:215
## my comment (the above line is this->Superclass::init();)
#3 0x00007ffff71b2f38 in qSlicerApplication::qSlicerApplication (this=0x7fffffffb410, _argc=@0x7fffffffb3cc: 2, _argv=0x7fffffffb588)
at /root/volume/geoslicerbase/builddebug/slicersources-src/Base/QTGUI/qSlicerApplication.cxx:374
#4 0x0000000000408a6b in (anonymous namespace)::SlicerAppMain (argc=2, argv=0x7fffffffb588)
at /root/volume/geoslicerbase/Applications/GeoSlicerApp/Main.cxx:38
#5 0x0000000000408d87 in main (argc=2, argv=0x7fffffffb588)
at /root/volume/geoslicerbase/builddebug/slicersources-src/Base/QTApp/qSlicerApplicationMainWrapper.cxx:72 Not very informative specially because my custom app may have changed some of those sources but it seems that a command line argument is not being built properly. |
Thanks for the additional debugging help @fbordignon! Much appreciated 🙏🏻 |
My custom app is based on version 4.11.20210226 if you need more info I can share those cxx sources. |
It probably has been failing in the same way through various versions of Slicer ( |
The scripted module tests crash for custom app, also confirmed to be the case with the template without anything additional. This happens using the latest master, on Windows 10 with Qt 5.10.1.
I cannot debug it with setting the launcher as executable, as it runs the test on a different thread. I'd appreciate any ideas. Thank you!
The text was updated successfully, but these errors were encountered: