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

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #15 on: June 09, 2015, 03:05:07 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?
I'm not a C++ expert but 'sel' has nothing to with 'new EnvVariableListClientData(key, value)':
Code
int  sel     = lstEnvVars->Append(key + _T(" = ") + value, new nsEnvVars::EnvVariableListClientData(key, value));
invokes the overloaded 'Append' function with 2 arguments, there is no sequencing here. Sorry if I misunderstood you and you were talking about something else.

CB crashes at line 479 in 'envvars_common.cpp', I don't think 'Append' is the problematic part.

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #16 on: June 09, 2015, 03:19:44 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?
I'm not a C++ expert but 'sel' has nothing to with 'new EnvVariableListClientData(key, value)':
Code
int  sel     = lstEnvVars->Append(key + _T(" = ") + value, new nsEnvVars::EnvVariableListClientData(key, value));
invokes the overloaded 'Append' function with 2 arguments, there is no sequencing here. Sorry if I misunderstood you and you were talking about something else.

CB crashes at line 479 in 'envvars_common.cpp', I don't think 'Append' is the problematic part.

I disagree please look at the line I changed in the patch. Is it not line 479 or 478?

In C.

A = B, C;

Assigns the value of C to A.


OK, I see what you mean now.

Tim S.
« Last Edit: June 09, 2015, 03:26:49 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #17 on: June 09, 2015, 03:45:48 am »
So, I have decided to stop for this night maybe someone will figure it out.
I just am too tired to think of anything other than wxWidgets is NOT likely something in the code.

Edit: I have decided next time to see if the problem exists under wxWidgets 3.0 because it has better asserts in it.

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 #18 on: June 09, 2015, 09:29:31 am »
I'm calling the Append method that takes two parameters a string and a wxClientData object.
I have no idea why this fails.
To see the real cause of the problem you'll need to rebuild wxwidgets in debug mode.
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #19 on: June 09, 2015, 09:30:46 am »
Also what is the value of sel when 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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #20 on: June 09, 2015, 09:44:09 am »
BTW: I can reproduce the crash. I'd vote to revert the last changes applied in SVN because these render the plugin unusable.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #21 on: June 09, 2015, 09:48:26 am »
For me it crashes as soon as I try to open the environment settings.

The crash results in line 167 in EnvVarsConfigDlg::LoadSettings() of envvars_cfgdlr.cpp:
if (nsEnvVars::EnvvarArrayApply(var_array, lstEnvVars))
lstEnvVars seems to be valid... very weird.

So I cannot set any environment (not only envvar) settings... that is no good.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #22 on: June 09, 2015, 10:25:37 am »
Can someone extract his/her env settings from default.conf and share them?
(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!]

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #23 on: June 09, 2015, 04:11:25 pm »
Can someone extract his/her env settings from default.conf and share them?

Code
	<envvars>
<sets>
<default>
<ENVVAR0>
<str>
<![CDATA[1|LC_ALL|en_US.utf8]]>
</str>
</ENVVAR0>
</default>
<wx28>
<ENVVAR0>
<str>
<![CDATA[1|wxcfg|gcc_dll\mswu]]>
</str>
</ENVVAR0>
<ENVVAR1>
<str>
<![CDATA[1|wxwin|C:\wxMSW\wxMSW-2.8\wxMSW-2.8.12]]>
</str>
</ENVVAR1>
</wx28>
<wx30>
<ENVVAR0>
<str>
<![CDATA[1|wxcfg|gcc_dll\mswu]]>
</str>
</ENVVAR0>
<ENVVAR1>
<str>
<![CDATA[1|wxwin|C:\wxMSW\wxMSW-3.0\wxWidgets-3.0.2]]>
</str>
</ENVVAR1>
</wx30>
</sets>
<ACTIVE_SET>
<str>
<![CDATA[wx30]]>
</str>
</ACTIVE_SET>
<DEBUG_LOG bool="1" />
</envvars>

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

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #24 on: June 09, 2015, 05:08:02 pm »
Windows CB 10311 edited to enable debug mode with wxWidgets 2.8.12 debug.

Code
---------------------------
wxWidgets Debug Alert
---------------------------
../../src/msw/listbox.cpp(441): assert "wxAssertFailure" failed in DoSetItemClientData(): Can't use client data with owner-drawn listboxes
Do you want to stop the program?
You can also choose [Cancel] to suppress further warnings.
---------------------------
Yes   No   Cancel   
---------------------------

---------------------------
wxWidgets Debug Alert
---------------------------
../../src/msw/listbox.cpp(441): assert "wxAssertFailure" failed in DoSetItemClientData(): Can't use client data with owner-drawn listboxes
Do you want to stop the program?
You can also choose [Cancel] to suppress further warnings.
---------------------------
Yes   No   Cancel   
---------------------------
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 #25 on: June 09, 2015, 08:27:45 pm »
Rather strange. How on earth does this control get the wxLB_OWNERDRAW style set?
There is no mentioning of wxLB_OWNERDRAW in the whole repo. :(

And the styles for it in the xrc file are wxLB_SINGLE|wxLB_HSCROLL|wxLB_NEEDED_SB...
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #26 on: June 09, 2015, 09:28:08 pm »
I see this happens because the control is wxCheckListBox... stupid.
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #27 on: June 09, 2015, 09:32:13 pm »
Can someone confirm that this issue is not present in wx30 builds?
Looking at the code I can guess that it should be working fine.
(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!]

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #28 on: June 09, 2015, 11:57:29 pm »
Can someone confirm that this issue is not present in wx30 builds?
Looking at the code I can guess that it should be working fine.

Will check later today; building wx30 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Windows Nighly Recent crash issue for Environment setting.
« Reply #29 on: June 10, 2015, 01:55:30 am »
Can someone confirm that this issue is not present in wx30 builds?
Looking at the code I can guess that it should be working fine.

Will check later today; building wx30 right now.

Tim S.

It worked with the debug build of wxWidgets 3.0.2.
Going to test the non-debug version next.
Edit: No problem with the non-debug version.

Tim S.
« Last Edit: June 10, 2015, 02:23:18 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