Bug 2291412

Summary: Apostrophe crashes, likely when attempting spell checking
Product: [Fedora] Fedora Reporter: voidanix <voidanix>
Component: apostropheAssignee: Artem <ego.cordatus>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: ego.cordatus
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-07-04 09:43:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
post-crash coredumpctl info none

Description voidanix 2024-06-11 22:44:40 UTC
The issue is likely caused by Apostrophe requiring a patched libspelling and gtksourceview (https://gitlab.gnome.org/World/apostrophe/-/commit/ebce8cbfc711986ca61d5b0f0c998acee77e2982).

Rawhide does not patch these packages as it is against Fedora policy (https://bodhi.fedoraproject.org/updates/FEDORA-2024-84fc5db100#comment-3519202), yet the package is being shipped in the repos.

Fedora 40 is currently missing this package for this very reason (https://bugzilla.redhat.com/show_bug.cgi?id=2290496).

Reproducible: Always

Steps to Reproduce:
1. Copy/paste a Lorem Ipsum
2. Go to the first character of the paragraph
3. Press enter to try to bring the entire paragraph down by one line
Actual Results:  
Apostrophe crashes with the following message:

```
apostrophe:441827): Gtk-CRITICAL **: 00:28:14.436: gtk_accessible_text_get_contents: assertion 'end >= start' failed
**
ERROR:../lib/spelling-text-buffer-adapter.c:699:spelling_text_buffer_adapter_after_insert_text: assertion failed: (offset >= length)
Bail out! ERROR:../lib/spelling-text-buffer-adapter.c:699:spelling_text_buffer_adapter_after_insert_text: assertion failed: (offset >= length)
zsh: IOT instruction (core dumped)  apostrophe
```

Expected Results:  
Apostrophe keeps running

The crashed application will remain visible forever and will have to be killed e.g. with a `killall apostrophe`.

Comment 1 voidanix 2024-06-11 22:48:42 UTC
Created attachment 2037031 [details]
post-crash coredumpctl info

Comment 2 Artem 2024-06-12 07:16:21 UTC
We can downgrade Apostrophe to old version for Rawhide or retire package entirely which would be more correct in this case. Also see: https://bugzilla.redhat.com/show_bug.cgi?id=2290496

Comment 3 voidanix 2024-06-13 21:48:20 UTC
+1 from me to remove the package from Rawhide: it should have not been there in the first place.

Once upstream is able to resolve its dependencies issues, it should come back without much of a fuss.