← Back to team overview

kicad-developers team mailing list archive

Re: Issue with wxWidgets 3.1.2 - MSW. Need GAL gurus help.


On 12/22/18 8:04 PM, jp charras wrote:
> Le 22/12/2018 à 18:49, Maciej Suminski a écrit :
>> On 12/21/18 8:22 PM, jp charras wrote:
>>> I very recently updated wxWidgets from 3.1.1 to 3.1.2
>>> I ran into a problem with Pcbnew and Gerbview (Not eeschema, that has a
>>> different event handler):
>>> The context menus Zoom selection and Grid Selection are no longer
>>> working (and presumably any other context submenu).
>>> I had a look into this issue (MSW specific).
>>> The 3.1.1 and the 3.1.2 have different behaviors.
>>> The attached patch fixes this issue.
>>> However I do not understand this code in context_menu.cpp line 361:
>>>  if( menu && menu != this )
>>> The condition " && menu != this" is the culprit:
>>> in wxWidgets 3.1.2, menu == this happens always.
>>> in wxWidgets 3.1.2, menu == this happens never.
>>> This line has no comment, and must be modified.
>>> I'll be happy if Thomasz or Orson could have a look into that issue, and
>>> that change and if this condition can be explained, if it is needed.
>>> Thanks,
>> Hi Jean-Pierre,
>> The commit message for the mentioned line says "Fix for clarification
>> menu crash (GAL/Windows)". Unfortunately, it had been committed before
>> we started using 'Fixes:' tag, so I cannot point to a particular bug
>> report. My impression is that FindItem() could return the same menu
>> object, ultimately leading to an infinite loop on Windows.
>> I will try your patch later with an wxWidgets 3.0.x version to see if
>> removing the condition causes any problems.
>> Cheers,
>> Orson
> Hi Orson,
> Thanks to have a look into this problem.
> I just saw the "Set Language" menu has a similar issue (sub-menus do not
> work), but my fix does not work for this menu.
> However, because it also does not work in Eeschema, I am guessing it
> could be a different issue.

Hi Jean-Pierre,

I have checked the proposed patch with wxMSW 3.0.4 and it works fine.
Moreover, even with without 'menu != this' condition, I have not
observed any issues. I think there might have been a problem with an
older version of wxWidgets, or it is now fixed somewhere else.


Attachment: signature.asc
Description: OpenPGP digital signature

Follow ups