QCustomPlot Discussion and Comments

Crash due to replot exception after packing Qt program with enigmavbReturn to overview

Hello, author
The following is the code snippet where the exception occurred, as identified through my WinDBG dump file analysis

void QCustomPlot::replot(QCustomPlot::RefreshPriority refreshPriority)
{
  if (refreshPriority == QCustomPlot::rpQueuedReplot)
  {
    if (!mReplotQueued)
    {
      mReplotQueued = true;
      QTimer::singleShot(0, this, SLOT(replot()));
    }
    return;
  }

An exception occurred during the return statement; below is the code I was executing.
	connect(ui->tab1_openCameraBtn_2, &QPushButton::clicked, this, [this]() {
		QCustomPlot* customPlot = new QCustomPlot();
		customPlot->show();
	});

I can confirm that the integration process of QCustomPlot into the project is correct, and the QtPrintSupport module has been properly included. To clearly demonstrate the issue, I connected the signal-slot mechanism via the connect function to ensure the QCustomPlot object is generated after program initialization.
When compiling with ​​Visual Studio 2019​​ (C++20 language standard) and ​​Qt 6.6.0 MSVC2019_64​​, the lambda expression executes correctly. However, after packaging the application using windeployqt and EnigmaVB, clicking the button triggers a crash.
​​How should I troubleshoot this problem?​​
I apologize for the inconvenience and thank you for your assistance.

ps:When I create a new project in the same way, it runs normally in the same environment. This is quite strange. As you can see, I'm merely calling a lambda function. If I promote a QWidget to QCustomPlot in the UI file, it also causes the program to crash.

The following error code was returned when execution reached the return statement, which may assist in further troubleshooting.
An unhandled exception occurred at 0x00000000046BAC9D (Qt6Core.dll) in 1.dmp: ​​0xC0000005: Access violation writing to location 0x0000000000000002.

I have identified the issue—it stems from project management in Visual Studio 2019. Apologies for occupying public resources, and thank you for your assistance.