Root Crashes on windows 10

Hi,
I tried to execute a macro in which I have created a vector of size [15][3130]. However it causes root to crash with following code.

Faulting application name: root.exe, version: 6.23.1.0, time stamp: 0x600a6bfc
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x79afb530
Faulting process id: 0x2b14
Faulting application start time: 0x01d6f3bd0300b8b2
Faulting application path: E:\root\bin\root.exe
Faulting module path: unknown
Report Id: 2dd03b3d-2a40-4510-85be-c5eac1141fe2
Faulting package full name: 
Faulting package-relative application ID: 

I have also attached macro .Test.C (1.2 KB)
Please read tips for efficient and successful posting and posting code

ROOT Version: 23.1
Platform: Windows 10
Compiler: Microsoft Visual Studio Community 2019
Version 16.8.3


Hi,
that looks like a segmentation fault or similar memory error, it’s probably due to a bug in your macro (e.g. out of bounds access, dereferencing a nullptr, etc).

For example I see at line 23 there is a h[j] that should be h[i].

Cheers,
Enrico

Also, in line 27 you probably want: M.push_back(m); m.clear();

Thank you so much for your help . I don’t realize that.

Thank you for your help . I will include that.