You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
#1211
Open
qimujun opened this issue
Aug 13, 2024
· 0 comments
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;
}`
The text was updated successfully, but these errors were encountered:
This error will be triggered when the window w is closed
`#include
#include
#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);
}`
The text was updated successfully, but these errors were encountered: