Bug 1658033 - gedit crash trying to open a simple text file
Summary: gedit crash trying to open a simple text file
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gedit
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-11 05:17 UTC by Elijah Newren
Modified: 2019-11-27 20:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-27 20:11:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Elijah Newren 2018-12-11 05:17:07 UTC
Description of problem:
gedit crashes when trying to open my daughter's journal file

Version-Release number of selected component (if applicable):
gedit-3.30.2-1.fc29.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Start gedit
2. Click "Open"
3. Choose first file from among recent edits (OR use the file attached to https://gitlab.gnome.org/GNOME/gedit/issues/91, which also triggers the bug)

Actual results:
Gedit core dumps


Expected results:
Gedit opens the file and allows editing it.


Additional info:
Filed upstream at https://gitlab.gnome.org/GNOME/gedit/issues/91, but the fact that the gedit maintainer was unable to reproduce makes me wonder if there is something specific about Fedora (or the Wayland version?) that makes it better to report against Fedora.  Stacktrace reported there:

 (gdb) thread apply all bt

Thread 10 (Thread 0x7fffc37fe700 (LWP 23937)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff6e4411e in g_cond_wait_until (cond=cond@entry=0x555555582f78, mutex=mutex@entry=0x555555582f70, 
    end_time=end_time@entry=690926470554) at gthread-posix.c:1449
#2  0x00007ffff6dce231 in g_async_queue_pop_intern_unlocked (queue=0x555555582f70, wait=wait@entry=1, 
    end_time=690926470554) at gasyncqueue.c:422
#3  0x00007ffff6dce8a1 in g_async_queue_timeout_pop_unlocked (queue=<optimized out>, timeout=timeout@entry=500000)
    at gasyncqueue.c:574
#4  0x00007ffff6e25fd2 in g_thread_pool_wait_for_new_task (pool=<optimized out>) at gthreadpool.c:262
#5  g_thread_pool_thread_proxy (data=<optimized out>) at gthreadpool.c:296
#6  0x00007ffff6e2548a in g_thread_proxy (data=0x5555561a8320) at gthread.c:784
#7  0x00007ffff6d9458e in start_thread (arg=<optimized out>) at pthread_create.c:486
#8  0x00007ffff6cc36a3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7fffe2ffd700 (LWP 23932)):
#0  0x00007ffff6cb8421 in __GI___poll (fds=0x5555555bc9c0, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6dfc5a6 in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x5555555bc9c0, 
    timeout=<optimized out>, context=0x5555555bca90) at gmain.c:4221
#2  g_main_context_iterate (context=context@entry=0x5555555bca90, block=block@entry=1, dispatch=dispatch@entry=1, 
    self=<optimized out>) at gmain.c:3915
#3  0x00007ffff6dfc6d0 in g_main_context_iteration (context=context@entry=0x5555555bca90, 
--Type <RET> for more, q to quit, c to continue without paging--c
    may_block=may_block@entry=1) at gmain.c:3981
