"Windows has triggered a breakpoint" error.
-
Hi, I have 2 forms, (frm_main and frm_meter) frm_main has a menuStrip control with a New File menu, When I click the menu i create a new variable (meter_control) of type frm_meter and execute meter_control.show(); The problem arrises when I click once on the menu, then I close the meter_control form and then click again. and then The error "Windows has triggered a breakpoint" shows... here is the code Public frm_main() { InitializeComponent(); this.menuStrip_newFile.Click += new EventHandler(menuStrip_newFile_click); } private void menuStrip_newFile_click(object sender, EventArgs e) { frm_meter meter_control = new frm_meter(); meter_control.Show(); // Here it sets the green breakpoint - the second time I try to create this variable after just closing it } The total error description is: Windows has triggered a breakpoint in micro_param.exe. This may be due to a corruption of the heap, and indicates a bug in micro_param.exe or any of the DLLs it has loaded. The output window may have more diagnostic information In the output window this is written: "HEAP[micro_param.exe]: HEAP: Free Heap block ff2028 modified at ff205c after it was freed" PS. I do not load any of DLL-s Thanks.
-
Hi, I have 2 forms, (frm_main and frm_meter) frm_main has a menuStrip control with a New File menu, When I click the menu i create a new variable (meter_control) of type frm_meter and execute meter_control.show(); The problem arrises when I click once on the menu, then I close the meter_control form and then click again. and then The error "Windows has triggered a breakpoint" shows... here is the code Public frm_main() { InitializeComponent(); this.menuStrip_newFile.Click += new EventHandler(menuStrip_newFile_click); } private void menuStrip_newFile_click(object sender, EventArgs e) { frm_meter meter_control = new frm_meter(); meter_control.Show(); // Here it sets the green breakpoint - the second time I try to create this variable after just closing it } The total error description is: Windows has triggered a breakpoint in micro_param.exe. This may be due to a corruption of the heap, and indicates a bug in micro_param.exe or any of the DLLs it has loaded. The output window may have more diagnostic information In the output window this is written: "HEAP[micro_param.exe]: HEAP: Free Heap block ff2028 modified at ff205c after it was freed" PS. I do not load any of DLL-s Thanks.
is frm_meter a static class? add some error handling: private void menuStrip_newFile_click(object sender, EventArgs e) { try{ frm_meter meter_control = new frm_meter(); meter_control.Show(); } catch (Exception ee) { MessageBox.Show(ee.message); } } atleast you should get a better error message. br Tomas
If it' stuck, DO NOT pull harder!