Bug 329677

Summary: import external collection csv loop forever
Product: [Applications] tellico Reporter: Sylvain Viart <sylvain2012>
Component: generalAssignee: Robby Stephenson <robby>
Status: RESOLVED FIXED    
Severity: normal CC: pmra, Serag4000
Priority: NOR    
Version: 2.3.8   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: example of exported csv from tellico
gdb backtrace log
liste_livres_Export_tellico2.csv used with gdb backtrace

Description Sylvain Viart 2014-01-07 08:08:23 UTC
Trying to import via csv I made a small  example with this kind of data:

"carton";"auteur";"titre";"qui";"nombre";"commentaire"
;;;;;
31;"M.H.Clark";"La clinique du docteur H";"vendu";;
31;"M.H.Clark";"La nuit s'éveille";"vendu";;
31;"M.H.Clark";"Le roman de George et Martha";"vendu";;
31;"M.H.Clark";"Le billet gagnant";"vendu";;

Note that I didn't know if there's an expected input format and tryed a free one.
Also leaving empty lines…


The application in jamed on importing step.

csv file generated form libreoffice calc, 203 lines long

Reproducible: Always

Steps to Reproduce:
1. create a book collection
2. import this kind of csv input
Actual Results:  
looping forever with message about importing data…
But nothing happend.

Expected Results:  
I was expecting a matching field wizzard to popup or some associating field step. Or at least a warning or an error message.

A cancel button to reclaim the application control.

started form terminal, no additional information.

Hum, also doesn't seem to work with an exported reimported, one line, csv…
Comment 1 Sylvain Viart 2014-01-07 08:10:07 UTC
Created attachment 84490 [details]
example of exported csv from tellico
Comment 2 Robby Stephenson 2014-01-14 04:14:19 UTC
I had another report of the CSV import hanging. So far, I haven't been able to reproduce it so there's something still I'm missing, either in the compiling or some little detail that makes my system different from yours. Your attached file imports without problem for me...

Any change you could get a debug trace from the hang?
Comment 3 Sylvain Viart 2014-01-14 06:37:53 UTC
>> Any change you could get a debug trace from the hang?

Sure, ask any complement you need. (version, kernel, distrib, python, etc.)

Could you drive me on getting this debug trace?

I'm also be able to produce a coredump.  I can also attach the 203 lines csv I mention, but it hangs with the exported one…
Comment 4 Robby Stephenson 2014-01-15 04:15:54 UTC
(In reply to comment #3)
> >> Any change you could get a debug trace from the hang?
> 
> Sure, ask any complement you need. (version, kernel, distrib, python, etc.)

Which Ubuntu version are you running?  And you have Tellico 2.3.8, correct?

> Could you drive me on getting this debug trace?

This is a ubuntu guide. https://wiki.ubuntu.com/Backtrace
You'll likely need to install a bunch of additional packages.
Comment 5 Robby Stephenson 2014-01-15 04:17:13 UTC
(In reply to comment #3)
> I'm also be able to produce a coredump.

Also attach the coredump, if you don't mind, after you install the debug packages...
Comment 6 Sylvain Viart 2014-01-16 13:05:45 UTC
lsb_release -rd
Description:	Ubuntu 13.10
Release:	13.10

file /usr/bin/tellico
/usr/bin/tellico: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xe9330f2a71fc1b3219542875d1c10bea0df03733, stripped

apt-cache policy tellico
tellico:
  Installé : 2.3.8+dfsg.1-2
  Candidat : 2.3.8+dfsg.1-2
 Table de version :
 *** 2.3.8+dfsg.1-2 0
        500 http://fr.archive.ubuntu.com/ubuntu/ saucy/universe i386 Packages
        100 /var/lib/dpkg/status

I've followed the backtrace procedure, see attached gdb output. 
Obtained by ctrl-c during forever loop.
With the oneline imported csv file. I also reattach this file.

Hope that helps.
Comment 7 Sylvain Viart 2014-01-16 13:07:34 UTC
Created attachment 84664 [details]
gdb backtrace log
Comment 8 Sylvain Viart 2014-01-16 13:13:30 UTC
Created attachment 84666 [details]
liste_livres_Export_tellico2.csv used with gdb backtrace

A two line of data (3 with header), modified csv file exported from tellico.
Comment 9 Sylvain Viart 2014-01-16 13:42:45 UTC
cordump too big hosted here:

http://molo.bee.free.fr/tellico.core.gz

same test:
importing
ctrl-c
(gdb) gcore tmp/tellico.core
Saved corefile tmp/tellico.core
Comment 10 Albert Astals Cid 2014-04-17 21:04:29 UTC
Git commit 4ae3308a8295a99c03f37430f5a181adc92eef24 by Albert Astals Cid.
Committed on 17/04/2014 at 21:03.
Pushed by aacid into branch 'master'.

Fix wrong usage of QTextStream in csv parser

REVIEW: 117605
Acked by Robby

M  +3    -1    src/translators/csvparser.cpp

http://commits.kde.org/tellico/4ae3308a8295a99c03f37430f5a181adc92eef24
Comment 11 Robby Stephenson 2014-04-18 03:42:46 UTC
Git commit f5249c72c153b99f1a6ef096c706a9b41acb1e89 by Robby Stephenson, on behalf of Albert Astals Cid.
Committed on 17/04/2014 at 21:03.
Pushed by rstephenson into branch '2.3'.

Fix wrong usage of QTextStream in csv parser

REVIEW: 117605
Acked by Robby

M  +3    -1    src/translators/csvparser.cpp

http://commits.kde.org/tellico/f5249c72c153b99f1a6ef096c706a9b41acb1e89
Comment 12 Robby Stephenson 2014-05-28 19:00:13 UTC
*** Bug 335454 has been marked as a duplicate of this bug. ***
Comment 13 Robby Stephenson 2014-07-25 00:34:15 UTC
*** Bug 337754 has been marked as a duplicate of this bug. ***