LearnOpenGL.exe has triggered a breakpoint

I’m following LearnOpenGL Tutorials here is my code i wrote while creating a window but it is throwing error on this line “while (!glfwWindowShouldClose(window)); {”
Here is the tutorial i was following https://youtu.be/z03LXhRBLGI?si=G4pj1pMfHFH4Zzb7

While following i got this error Access violation executing location 0x0000000000000000. OpenGL with GLAD and GLFW and checked out the code in answers and now I’m getting LearnOpenGL.exe has triggered a breakpoint. issue

#include<iostream>
#include<glad/glad.h>
#include<GLFW/glfw3.h>

using namespace std;

// framebuffer size callback function
void resize(GLFWwindow* window, int width, int height)
{
    glViewport(0, 0, width, height);
}


void render(GLFWwindow* window) {

    // here we put our rendering code

}

int main() {
    glfwInit();
    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

    GLFWwindow* window = glfwCreateWindow(800, 800, "LearnOpenGL", NULL, NULL);
    if (window = NULL) {
        std::cout << "Failed to create GLFW window" << std::endl;
        glfwTerminate();
        return -1;
    }

    glfwMakeContextCurrent(window);
    gladLoadGL();
    
    //glViewport(0, 0, 800, 800);

    //glClearColor(0.7f, 0.13f, 0.17f, 1.0f);
    //glClear(GL_COLOR_BUFFER_BIT);
    //glfwSwapBuffers(window);

    glfwSetFramebufferSizeCallback(window, resize);

    while (!glfwWindowShouldClose(window)); {
        glClear(GL_COLOR_BUFFER_BIT);
        glClearColor(0.0f, 0.0f, 0.1f, 0.0f);
        render(window);
        glfwSwapBuffers(window);
        glfwPollEvents();
    }

    glfwDestroyWindow(window);
    glfwTerminate();
    return 0;
}

Output

'LearnOpenGL.exe' (Win32): Loaded 'C:UsersLearnOpenGLx64DebugLearnOpenGL.exe'. Symbols loaded.
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32ntdll.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32kernel32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32KernelBase.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32user32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32win32u.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32gdi32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32gdi32full.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32msvcp_win.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32ucrtbase.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32shell32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32msvcp140d.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32vcruntime140d.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32vcruntime140_1d.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32ucrtbased.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32imm32.dll'. 
The thread 0x8b38 has exited with code 0 (0x0).
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32dinput8.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32advapi32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32msvcrt.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32sechost.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32bcrypt.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32rpcrt4.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32XInput1_4.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32combase.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32cfgmgr32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32devobj.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32dwmapi.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32InputHost.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32CoreMessaging.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32SHCore.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32bcryptprimitives.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32cryptbase.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32uxtheme.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32msctf.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32opengl32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32glu32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32DXCore.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32kernel.appcore.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32clbcatq.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32AppXDeploymentClient.dll'. 
'LearnOpenGL.exe' (Win32): Unloaded 'C:WindowsSystem32AppXDeploymentClient.dll'
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32DriverStoreFileRepositorynvamsi.inf_amd64_1d120d4dcaf3ccbfnvoglv64.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32setupapi.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32ole32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32oleaut32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32version.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32wtsapi32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32msasn1.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32cryptnet.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32crypt32.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32drvstore.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32wldp.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32wintrust.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32ntmarta.dll'. 
The thread 0x7558 has exited with code 0 (0x0).
The thread 0x6d14 has exited with code 0 (0x0).
The thread 0xb07c has exited with code 0 (0x0).
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32imagehlp.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32cryptsp.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32rsaenh.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32DriverStoreFileRepositorynvamsi.inf_amd64_1d120d4dcaf3ccbfnvgpucomp64.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32windows.storage.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32WinTypes.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32shlwapi.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32nvspcap64.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32profapi.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32psapi.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32dbghelp.dll'. 
'LearnOpenGL.exe' (Win32): Unloaded 'C:WindowsSystem32psapi.dll'
'LearnOpenGL.exe' (Win32): Unloaded 'C:WindowsSystem32dbghelp.dll'
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32psapi.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32dbghelp.dll'. 
'LearnOpenGL.exe' (Win32): Unloaded 'C:WindowsSystem32psapi.dll'
'LearnOpenGL.exe' (Win32): Unloaded 'C:WindowsSystem32dbghelp.dll'
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32psapi.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32dbghelp.dll'. 
'LearnOpenGL.exe' (Win32): Unloaded 'C:WindowsSystem32psapi.dll'
'LearnOpenGL.exe' (Win32): Unloaded 'C:WindowsSystem32dbghelp.dll'
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32psapi.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32dbghelp.dll'. 
'LearnOpenGL.exe' (Win32): Unloaded 'C:WindowsSystem32psapi.dll'
'LearnOpenGL.exe' (Win32): Unloaded 'C:WindowsSystem32dbghelp.dll'
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32powrprof.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32umpdc.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32winsta.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32TextInputFramework.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32CoreUIComponents.dll'. 
Debug Error!

Program: C:UsersLearnOpenGLx64DebugLearnOpenGL.exe

abort() has been called

(Press Retry to debug the application)
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32TextShaping.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32UIAutomationCore.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32ApplicationTargetedFeatureDatabase.dll'. 
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32twinapi.appcore.dll'. 
The thread 0x9e64 has exited with code 0 (0x0).
'LearnOpenGL.exe' (Win32): Loaded 'C:WindowsSystem32oleacc.dll'. 
Exception thrown at 0x00007FFE0EC2FABC in LearnOpenGL.exe: Microsoft C++ exception: wil::ResultException at memory location 0x000000EC9E4FC8E0.
LearnOpenGL.exe has triggered a breakpoint.

I was expecting a window to pop

New contributor

Sahil Patel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật