QCustomPlot Discussion and Comments

The problem with the release of the program with graphsReturn to overview

My problem is that when I compile the program in debug mode it works. But when I start the release mode, errors appear that are shown in the screenshot. It's error screen:

It's my pro file.

# Project created by QtCreator 2017-10-11T10:18:44

QT       += core gui sql
QT       += printsupport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = FuelForShip

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

        main.cpp \
        authorization.cpp \
    mainwindow.cpp \
    qcustomplot.cpp \
    db.cpp \
    dialog_add_engine.cpp \
    dialog_add_ship.cpp \
    parametr_ship.cpp \
    add_course.cpp \

        authorization.h \
    mainwindow.h \
    qcustomplot.h \
    db.h \
    global_variables.h \
    dialog_add_engine.h \
    dialog_add_ship.h \
    parametr_ship.h \
    add_course.h \

FORMS += \
        authorization.ui \
    mainwindow.ui \
    dialog_add_engine.ui \
    dialog_add_ship.ui \
    parametr_ship.ui \
    add_course.ui \

Release mode uses advanced compiler optimizations, there must me something related to that. Make sure you have:
- Included the right headers on source codes, mainly "qcustomplot.h";
- Runned qmake before rebuilding your project (a 'Clean All' before doing that is recommended);
- Initialized ALL variables on your code, including arrays. Compiler optimizations strongly diverge on this issue.

Having done that, I guess you should review the parameters you're passing to these functions mentioned on compiling errors. Maybe you have missed something that debug mode let go.
As I said, also pay attention to those QVectors you're passing as parameters, have you initialized them?