Код работает пк, а на ноуте при окончании работы выскакивает данная ошибка
Написано с использование библиотеки JUCE. Есть ли вероятность того что просто не хватает оперативки?
#pragma once
#include <JuceHeader.h>
class MainComponent : public juce::Component
{
public:
MainComponent();
~MainComponent();
void paint(juce::Graphics&) override;
void resized() override;
private:
juce::TextButton modelCarButton;
juce::TextButton carInfoButton;
juce::TextButton checkSystemButton;
juce::TextButton analyseSystemButton;
juce::TextButton checkDocumentsButton;
juce::TextButton technicalPassportButton;
juce::TextButton techInspectionButton;
void modelCarButtonClicked();
void carInfoButtonClicked();
void checkSystemButtonClicked();
void analyseSystemButtonClicked();
void checkDocumentsButtonClicked();
void technicalPassportButtonClicked();
void techInspectionButtonClicked();
}; ```
___________________________________________________________
MainComponent.cpp
#include "MainComponent.h"
MainComponent::MainComponent()
{
addAndMakeVisible(modelCarButton);
modelCarButton.setButtonText("Model");
modelCarButton.onClick = [this] { modelCarButtonClicked(); };
addAndMakeVisible(carInfoButton);
carInfoButton.setButtonText("Info");
carInfoButton.onClick = [this] { carInfoButtonClicked(); };
addAndMakeVisible(checkSystemButton);
checkSystemButton.setButtonText("Check system");
checkSystemButton.onClick = [this] { checkSystemButtonClicked(); };
addAndMakeVisible(analyseSystemButton);
analyseSystemButton.setButtonText("Analyse system");
analyseSystemButton.onClick = [this] { analyseSystemButtonClicked(); };
addAndMakeVisible(checkDocumentsButton);
checkDocumentsButton.setButtonText("Check documents");
checkDocumentsButton.onClick = [this] { checkDocumentsButtonClicked(); };
addAndMakeVisible(technicalPassportButton);
technicalPassportButton.setButtonText("Technical passport");
technicalPassportButton.onClick = [this] { technicalPassportButtonClicked(); };
addAndMakeVisible(techInspectionButton);
techInspectionButton.setButtonText("Application for technical inspection");
techInspectionButton.onClick = [this] { techInspectionButtonClicked(); };
}
MainComponent::~MainComponent()
{
}
void MainComponent::paint(juce::Graphics& g)
{
g.fillAll(getLookAndFeel().findColour(juce::ResizableWindow::backgroundColourId));
}
void MainComponent::resized()
{
// Розташовка кнопок на екрані
juce::Rectangle<int> area = getLocalBounds();
int buttonHeight = 45;
modelCarButton.setBounds(area.removeFromTop(buttonHeight));
carInfoButton.setBounds(area.removeFromTop(buttonHeight));
checkSystemButton.setBounds(area.removeFromTop(buttonHeight));
analyseSystemButton.setBounds(area.removeFromTop(buttonHeight));
checkDocumentsButton.setBounds(area.removeFromTop(buttonHeight));
technicalPassportButton.setBounds(area.removeFromTop(buttonHeight));
techInspectionButton.setBounds(area.removeFromTop(buttonHeight));
}
void MainComponent::modelCarButtonClicked()
{
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Model", "Nissan Silvia S14");
}
void MainComponent::carInfoButtonClicked()
{
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Info", "Year 1994, Engine 2.0L, Transmission 5 Gears, Average price : $10, 000");
}
void MainComponent::checkSystemButtonClicked()
{
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Check System", "System checked: Brakes is good, Engine is serviceable, Oil level is good");
}
void MainComponent::analyseSystemButtonClicked()
{
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Analyse System", "Analysis result: Electronic control unit (ECU) is well");
}
void MainComponent::checkDocumentsButtonClicked()
{
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Check Documents", "All documents verified");
}
void MainComponent::technicalPassportButtonClicked()
{
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Technical Passport", "Passport active");
}
void MainComponent::techInspectionButtonClicked()
{
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Application for Technical Inspection", "Click to create a new technical inspection");
}
________________________________________________________________________
Main.cpp
#include <JuceHeader.h>
#include "MainComponent.h"
class YourApplication : public juce::JUCEApplication
{
public:
YourApplication() {}
const juce::String getApplicationName() override { return "Your Application"; } //The system of passing a technical inspection by vehicles
const juce::String getApplicationVersion() override { return "1.0.0"; }
void initialise(const juce::String& commandLine) override
{
mainWindow.reset(new MainWindow());
mainWindow->setContentOwned(new MainComponent(), true);
mainWindow->centreWithSize(500, 500);
mainWindow->setVisible(true);
}
void shutdown() override
{
mainWindow = nullptr; // Занулити вказівник mainWindow перед завершенням додатка
}
void systemRequestedQuit() override
{
quit();
}
void anotherInstanceStarted(const juce::String& commandLine) override {}
private:
class MainWindow : public juce::DocumentWindow
{
public:
MainWindow() : juce::DocumentWindow("Your Application",
juce::Colours::black,
juce::DocumentWindow::allButtons)
{
}
void closeButtonPressed() override
{
juce::JUCEApplication::getInstance()->systemRequestedQuit();
}
};
std::unique_ptr<MainWindow> mainWindow;
};
START_JUCE_APPLICATION(YourApplication)
