News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Windows Nighly Recent crash issue for Environment setting.

Started by stahta01, June 08, 2015, 07:18:02 PM

Previous topic - Next topic

scarphin

Quote from: stahta01 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?
I'm not a C++ expert but 'sel' has nothing to with 'new EnvVariableListClientData(key, value)':
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.

stahta01

Quote from: scarphin on June 09, 2015, 03:05:07 AM
Quote from: stahta01 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?
I'm not a C++ expert but 'sel' has nothing to with 'new EnvVariableListClientData(key, value)':
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

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!]

oBFusCATed

(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!]

MortenMacFly

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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

MortenMacFly

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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

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!]

stahta01

Quote from: oBFusCATed on June 09, 2015, 10:25:37 AM
Can someone extract his/her env settings from default.conf and share them?


<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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

Windows CB 10311 edited to enable debug mode with wxWidgets 2.8.12 debug.


---------------------------
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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

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!]

oBFusCATed

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!]

oBFusCATed

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!]

stahta01

Quote from: oBFusCATed 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.

Will check later today; building wx30 right now.

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

stahta01

Quote from: stahta01 on June 09, 2015, 11:57:29 PM
Quote from: oBFusCATed 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.

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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]