Audio plugin crash with multiple instances of path class

I am creating an audio plugin. One of the gui components in the plugin files contains multiple paths. I am instantiating these objects of the path class using something like- Path MyPath[13]. If i make the no of instantiations as 14 or more(Path MyPath[14]), my vst plugin crashes in audio mulch saying this:

VST Plugin Crash Information

File Name: C:\Users\agawde\Documents\audio_mulch_vst\example.dll

File Size: 4523520 bytes

File Creation Time: Monday, December 01, 2014, 14:31:28 PM

Exception Code: c0000005 (ACCESS_VIOLATION)

Fault Address: 777343E0 01:000243e0 ntdll.dll

Fault Details: Read of address 00000004

Thread Id: 1332 (GUI thread)

VST Function : dispatcher

VST Function Parameters:

opCode: 13 (effEditGetRect) index: 0 value: 0 ptr: 0018D590 opt: 0

Registers:

EAX: 060351e0 EBX: 06035fe0 ECX: 00000000 EDX: 0602edf0 ESI: 060351d8 EDI: 060e0000

CS:EIP: 0023:777343e0 SS:ESP: 002b:0018c574 EBP: 0018c59c

DS: 002b ES: 002b FS: 0053 GS: 002b

Flags: 00210246

Host Information:

AudioMulch Interactive Music Studio version 2.2.4

Build date: 12/7/2013

Web site: http://www.audiomulch.com

Host Developer: Ross Bencina <rossb@audiomulch.com>

 

I am not clear why the number of object instantiations should cause the program to crash?Anyone can help me with this one? :|

 

The access violation indicates you have an invalid pointer. Check your code scope and object lifetimes.

Also check out OwnedArray.

Rail