← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] wxLOCALE_CONV_ENCODING null-pointer exception with debug enabled

 

I add here a related issue while compiling kicad against wxW 2.9.1.
This should be solved by this patch. The init of the application
generates an assertion:

"wxLOCALE_CONV_ENCODING is no longer supported, add charset to your catalogs"

Since the new wxW version is always built as UNICODE, message catalogs
are translated anyway.
wxLOCALE_CONV_ENCODING is thus deprecated. The use of that flag in
Init() function generates a debug assertion in wxW 2.9.1.

I think you already know this issue.
This patch should avoid this assertion.

This is what reported into the intl.h file:

"Remove wxLOCALE_CONV_ENCODING flag.

This doesn't affect Unicode builds, only the legacy ANSI one.

PO files are now always converted to the appropriate charset according
to current locale. This was the default behavior for long time; not
doing the conversion was always a fragile hack that didn't work well.
Removing this flag simplifies wxLocale code. "

wxLOCALE_CONV_ENCODING is hence available only in 2.8 compatibility mode.

Just signaled here.

Best regards,

Lorenzo

2010/10/14 Martijn Kuipers <martijn.kuipers@xxxxxxxxx>:
> Dear Devs,
> In order to debug Kicad I have enabled DEBUG for both wxWidgets and Kicad.
> Both compile fine, but when any component from Kicad is executed a warning
> about wxLOCALE_CONV_ENCODING pops up. You can safely "cancel" this, but then
> it segfaults on a debug message and only if the default locale cannot be
> found. As you guessed it, this is the case on my system.
> Simply changing the messages makes the segfault go away.  This patch makes 2
> small changes:
> 1. It uses wxLOCALE_LOAD_DEFAULT instead of wxLOCALE_CONV_ENCODING, which is
> being deprecated (see http://trac.wxwidgets.org/changeset/65634)
> 2. Change the wxLogDebug message to not include the member 'm_LanguageId' as
> it can be NULL.
> Only the first change can have an effect for release-builds, but since it is
> being deprecated we might as well solve it now.
> /Martijn
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>



References