Bug 280117 - Crash on importing investment via CSV plugin
Summary: Crash on importing investment via CSV plugin
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 11:13 UTC by allan
Modified: 2011-08-16 11:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description allan 2011-08-15 11:13:21 UTC
Version:           SVN trunk (using KDE 4.6.2) 
OS:                Linux

While testing an unreleased version of the CSV plugin, a crash occurred during import of an investment file. The crash occurred when selecting a column for the memo field.
The cause was an uninitialised variable.
The same problem exists in the current version of the plugin.

Reproducible: Always

Steps to Reproduce:
1) Select File/Import/CSV...
2) Select Investment tab.
3) Open an investment csv file.
4) Select appropriate delimiter.
5) Select a column for one of the fields.
6) Select the same column number for the memo field.
7) Click 'OK' to the warning that a conflicting selection has been made.
8) Crash occurs.


Actual Results:  
Crash occurs.

Expected Results:  
No crash occurs.
Both fields should be cleared allowing correct selections to be made.


Discovered in my development sandbox, but also present in svn 1245521, and in the new stable release.

Not sure how I would apply the one-line fix to the stable version?
Comment 1 Thomas Baumgart 2011-08-15 14:46:11 UTC
Check the changes in into trunk as usual.

Checkout a separate sandbox based on the branches directory in KDE instead of trunk and duplicate the fix and check it in there or ask Cristian to backport it for you.
Comment 2 allan 2011-08-15 22:15:48 UTC
SVN commit 1247434 by allananderson:

BUG: 280117

While testing an unreleased version of the CSV plugin, a crash occurred during import of an investment file. The crash occurred when selecting a column for the memo field, when that column had already been allocated.

The cause was an uninitialised variable.  

The same problem exists in the stable version of the plugin.

 M  +1 -0      investprocessing.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1247434
Comment 3 Cristian Oneț 2011-08-16 09:56:58 UTC
Will you backport this to the stable branch or should it do it?
Comment 4 allan 2011-08-16 10:10:53 UTC
On Tue, 16 Aug 2011 09:56:59 +0000
Cristian Onet <onet.cristian@gmail.com> wrote:

> https://bugs.kde.org/show_bug.cgi?id=280117
> 
> 
> 
> 
> 
> --- Comment #3 from Cristian Onet <onet cristian gmail com>
> 2011-08-16 09:56:58 --- Will you backport this to the stable branch
> or should it do it?
> 

Hi

I was right about to contact you on this.  Thomas suggested I ask you to
do it, but I'd be happy to, if I knew how.

Allan
Comment 5 Cristian Oneț 2011-08-16 10:20:36 UTC
You need to follow these steps to create a sandbox that corresponds to the stable branch of kmymoney:
svn co svn+ssh://allananderson@svn.kde.org/home/kde/branches/stable/extragear-kde4/office/kmymoney kmymoney-stable
cd kmymoney-stable
svn merge -r 1247433:1247434 svn+ssh://allananderson@svn.kde.org/home/kde/trunk/extragear/office/kmymoney .
svn diff <- check that your change was actually merged 
svn commit

You may keep the 'kmymoney-stable' sandbox for later bugfixes of the stable version.
Comment 6 Cristian Oneț 2011-08-16 10:22:40 UTC
Re-posting the steps quoted this time.

1. "svn co svn+ssh://allananderson@svn.kde.org/home/kde/branches/stable/extragear-kde4/office/kmymoney kmymoney-stable"
2. "cd kmymoney-stable"
3. "svn merge -r 1247433:1247434 svn+ssh://allananderson@svn.kde.org/home/kde/trunk/extragear/office/kmymoney ."
4. "svn diff" <- check that your change was actually merged 
5. "svn commit"
Comment 7 Cristian Oneț 2011-08-16 10:55:51 UTC
You can fix the formatting and commit it with SVN_SILENT. Was this done by svn merge?
Comment 8 allan 2011-08-16 11:11:02 UTC
(In reply to comment #7)
> You can fix the formatting and commit it with SVN_SILENT. Was this done by svn
> merge?

I'll fix the formatting in my new sandbox, but how is SVN_SILENT used?

I did the merge exactly as you wrote, but must admit the formatting must have bee bad originally, as I noticed it when doing the original commit, but took it be just the diff format.
Comment 9 Cristian Oneț 2011-08-16 11:18:50 UTC
http://techbase.kde.org/Policies/SVN_Commit_Policy#Special_keywords_in_SVN_log_messages

SVN_SILENT is just a marker that nothing special has happened in that commit (whitespace change). Please fix the formatting also in trunk.