Author Topic: Windows Nighly Recent crash issue for Environment setting.  (Read 21068 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Windows Nighly Recent crash issue for Environment setting.
« on: June 08, 2015, 07:18:02 pm »
Edit: The crash NO longer seems to be caused by EnvVars plugin.
Doing these steps cause a crash by themselves; but, only when the EnvVars plugin is enabled
Settings -> Environment
Click on OK

Attached new crash log from CodeBlocks_svn10320


Tim S.

In contrast to the nightly offered below, this also includes the crash handler, so its probably better suited for testing and reporting.

Crash handler works.

In the last 3 or 4 nightly a Windows crash has started. Edit: No Problem on svn10253; has problem on svn10314/svn10311
Using the EnvVars plugin, if you have 2 added configs.
Trying to change from one added config to something else causes a crash.

Settings -> Environment
Environmental Variables
Then try to change the selected configs; it sometimes crashes before I try to change the selected config. 
Tim S.

New crash report for a self built Code::Blocks svn10311

Tim S.
« Last Edit: June 08, 2015, 08:54:22 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #1 on: June 08, 2015, 09:54:06 pm »
Are you sure you have a clean build of CB?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #2 on: June 08, 2015, 10:00:33 pm »
Are you sure you have a clean build of CB?

No, but, I do NOT think it matters since I am getting the problem on the nightly download.

Downloading  killerbot most recent build right now.

Tim S.
« Last Edit: June 08, 2015, 10:12:27 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #3 on: June 08, 2015, 10:13:44 pm »
killerbot most recent build (04 June 2015 build (10320)) has the same problem.

Tim S.


Are you sure you have a clean build of CB?

No, but, I do NOT think it matters since I am getting the problem on the nightly download.

Downloading  killerbot most recent build right now.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #4 on: June 08, 2015, 10:56:12 pm »
Doesn't happen on linux with rev10323, so I can't help much.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #5 on: June 08, 2015, 11:48:32 pm »
I can confirm the crash with the latest nightly (rev10320). It doesn't occur on my custom x64 build (rev10305).

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #6 on: June 08, 2015, 11:57:39 pm »
I can confirm the crash with the latest nightly (rev10320). It doesn't occur on my custom x64 build (rev10305).

What compiler version is used with your custom  x64 build?

I am starting to think it might be a Compiler and/or wxWidgets bug.

I have failed to see the problem using TDM MinGW GCC 4.7.1 under Windows 7 64 bit Home Pro.
But, I do see it under  MinGW GCC 4.9.?2? under Windows 7 32 bit Ultimate.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #7 on: June 09, 2015, 12:39:43 am »
What compiler version is used with your custom  x64 build?
tdm 4.9.2

I don't think that's compiler or wxwidgets related, I believe it's because of a change somewhere between 10305 and head revision. I'll rebuild my local trunk to the latest head and try to see where it crashes with drmingw. It doesn't always catch the crashing function though.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #8 on: June 09, 2015, 12:53:29 am »
Why don't you use gdb to find where it crashes?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #9 on: June 09, 2015, 01:25:09 am »
Well, I think it's because drmingw gives me a report whether the crashing program is under a debugging session or not. Anyway gdb spit the backtrace below:
Code
#0 0000000062711545	wxBaseArrayPtrVoid::Index(void const*, bool) const() (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#1 0000000062847448 wxCheckListBoxItem::Check(bool) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#2 0000000070A87898 nsEnvVars::EnvvarArrayApply(envvar=3 count of wxArrayString = {...}, lstEnvVars=0x1664cfa0) (D:\coding\projects\sw\codeblocks\trunk\src\plugins\contrib\envvars\envvars_common.cpp:479)
#3 0000000070A82E1F EnvVarsConfigDlg::LoadSettings(this=0x165d1a90) (D:\coding\projects\sw\codeblocks\trunk\src\plugins\contrib\envvars\envvars_cfgdlg.cpp:167)
#4 0000000070A82836 EnvVarsConfigDlg::EnvVarsConfigDlg(this=0x165d1a90, parent=0x164ca250) (D:\coding\projects\sw\codeblocks\trunk\src\plugins\contrib\envvars\envvars_cfgdlg.cpp:68)
#5 0000000070A82448 EnvVars::GetConfigurationPanel(this=0x7311d10, parent=0x164ca250) (D:\coding\projects\sw\codeblocks\trunk\src\plugins\contrib\envvars\envvars.cpp:286)
#6 000000000151E0E2 PluginManager::GetConfigurationPanels(this=0x6ed0160, group=-4, parent=0x164ca250, arrayToFill=...) (D:\coding\projects\sw\codeblocks\trunk\src\sdk\pluginmanager.cpp:1290)
#7 0000000000438671 EnvironmentSettingsDlg::AddPluginPanels(this=0x22e690) (D:\coding\projects\sw\codeblocks\trunk\src\src\environmentsettingsdlg.cpp:330)
#8 0000000000437B35 EnvironmentSettingsDlg::EnvironmentSettingsDlg(this=0x22e690, parent=0x61cbe10, art=0x61e0c00) (D:\coding\projects\sw\codeblocks\trunk\src\src\environmentsettingsdlg.cpp:308)
#9 0000000000462EA2 MainFrame::OnSettingsEnvironment(this=0x61cbe10, event=...) (D:\coding\projects\sw\codeblocks\trunk\src\src\main.cpp:4620)
#10 0000000062786541 wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#11 0000000062786603 wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#12 00000000627869B7 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#13 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#14 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#15 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#16 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#17 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#18 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#19 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#20 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#21 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#22 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#23 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#24 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#25 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#26 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#27 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#28 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)
#29 0000000062786948 wxEvtHandler::ProcessEvent(wxEvent&) () (D:\coding\projects\sw\codeblocks\trunk\src\devel_64\wxmsw28u_gcc_custom.dll:??)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #10 on: June 09, 2015, 01:38:58 am »
Can you try to revert rev 10309 and see if the problem goes away?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #11 on: June 09, 2015, 01:58:21 am »
Can you try to revert rev 10309 and see if the problem goes away?

Tried that on my Laptop and the problem was NOT there; then I added it back and the problem was still gone.
That why I guessed GCC 4.9.2 was the cause; but, using MinGW GCC 4.7.1 on my desktop and it still had the problem.
Now going to revert rev 10309 on my desktop to see what happens.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #12 on: June 09, 2015, 02:15:17 am »
Reverting the changes in rev10309 fixes the crash issue. So I think it's commit 10309 that results in the crash. I've come to believe that this is actually a wxwidgets problem considering it's the windows platform that's affected but I can't step into the 'check' function to see what's going on. Is there a way to do that or gdb just can't step into virtual functions?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #13 on: June 09, 2015, 02:34:39 am »
Can a C++ expert explain how sel can hold the result of new EnvVariableListClientData(key, value)?

Edit: Or does the sequence operator "," do something different in C++ than I think it does?

Tim S.

Code
    int sel = -1;
    if (lstEnvVars)
    {
      sel = lstEnvVars->Append(key + _T(" = ") + value, new EnvVariableListClientData(key, value));
      lstEnvVars->Check(sel, bCheck);
    }
« Last Edit: June 09, 2015, 02:37:26 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #14 on: June 09, 2015, 02:43:41 am »
The crash stopped when I fixed the seq. operations.

Edit: But, I think the second line does nothing useful; but, maybe in the C++ world it does something.

Code
diff --git a/src/plugins/contrib/envvars/envvars_cfgdlg.cpp b/src/plugins/contrib/envvars/envvars_cfgdlg.cpp
index 200e930..c47a3a6 100644
--- a/src/plugins/contrib/envvars/envvars_cfgdlg.cpp
+++ b/src/plugins/contrib/envvars/envvars_cfgdlg.cpp
@@ -450,7 +450,8 @@ void EnvVarsConfigDlg::OnAddEnvVarClick(wxCommandEvent& WXUNUSED(event))
     if (nsEnvVars::EnvvarVetoUI(key, NULL, -1))
       return;
 
-    int  sel     = lstEnvVars->Append(key + _T(" = ") + value, new nsEnvVars::EnvVariableListClientData(key, value));
+    int  sel     = lstEnvVars->Append(key + _T(" = ") + value);
+    new nsEnvVars::EnvVariableListClientData(key, value);
     bool success = nsEnvVars::EnvvarApply(key, value);
     if (sel>=0)
       lstEnvVars->Check(sel, success);

Code
diff --git a/src/plugins/contrib/envvars/envvars_common.cpp b/src/plugins/contrib/envvars/envvars_common.cpp
index fa4ded0..d1de5f4 100644
--- a/src/plugins/contrib/envvars/envvars_common.cpp
+++ b/src/plugins/contrib/envvars/envvars_common.cpp
@@ -475,7 +475,8 @@ bool nsEnvVars::EnvvarArrayApply(const wxArrayString& envvar,
     int sel = -1;
     if (lstEnvVars)
     {
-      sel = lstEnvVars->Append(key + _T(" = ") + value, new EnvVariableListClientData(key, value));
+      sel = lstEnvVars->Append(key + _T(" = ") + value);
+      new EnvVariableListClientData(key, value);
       lstEnvVars->Check(sel, bCheck);
     }
 

Tim S.
« Last Edit: June 09, 2015, 02:47:11 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org