mono / mono

Mono open source ECMA CLI, C# and .NET implementation.
https://www.mono-project.com
Other
10.94k stars 3.81k forks source link

problems with copy pasting "óż" #9813

Open matkoniecz opened 5 years ago

matkoniecz commented 5 years ago

As discussion at https://sourceforge.net/p/keepass/feature-requests/2254/ indicates this is a mono bug - see https://sourceforge.net/p/keepass/feature-requests/2254/#d4de

Thanks for reporting this issue; I can reproduce it.

This is a Mono bug. As it can be seen from the stack trace, there's no KeePass code involved: Mono's window message handler requests the list view to paint itself, which in the end results in an exception thrown by the GDI+ implementation.

Unfortunately, I don't see how a workaround could look like. One idea would be to remove all problematic characters when opening a database, but the ó character is rather normal and I don't think that KeePass should simply remove such characters; furthermore, I don't see any reasonable way to predict which characters are problematic and which are not. The only real solution is to fix this bug in Mono.

Steps to Reproduce

  1. use keepass2
  2. create entry
  3. copy "óż" to notes field
  4. save entry

Current Behavior

keepass2 crashes

Expected Behavior

no crash

On which platforms did you notice this

[ ] macOS [x] Linux [ ] Windows

Version Used:

Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)

Stacktrace

see https://sourceforge.net/p/keepass/feature-requests/2254/#b925

filipnavara commented 5 years ago

You are using ancient version of Mono, 5.12 is the current stable one. There has also been a big number of bug fixes to libgdiplus, which is actually the component that is producing the GDI+ errors.

matkoniecz commented 5 years ago

I am now upgrading using instructions from http://www.mono-project.com/download/stable/

EDIT: I upgraded to Mono JIT compiler version 5.12.0.301 (tarball Wed Jul 25 15:47:18 UTC 2018)

matkoniecz commented 5 years ago

Copy-pasting "óż" continues to be buggy. Crash is now longer triggered by pasting "óż" results in nothing appearing in the target text field.

filipnavara commented 5 years ago

I believe that it is likely libgdiplus problem. We recently changed the default font rendering backend to use Pango library and support more complex characters and layouts, but there's still no official release for that unfortunately.