PortableApps / Toucan

sync, backup and secure, all in one place
http://portableapps.com/apps/utilities/toucan
GNU General Public License v2.0
126 stars 23 forks source link

Exception error when switching the language #16

Closed marwelix closed 7 years ago

marwelix commented 7 years ago

I have reworked the German translation .po/.mo/.ini to a status of 100% translated. Now I have an exception error e.g. in the Rules tab.

With the English setup I can do the following steps without failure: Rules > Add Rule > change type to simple > leave type field

With the new German setup an exception error occurs when leaving the type field Regeln > Regel hinzufügen > change Typ to Name(simple) > leave type field Now an unhandled exception occurs > Ignore > wincmn.cpp(468) GetEventHandler()==this...

Can someone check this issue in the code? I have uploaded the .po/.mo/.ini in a branch of my Toucan fork.

I am new to github, so I am not sure if this is all I can do or if I have to to more to make the .po/.mo/.ini files available for the one who can verify the code. Thanks

3D1T0R commented 7 years ago

This is reproducible with other languages too (even English) if you modify any string (in the corresponding lang file) representing any of the options in the comboboxes in basicfunctions.cpp lines 61-69 to anything other than their defaults. Note: Such modifications are present in the current Polish & Russian translations, thus the issue described here applies not only to future translations to be added, but to translations currently being shipped with Toucan.

The only informative error appears in a window named "wxWidgets Debug Alert", and says ../../src/common/wincmn.cpp(468): assert "GetEventHandler() == this" failed in ~wxWindowBase(): any pushed event handlers must have been removed.

Btw, any chance I can get issue editing priveleges on all the repos? I have it on PAL, but not WhoDat or Toucan, can't tell if I have it on the others, as they have no issues to edit yet.

alex-ter commented 7 years ago

@marwelix, thanks for your contribution! I'll look into this in more details in the nearest time.

@3D1T0R, I think you'd need to ask @JohnTHaller for that, I don't have appropriate permissions to change settings of this repo.

alex-ter commented 7 years ago

So it took me some time to debug, but finally it turned out that message was actually misleading, as it was the second exception in a row and not the root cause of the problem. The origin was in the code validating the newly added rule, which didn't convert rule's function and type into English, while maps used for validation are English-only.

That caused an exception inside Boost when it tried to locate the entry in those maps, which wasn't really visible and was causing the program termination. And upon termination, due to the fact not all destructors were properly fired, there was that second exception regarding event handlers.