#4  0x00007ffff7edcc7d in dconf_gdbus_worker_thread (user_data=0x5555555bca90) at ../gdbus/dconf-gdbus-thread.c:82
#5  0x00007ffff6e2548a in g_thread_proxy (data=0x7fffdc0054a0) at gthread.c:784
#6  0x00007ffff6d9458e in start_thread (arg=<optimized out>) at pthread_create.c:486
#7  0x00007ffff6cc36a3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fffe3fff700 (LWP 23930)):
#0  0x00007ffff6cb8421 in __GI___poll (fds=0x55555559bb00, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6dfc5a6 in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x55555559bb00, timeout=<optimized out>, context=0x555555599ec0) at gmain.c:4221
#2  g_main_context_iterate (context=0x555555599ec0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3915
#3  0x00007ffff6dfc962 in g_main_loop_run (loop=0x55555559a000) at gmain.c:4116
#4  0x00007ffff717379a in gdbus_shared_thread_func (user_data=0x555555599e90) at gdbusprivate.c:275
#5  0x00007ffff6e2548a in g_thread_proxy (data=0x55555558a4a0) at gthread.c:784
#6  0x00007ffff6d9458e in start_thread (arg=<optimized out>) at pthread_create.c:486
#7  0x00007ffff6cc36a3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fffe8f95700 (LWP 23929)):
#0  0x00007ffff6cb8421 in __GI___poll (fds=0x55555558a370, nfds=2, timeout=4837) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6dfc5a6 in g_main_context_poll (priority=<optimized out>, n_fds=2, fds=0x55555558a370, timeout=<optimized out>, context=0x55555558a230) at gmain.c:4221
#2  g_main_context_iterate (context=context@entry=0x55555558a230, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3915
#3  0x00007ffff6dfc6d0 in g_main_context_iteration (context=0x55555558a230, may_block=may_block@entry=1) at gmain.c:3981
#4  0x00007ffff6dfc721 in glib_worker_main (data=<optimized out>) at gmain.c:5861
#5  0x00007ffff6e2548a in g_thread_proxy (data=0x55555558a400) at gthread.c:784
#6  0x00007ffff6d9458e in start_thread (arg=<optimized out>) at pthread_create.c:486
#7  0x00007ffff6cc36a3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7ffff5f40a80 (LWP 23919)):
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff6be8895 in __GI_abort () at abort.c:79
#2  0x00007ffff697e7a5 in wl_abort (fmt=fmt@entry=0x7ffff697f24f "Error sending request: %s\n") at src/wayland-util.c:417
#3  0x00007ffff697a4dd in wl_proxy_marshal_array_constructor_versioned (proxy=proxy@entry=0x55555634c450, opcode=opcode@entry=3, args=args@entry=0x7fffffffc5a0, interface=interface@entry=0x0, version=1) at src/wayland-client.c:747
#4  0x00007ffff697a53d in wl_proxy_marshal_array_constructor (proxy=proxy@entry=0x55555634c450, opcode=opcode@entry=3, args=args@entry=0x7fffffffc5a0, interface=interface@entry=0x0) at src/wayland-client.c:687
#5  0x00007ffff697a630 in wl_proxy_marshal (proxy=0x55555634c450, opcode=opcode@entry=3) at src/wayland-client.c:784
#6  0x00007ffff7936c3f in zwp_text_input_v3_set_surrounding_text (anchor=4090, cursor=4090, text=<optimized out>, zwp_text_input_v3=<optimized out>) at text-input-unstable-v3-client-protocol.h:639
#7  notify_surrounding_text (context=0x555555c83930) at imwayland.c:352
#8  gtk_im_context_wayland_set_surrounding (context=0x555555c83930, text=0x55555630a030 "It is fast Sunday. I fasted. I did some random thingies before church. We went to church. Before sacrament meeting, Isabela gave me a Thank You card (I sent her a birthday card for her birthday). It h"..., len=<optimized out>, cursor_index=4090) at imwayland.c:713
#9  0x00007ffff7876bbc in gtk_text_view_retrieve_surrounding_handler (context=context@entry=0x555555c3e2a0, text_view=<optimized out>) at gtktextview.c:9181
#10 0x00007ffff792e206 in _gtk_marshal_BOOLEAN__VOID (closure=0x555555c44ac0, return_value=0x7fffffffc9b0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at gtkmarshalers.c:1901
#11 0x00007ffff6edfc9d in g_closure_invoke (closure=0x555555c44ac0, return_value=0x7fffffffc9b0, n_param_values=1, param_values=0x7fffffffca10, invocation_hint=0x7fffffffc990) at gclosure.c:810
#12 0x00007ffff6ef3203 in signal_emit_unlocked_R (node=node@entry=0x555555738c70, detail=detail@entry=0, instance=instance@entry=0x555555c3e2a0, emission_return=emission_return@entry=0x7fffffffcb20, instance_and_params=instance_and_params@entry=0x7fffffffca10) at gsignal.c:3635
#13 0x00007ffff6efb9a3 in g_signal_emit_valist (instance=instance@entry=0x555555c3e2a0, signal_id=signal_id@entry=297, detail=detail@entry=0, var_args=var_args@entry=0x7fffffffcc18) at gsignal.c:3401
#14 0x00007ffff6efce04 in g_signal_emit_by_name (instance=0x555555c3e2a0, detailed_signal=detailed_signal@entry=0x7ffff7964890 "retrieve-surrounding") at gsignal.c:3487
#15 0x00007ffff77765dc in gtk_im_multicontext_retrieve_surrounding_cb (slave=slave@entry=0x555555c83930, multicontext=<optimized out>) at gtkimmulticontext.c:532
#16 0x00007ffff792e206 in _gtk_marshal_BOOLEAN__VOID (closure=0x55555619fd70, return_value=0x7fffffffcf00, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at gtkmarshalers.c:1901
#17 0x00007ffff6edfc9d in g_closure_invoke (closure=0x55555619fd70, return_value=0x7fffffffcf00, n_param_values=1, param_values=0x7fffffffcf60, invocation_hint=0x7fffffffcee0) at gclosure.c:810
#18 0x00007ffff6ef3203 in signal_emit_unlocked_R (node=node@entry=0x555555738c70, detail=detail@entry=0, instance=instance@entry=0x555555c83930, emission_return=emission_return@entry=0x7fffffffd070, instance_and_params=instance_and_params@entry=0x7fffffffcf60) at gsignal.c:3635
#19 0x00007ffff6efb9a3 in g_signal_emit_valist (instance=instance@entry=0x555555c83930, signal_id=signal_id@entry=297, detail=detail@entry=0, var_args=var_args@entry=0x7fffffffd168) at gsignal.c:3401
#20 0x00007ffff6efce04 in g_signal_emit_by_name (instance=0x555555c83930, detailed_signal=detailed_signal@entry=0x7ffff7964890 "retrieve-surrounding") at gsignal.c:3487
#21 0x00007ffff7937510 in gtk_im_context_wayland_focus_in (context=0x555555c83930) at imwayland.c:638
#22 0x00007ffff788252c in gtk_text_view_set_editable (text_view=0x555555c48530, setting=1) at gtktextview.c:2975
#23 0x00007ffff7f3dac3 in set_view_properties_according_to_state (state=GEDIT_TAB_STATE_NORMAL, tab=0x555555577f10) at gedit/gedit-tab.c:507
#24 gedit_tab_set_state (tab=0x555555577f10, state=GEDIT_TAB_STATE_NORMAL) at gedit/gedit-tab.c:532
#25 0x00007ffff7f3f082 in load_cb (loader=0x55555637fae0, result=0x7fffd80140d0, loading_task=0x55555559c360) at gedit/gedit-tab.c:1972
#26 0x00007ffff7131f74 in g_task_return_now (task=0x7fffd80140d0) at gtask.c:1148
#27 0x00007ffff71328d6 in g_task_return (task=0x7fffd80140d0, type=<optimized out>) at gtask.c:1206
#28 0x00007ffff7ce31ca in close_input_stream_cb (source_object=<optimized out>, result=0x7fffdc004690, user_data=<optimized out>) at gtksourcefileloader.c:521
#29 0x00007ffff71074e5 in async_ready_close_callback_wrapper (source_object=0x7fffd4029b90, res=0x7fffdc004690, user_data=0x7fffd80140d0) at ginputstream.c:546
#30 0x00007ffff7131f74 in g_task_return_now (task=0x7fffdc004690) at gtask.c:1148
#31 0x00007ffff7131fad in complete_in_idle_cb (task=task@entry=0x7fffdc004690) at gtask.c:1162
#32 0x00007ffff6df8b7b in g_idle_dispatch (source=0x7fffbc0013f0, callback=0x7ffff7131fa0 <complete_in_idle_cb>, user_data=0x7fffdc004690) at gmain.c:5620
#33 0x00007ffff6dfc26d in g_main_dispatch (context=0x555555581720) at gmain.c:3182
#34 g_main_context_dispatch (context=context@entry=0x555555581720) at gmain.c:3847
#35 0x00007ffff6dfc638 in g_main_context_iterate (context=context@entry=0x555555581720, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3920
#36 0x00007ffff6dfc6d0 in g_main_context_iteration (context=context@entry=0x555555581720, may_block=may_block@entry=1) at gmain.c:3981
#37 0x00007ffff7146465 in g_application_run (application=0x5555555771e0, argc=<optimized out>, argv=0x7fffffffd6c8) at gapplication.c:2470
#38 0x000055555555530e in main (argc=1, argv=0x7fffffffd6c8) at gedit/gedit.c:146

