After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773808 - Export Report Crash
Export Report Crash
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Reports
2.6.14
Other Mac OS
: Normal critical
: ---
Assigned To: gnucash-reports-maint
gnucash-reports-maint
Depends on:
Blocks:
 
 
Reported: 2016-11-02 06:46 UTC by David
Modified: 2018-06-29 23:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Crash Report (62.92 KB, text/plain)
2016-11-02 06:47 UTC, David
Details

Description David 2016-11-02 06:46:39 UTC
It is possible to cause GnuCash to crash when exporting a report to HTML. The steps to reproduce are as follows:

1) From an active report, click the Export button
2) In the resulting dialog, click on an existing file in the folder listing.
3) Press the Right arrow key.
4) Click in the Name text box [and add a character to the proposed name].
5) Click the Export button.

This causes the program to crash. 

As a little background, I was hoping to save a new copy of a pre-existing report, so I took steps 1-2. Wanting to rename the report, I pressed the right arrow key. Since step 2 resulted in the file name being placed in the Name text box with highlighting, I expected the Right arrow to move the cursor to the end of the highlighted name and allow me to add new characters to the name. This is, I believe, the standard behavior under the circumstances.

Instead, GnuCash clears out the folder specification and replaces it with a search box. This search box remains in effect when the user clicks on the name box in step four. Meanwhile, the user changes the name and clicks the export button, with the resulting crash.

A couple of points here: 

1) Invoking a search box from the arrow key is not expected--especially when user action clearly highlight the text control (the file name). Input should affect the highlighted control, resulting in the cursor moving.
2) The file location should not be cleared when a folder search is invoked; rather, the previous folder should remain defined until the user actively selects a new destination folder.
3) The Export button should be deactivated if any required data element is not correctly supplied (as in the example of the null folder).
Comment 1 David 2016-11-02 06:47:46 UTC
Created attachment 338930 [details]
Crash Report

This is the crash report, if it helps.
Comment 2 John Ralls 2016-12-11 17:58:20 UTC
I'm not able to replicate your experience. When I click in the name box for step 4 the highlighting is removed and the text cursor is placed where my mouse cursor was, and any text gets entered there. 

With focus in the listview, the up/down arrow keys move the file selection and the right/left arrow keys switch focus between the file list and the favorites list. Typing with focus in either location causes the typed string to replace the highlighted part of the Name text-entry contents. Clicking the Export button with an empty Name text-entry puts up a warning message below the text-entry (over the breadcrumbs) and doesn't dismiss the dialog.

That said, you did somehow manage to get the GtkFileChooserDialog to return a NULL filename and that caused a crash, which is easy to fix, so I have.
Comment 3 John Ralls 2018-06-29 23:51:51 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=773808. Please update any external references or bookmarks.