Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » invalid memory access
invalid memory access [message #53737] |
Sun, 26 April 2020 07:50 |
|
Hi all-
I'm running my very small application (it only has 5 or 6 dialogs so far). If I run code from my menu, I can run it with sql until I am blue in the face. When I start to open up other dialogs and switch back I get a msg. that says something about invalid memory access. I run a gui with a main section for my main window. This is the menu system to launch other forms. I'm using Ubuntu xfce. Any ideas why it works and then crashes when I am switching dialogs? Thnx - roboloki
bar.Add("check master", [=] { showmaster();});
bar.Add("check detail", [=] { showdetail();});
bar.Add("Account Maint.", [=] { showaccounts();});
bar.Add("Subsidiary", [=] { showciti();});
bar.Add("Purch. Journal", [=] { showpj();});
bar.Add("Exit", [=] { Exit(); });
}
void MyMain::MainMenu(Bar& bar) {
bar.Sub("Menu", [=](Bar& bar) { SubMenu(bar); });
}
void MyMain::showaccounts() {
// show check master
App2 app2;
switch(app2.Run()) {
case IDOK:
break;
case IDCANCEL:
Exclamation("Canceled");
}
}
I use this code for each dialog with an okay and cancel button:
ok.Ok() <<= Acceptor(IDOK);
cancel.Cancel() <<= Rejector(IDCANCEL);
-
Attachment: pj
(Size: 2.45KB, Downloaded 157 times)
[Updated on: Sun, 26 April 2020 08:10] Report message to a moderator
|
|
|
Re: invalid memory access [message #53738 is a reply to message #53737] |
Sun, 26 April 2020 08:42 |
|
Hey guys,
It is really cool. I am using the debugger for the first time ever. It is telling me it is a connection issue with my postgres.
I will have to check into that.
Thanks,
roboloki
|
|
|
|
Re: invalid memory access [message #53744 is a reply to message #53740] |
Sun, 26 April 2020 12:28 |
|
HI deep-
Yeah, I figured that out since the last time I checked in. Another thing I did is when using the grid, I have to use SQL instead of like Sql sql(m3_session) ... and I can't use if(!OkCommit(m3_session, "Unable to delete transaction data.")) with the grid either. I need to use a regular Commit();
The debugger put me on to what I did wrong, and it is exactly like you said.
I've got my little programming running with no invalid memory access now. HOoray !
I obviously have more work to do though.
As always, thanks for the cool help
|
|
|
Goto Forum:
Current Time: Fri Apr 26 00:33:44 CEST 2024
Total time taken to generate the page: 0.07727 seconds
|