Bug 344495 - Crash upon importing search results with no database open
Summary: Crash upon importing search results with no database open
Status: RESOLVED FIXED
Alias: None
Product: KBibTeX
Classification: Applications
Component: Network/online search (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Thomas Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-23 18:00 UTC by Arseniy Lartsev
Modified: 2015-03-07 15:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Suggested fix (535 bytes, patch)
2015-02-23 18:00 UTC, Arseniy Lartsev
Details
The same patch against 0.5.1 (526 bytes, patch)
2015-02-23 18:43 UTC, Arseniy Lartsev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arseniy Lartsev 2015-02-23 18:00:54 UTC
Created attachment 91249 [details]
Suggested fix

A great program, by the way! But I've stumbled upon this little bug here. I'd like to point out that after encountering this crash, I first though that it made the program completely unusable for me. I know that it's not actually the case, but that was my first impression, and it's very important that the program doesn't make that kind first impression on the users.

SearchResultsPrivate::mainEditor is initialized with some garbage upon startup when no database is open. As a result, SearchResults::updateGUI doesn't disable the import button because this garbage isn't NULL. Clicking this import button then leads to a crash.
Comment 1 Arseniy Lartsev 2015-02-23 18:13:24 UTC
One more thing that came to my mind was https://bugs.kde.org/show_bug.cgi?id=344497
Comment 2 Arseniy Lartsev 2015-02-23 18:43:27 UTC
Created attachment 91252 [details]
The same patch against 0.5.1
Comment 3 Thomas Fischer 2015-03-07 15:08:31 UTC
Git commit 853796f9fc0312dac92169dda6dac022473c8442 by Thomas Fischer.
Committed on 07/03/2015 at 15:01.
Pushed by thomasfischer into branch 'kbibtex/0.5'.

Uninitialized variable causes crash -- fixed

As reported by Arseniy Lartsev, there was an uninitialized
variable in SearchResultsPrivate's constructor.
Due to being uninitialized, KBibTeX could be crashed by
clicking on the Import button if no search had been conducted
earlier.

Patch 91252 by A.L. has been applied with minor modifications.
Thanks!

M  +1    -1    src/program/docklets/searchresults.cpp

http://commits.kde.org/kbibtex/853796f9fc0312dac92169dda6dac022473c8442