Comment 1 Elijah Newren 2018-12-11 05:31:59 UTC
The file in question had three lines, the first a normal length, the second line was blank, and the third line was over 4000 characters long.  Adding a newline in the middle of that really long line allowed gedit to open the file.

Comment 2 Elijah Newren 2018-12-27 08:23:53 UTC
Update: My daughter recently started using LibreOffice for her journal entries.  And still hasn't learned to put line or paragraph breaks in her text.  With LibreOffice she again created a journal entry that would consistently cause it to hang.  I had to use 'unoconv --format=txt journal-file.odt', load it up in emacs, split her >4K characters into multiple paragraphs, then create a new Office document and copy and paste back to get it working for her again.

So, two completely separate programs that hang when there are more than around 4K characters on a single line makes me really suspect some lower-level library.  Since Libre-Office wasn't crashing but was just hanging, and I didn't want to try to dig up all the necessary debug rpms, I didn't grab a stack trace of it.  Just noting this item of interest for anyone else trying to reproduce this bug.

Comment 3 Reverend Homer 2018-12-27 08:41:06 UTC
(In reply to Elijah Newren from comment #2)
> Update: My daughter recently started using LibreOffice for her journal
> entries.  And still hasn't learned to put line or paragraph breaks in her
> text.  With LibreOffice she again created a journal entry that would
> consistently cause it to hang.  I had to use 'unoconv --format=txt
> journal-file.odt', load it up in emacs, split her >4K characters into
> multiple paragraphs, then create a new Office document and copy and paste
> back to get it working for her again.
> 
> So, two completely separate programs that hang when there are more than
> around 4K characters on a single line makes me really suspect some
> lower-level library.  Since Libre-Office wasn't crashing but was just
> hanging, and I didn't want to try to dig up all the necessary debug rpms, I
> didn't grab a stack trace of it.  Just noting this item of interest for
> anyone else trying to reproduce this bug.

According to the upstream issue (https://gitlab.gnome.org/GNOME/gedit/issues/91#note_384272), there's a bug in Gtk input method under wayland. I think that should be reported to… err… what project?

Comment 4 Ben Cotton 2019-10-31 20:15:31 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2019-11-27 20:11:03 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.