User forums > Help

Windows Nighly Recent crash issue for Environment setting.

<< < (3/9) > >>

oBFusCATed:
Can you try to revert rev 10309 and see if the problem goes away?

stahta01:

--- Quote from: oBFusCATed on June 09, 2015, 01:38:58 am ---Can you try to revert rev 10309 and see if the problem goes away?

--- End quote ---

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.

scarphin:
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?

stahta01:
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);
    }

--- End code ---

stahta01:
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);

--- End code ---


--- 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);
     }
 

--- End code ---

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version