After closing the window, an exception was raised at the return error: 0x000007FFAB9F1FB1D (Qt5Guid. dll) (located in Main.exe): 0xC000000 5: Access conflict occurred while reading position 0xFFFFFFFFFFFF.
This error will be triggered when the window w is closed
`#include <QApplication> #include <QMainWindow> #include "../include/LoadPlugins.h"
#include "ctk/interface/ctkPluginFramework.h" #include "ctk/interface/ctkPluginFrameworkLauncher.h" #include "ctk/interface/ctkPluginFrameworkFactory.h" #include "ctk/interface/ctkPluginException.h"
int main(int argc, char *argv[]) { QApplication app(argc, argv);
// Initialize CTK Plugin Framework
ctkPluginFrameworkFactory factory;
auto framework = factory.getFramework();
framework->init();
framework->start();
// Load plugins (example: load all plugins from a directory)
ctkPluginContext* context = framework->getPluginContext();
auto plugins = context->getPlugins();
for (const auto& plugin : plugins)
{
plugin->start();
}
// Create and show the main window
QMainWindow w;
w.show();
// Run the Qt application loop
int result = app.exec();
// Stop plugins and framework after the application loop exits
for (const auto& plugin : plugins)
{
plugin->stop();
}
framework->stop();
framework->waitForStop(5000); // Wait for up to 5 seconds for the framework to stop
return result;
}`
Same problem.
I would recommend to run this code snippet in debug mode and have a look at the call stack.
环境:2023.07 最新的release,Qt Creator 16.0.0 Qt 5.15.12 VS2019
不加载插件正常,加载带GUI的插件终端显示qtc.process_stub: Inferior error: QProcess::Crashed "Process crashed".Terminal process exited with code -1073741819.程序运行输出为10:21:12: 进程崩溃了。
基于F5调试关闭软件界面后输出为
Sorry, I won't be able to help with this. I don't use CTK plugin framework and the error seems to be in some basic Qt widget classes.