Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTK+ assert when opening a PO file #396

Closed
png2378 opened this issue May 16, 2017 · 11 comments
Closed

GTK+ assert when opening a PO file #396

png2378 opened this issue May 16, 2017 · 11 comments

Comments

@png2378
Copy link

png2378 commented May 16, 2017

If I run Poedit and then open some po-file, everything is fine. But if I try to open po-file directly (for example from desktop), Poedit crashes.

Terminal log:

[maxim@ProBook]$ poedit gnome-software.master.ru.po
Fontconfig error: "local.conf", line 2: no element found

(poedit:23250): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(poedit:23250): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(poedit:23250): Gtk-WARNING **: Negative content width -33 (allocation 1, extents 17x17) while allocating gadget (node button, owner GtkToggleButton)

(poedit:23250): Gtk-WARNING **: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkToggleButton)

(poedit:23250): Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
poedit: cairo-arc.c:189: _cairo_arc_in_direction: Assertion `angle_max >= angle_min' failed.
Aborted (стек памяти сброшен на диск)

OS: Fedora 26
DE: Gnome 3.24
Version: Poedit 2.0.2

@vslavik
Copy link
Owner

vslavik commented May 17, 2017

From a quick glance, looks like you got an assert in a library Poedit uses (GTK+ or wxGTK, versions of neither of which you provide), not in Poedit itself. You probably should file a bug with Fedora.

If you think otherwise, please follow this advice and also provide backtrace from the debugger (with debug symbols compiled in!).

@vslavik vslavik added the Linux label May 17, 2017
@vslavik vslavik changed the title Linux: Poedit doesn't open when I try to open po-file GTK+ assert when opening a PO file May 17, 2017
@png2378
Copy link
Author

png2378 commented May 17, 2017

So, I left feedback in Fedora's update gating system. I hope that my info will help (I don't know how I can provide backtrace).

@c72578
Copy link
Contributor

c72578 commented May 18, 2017

Attached you will find a backtrace
Some version info:
Poedit: commit d2084cf
wxGTK3.x86_64 3.0.3-1.fc26
gtk+.x86_64 1:1.2.10-83.fc26
gtk3.x86_64 3.22.15-1.fc26

Remark: The problem does not appear in previous Poedit 2.0.1 release.

gdb_poedit_backtrace.zip

@c72578
Copy link
Contributor

c72578 commented May 19, 2017

In the meantime I could do some further tests.

  • The problem appeared with this commit: f98feb2
    git checkout f98feb2
    commit f98feb2 (HEAD)
    Author: pepc pcondal@apsic.com
    Date: Sat Mar 25 17:27:53 2017 +0100

    Add --line command-line switch

Problem appeared

  • Previous commit: 0f9dac7
    git checkout 0f9dac7
    commit 0f9dac7 (HEAD)
    Author: Václav Slavík vaclav@slavik.io
    Date: Wed May 10 18:36:32 2017 +0200
    Highlight 2+ spaces in the middle of string too

OK

@vslavik
Copy link
Owner

vslavik commented May 19, 2017

Thanks! That's a useful clue that I wouldn't have suspected.

c72578 added a commit to c72578/rpmbuild that referenced this issue May 31, 2017
This will remove "--line command-line switch" of version 2.0.2,
but opening of po files will be possible again.
See: vslavik/poedit#396
Revert vslavik/poedit@f98feb2
Revert vslavik/poedit@4b692e6
git diff 4b692e6 0f9dac7 > ~/rpmbuild/SOURCES/poedit-2.0.2_revert_4b692e6_f98feb2_invoke-dde_line_switch.patch
Workaround for now, until this is fixed
@vslavik
Copy link
Owner

vslavik commented Jun 1, 2017

This seems to be largely coincidental with f98feb2, not directly caused by it. Not reproducible with wx trunk either, only 3.0.

@vslavik vslavik closed this as completed in 86e0677 Jun 1, 2017
c72578 added a commit to c72578/rpmbuild that referenced this issue Jun 2, 2017
* Fri Jun 02 2017 Wolfgang Stöggl <c72578@yahoo.de> - 2.0.2-4
- Add upstream fix to enable opening of .po files again in Poedit 2.0.2
  Fix DrawRoundedRectangle assert with wxGTK 3.0
  Commit: vslavik/poedit@86e0677
  Fixes: vslavik/poedit#396
@Martchus
Copy link

Martchus commented Jul 5, 2017

Maybe it is coincidental, but the issue also occurs under Arch Linux and the patch/revert provided by @c72578 fixes it here, too.

@vslavik
Copy link
Owner

vslavik commented Jul 5, 2017

@Martchus You will observe that I don't dispute that; in fact I explicitly confirm it (and thus your "me too" comment adds little value: yes, it is already known that wx-3.0 causes it). That a commit changes circumstances in the code in such a way that it triggers a bug in some unrelated code is not unheard of — that doesn't mean that said change causes it.

The far more interesting question that I would appreciate help with is what causes the actual bug and if there's anything that can be done about it in client code, i.e. outside of wxGTK. Reverting f98feb2 is out of the question, but it must be some small bit of it triggering this and that may be possible to work around.

(And sorry, I apparently closed this by accidentally clicking the other comment button. Didn't mean to. If it can be worked around in Poedit code, it should.)

@vslavik vslavik reopened this Jul 5, 2017
@Martchus
Copy link

Martchus commented Jul 5, 2017

I've just responded because you've been closing the issue and I wasn't sure how to interpret your last comment. So thanks for making it clear. And I agree that the commit should not be reverted.

@vslavik
Copy link
Owner

vslavik commented Jul 5, 2017

Yeah, I see the ambiguity now :(

@vslavik
Copy link
Owner

vslavik commented Jul 21, 2017

(And sorry, I apparently closed this by accidentally clicking the other comment button. Didn't mean to. If it can be worked around in Poedit code, it should.)

@Martchus Actually, I was confused: as seen in the log above, commit 86e0677 fixed this 4 days before your comment. Closing again; please reopen/comment only if you tested with the latest master, not 2.0.2.

@vslavik vslavik closed this as completed Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants