Bug 407803 - Error on startup
Summary: Error on startup
Status: RESOLVED WORKSFORME
Alias: None
Product: kphotoalbum
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-21 16:08 UTC by Rupert
Modified: 2022-09-05 22:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Error Popup at start of kphotoalbum (15.20 KB, image/png)
2019-05-21 16:08 UTC, Rupert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rupert 2019-05-21 16:08:46 UTC
Created attachment 120224 [details]
Error Popup at start of kphotoalbum

SUMMARY

After reinstalling kphotoalbum on my desktop system i get the following message

Es ist ein Fehler in Zeile 4090, Spalte 82 aufgetreten:Fehler beim Lesen des nächsten Elements

And it exits. (There are files of an older installation on the system.)

I did not get any result, when searching for this message with a search engine.




ADDITIONAL INFORMATION
Comment 1 Johannes Zarl-Zierl 2019-05-22 06:45:56 UTC
Hi Rupert,

Can you tell me the version of KPhotoAlbum that you are using?

Also, can you check your index.XML file and inspect line 4000 for any obvious problems?

  Johannes

Am 21. Mai 2019 18:08:46 MESZ schrieb Rupert <bugzilla_noreply@kde.org>:
>https://bugs.kde.org/show_bug.cgi?id=407803
>
>            Bug ID: 407803
>           Summary: Error on startup
>           Product: kphotoalbum
>           Version: unspecified
>          Platform: Kubuntu Packages
>                OS: Linux
>            Status: REPORTED
>          Severity: normal
>          Priority: NOR
>         Component: general
>          Assignee: kpabugs@willden.org
>          Reporter: rupert@dl3no.de
>  Target Milestone: ---
>
>Created attachment 120224 [details]
>  --> https://bugs.kde.org/attachment.cgi?id=120224&action=edit
>Error Popup at start of kphotoalbum
>
>SUMMARY
>
>After reinstalling kphotoalbum on my desktop system i get the following
>message
>
>Es ist ein Fehler in Zeile 4090, Spalte 82 aufgetreten:Fehler beim
>Lesen des
>nächsten Elements
>
>And it exits. (There are files of an older installation on the system.)
>
>I did not get any result, when searching for this message with a search
>engine.
>
>
>
>
>ADDITIONAL INFORMATION
Comment 2 Rupert 2019-05-22 09:01:02 UTC
Version 5.3.1 aus Repository Bionic Beaver.
Comment 3 Rupert 2019-05-22 09:09:20 UTC
Zeile 3999 bis 4008:

        <image file="Boys/Patong003.jpg" label="Patong003" startDate="2009-01-01T09:30:30" endDate="2009-01-01T09:30:30" angle="0" md5sum="9e543b83206dcbcb5146af625dc1f8b1" width="426" height="676">
            <options>
                <option name="Media Type">
                    <value value="Image"/>
                </option>
                <option name="Schlüsselbegriffe">
                    <value value="Boys"/>
                </option>
            </options>
        </image>
Comment 4 Tobias Leupold 2019-05-22 12:08:56 UTC
No harm meant, but if we're talking about an XML problem that occurs on line 4090, column 82, lines 3999 to 4008 won't help very much ;-)
Comment 5 Rupert 2019-05-22 13:56:03 UTC
Sorry :-(

4090 - 4106:

<image file="Boys/007_Lai_Thai.jpg" label="007_Lai_Thai" description="�|��" startDate="2009-01-01T09:30:36" endDate="2009-01-01T09:30:36" angle="0" md5sum="5929e59abcfc0ea9a3ba164c9c8ad216" width="426" height="600">
            <options>
                <option name="Leute">
                    <value value="Nek"/>
                </option>
                <option name="Media Type">
                    <value value="Image"/>
                </option>
                <option name="Orte">
                    <value value="Thailand"/>
                    <value value="Chiang Mai"/>
                </option>
                <option name="Schlüsselbegriffe">
                    <value value="Boys"/>
                </option>
            </options>
        </image>
Comment 6 Tobias Leupold 2019-05-22 17:56:44 UTC
No problem ;-)

Seems like the description is the problem. Here, we have the Unicode replacement character, which shows up because somehow, some invalid character data made it to the XML file. Column 82 should be the second quote of the description. I would try to remove it (open it with a text editor, mark from quotation mark to quotation mark, remove it and re-add two quotes, so that we end up with: description=""). Of course, be sure to have a backup! That should fix the startup error for now.

Would you be so kind to try that? Thanks in advance :-)

The other question is how this could ever happen if I'm right ...
Comment 7 Johannes Zarl-Zierl 2019-05-22 20:34:40 UTC
Thanks for the info (and sorry for requesting the wrong line number). I assume the workaround lets you start kphotoalbum again?

Can you, by any chance, tell us the  characters that caused the error?
It seems that bugzilla mangled them beyond recognition. So my guess would be either you found some unsupported unicode character, or the description text was in a non-utf8 encoding and kphotoalbum couldn't handle that.
Comment 8 Rupert 2019-05-23 05:48:23 UTC
Thanks for your hint and help. After editing about 30 descriptions and one option (without quotes) kphotoalbum lastly started up and after building up the thumbs and 300 background jobs it was usable again.

I made a diff on the index.xml and will try to investigate further on. Most scrambling occured in 2009 and some in 2013.

With one long description I will try to find out whether that is a correct coding or just scrambled. But not today. 

Thanks agn.
Comment 9 Rupert 2019-05-24 13:04:12 UTC
Sorry, no success her.

Just another hint: The Popup say line and column of the error, but not the file. I thought it might be a source code error message. 

Anyway, thanks a lot.
Comment 10 Johannes Zarl-Zierl 2019-05-24 15:02:34 UTC
Git commit 1f916b58c48baf76cd7137d7529199bf3304b328 by Johannes Zarl-Zierl.
Committed on 24/05/2019 at 14:59.
Pushed by johanneszarl into branch 'master'.

Display database file name in XmlReader error messages.

Without a file name, the location of the error inside the file may not
be of much use to users.

M  +2    -1    ImportExport/ImportDialog.cpp
M  +1    -1    XMLDB/FileReader.cpp
M  +3    -2    XMLDB/XmlReader.cpp
M  +7    -1    XMLDB/XmlReader.h

https://commits.kde.org/kphotoalbum/1f916b58c48baf76cd7137d7529199bf3304b328
Comment 11 Johannes Zarl-Zierl 2022-09-05 22:11:03 UTC
I'm closing this bug because there hasn't been any activity on this problem for a while now. If you encounter the problem again, please feel free to reopen!