[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: Catastrophic failure in KSudoku
From:       Jeremy Whiting <jpwhiting () kde ! org>
Date:       2019-03-19 23:28:20
Message-ID: CADWV2K4XKxUzPc12FiSeJ3NHy8pc8D=o+EEGa8+8m6R+odOtaA () mail ! gmail ! com
[Download RAW message or body]

I'm currently using 5.11.3 from debian buster packages.

On Tue, Mar 19, 2019 at 3:23 PM Albert Astals Cid <aacid@kde.org> wrote:

> Hmm, which Qt are you using? There were some Qt verions where
> QTemporaryFile was a bit wonky (i remember i had to adjust Okular to work).
>
> I'm on Qt 5.12.2 now.
>
> Cheers,
>   Albert
>
> El dimarts, 19 de març de 2019, a les 17:43:37 CET, Jeremy Whiting va
> escriure:
> > Hey Ian,
> >
> > I'm not sure if this is the best fix for the problem. But here's a patch
> > that makes ksudoku not copy the xml file before loading it into
> > QDomDocument, just loads it where it is instead. This fixes the issue
> here,
> > but you probably have a reason for having the copyjob in there. Let me
> know
> > if I can test anything else etc.
> >
> > BR,
> > Jeremy
> >
> > On Tue, Mar 19, 2019 at 10:36 AM Jeremy Whiting <jpwhiting@kde.org>
> wrote:
> >
> > > I'm not sure why gmail's reply to all isn't putting you in Ian...
> Anyway,
> > > the cause is the QDomDocument::setContent from the QTemporaryFile
> after it
> > > copies the file out of the installation path (why is that needed by the
> > > way?) Adding some debugging to the call it seems the error is
> "Unexpected
> > > end of file" on line 1 column 1. I checked the file does exist and
> such, I
> > > wonder if the download copy job is leaving the QTemporaryFile object's
> seek
> > > point at the end of the file as it writes it or something. No, adding a
> > > tmpFile.reset() before setting the content does not help. It's as if
> the
> > > copy job finishes before the file is written to disk. I don't have any
> > > weird mount options (or any, since /tmp/ is just part of my / partition
> > > here). Not sure what's going on to cause QDomDocument::setContent to
> think
> > > the file is empty...
> > >
> > > On Mon, Mar 18, 2019 at 9:53 PM Ian Wadham <iandw.au@gmail.com> wrote:
> > >
> > >>
> > >>
> > >> > On 19 Mar 2019, at 2:24 pm, Jeremy Whiting <jpwhiting@kde.org>
> wrote:
> > >> >
> > >> > I'll see what I can figure out. no problem. Albert are you building
> > >> with kdesrc-build ? or manually? I'm using kdesrc-build buliding into
> > >> /usr/local. Until this morning libkdegames didn't build because I was
> > >> missing libsndfile, after adding that I'm seeing the same failure
> described
> > >> by Duncan in the bug. I'll debug it tomorrow and see what's causing
> it.
> > >>
> > >> The variants that fail are all those whose rules are defined by XML
> files
> > >> in ksudoku/src/shapes
> > >> — and only those variants. The failure point in KSudoku appears to be
> > >> exactly where it calls the
> > >> loadCustomShape method in the sudoku::Serializer code. See details in
> > >>     https://bugs.kde.org/show_bug.cgi?id=405422#c3
> > >>
> > >> My guess is that some newer version of XML parsing libraries dislikes
> > >> KSudoku's XML files or
> > >> possibly that some changed XML version or DOCTYPE has got into the
> act.
> > >>
> > >> Ian W.
> > >>
> > >> > BR,
> > >> > Jeremy
> > >> >
> > >> > On Mon, Mar 18, 2019 at 4:52 PM Albert Astals Cid <aacid@kde.org>
> > >> wrote:
> > >> > El dilluns, 18 de març de 2019, a les 20:44:06 CET, Jeremy Whiting
> va
> > >> escriure:
> > >> > > Yep, same thing happens here. Aztec -> Generate A Puzzle shows a
> > >> dialog box
> > >> > > that says "
> > >> > >
> > >> > > Unable to generate a puzzle of the chosen variant; please try
> > >> another."
> > >> > > with a build I just did.
> > >> >
> > >> > Weird, works just fine for me.
> > >> >
> > >> > Jeremy guess it's on you to debug it :/
> > >> >
> > >> > Cheers,
> > >> >   Albert
> > >> >
> > >> > >
> > >> > >
> > >> > > BR,
> > >> > >
> > >> > > Jeremy
> > >> > >
> > >> > > On Thu, Mar 14, 2019 at 9:24 PM Ian Wadham <iandw.au@gmail.com>
> > >> wrote:
> > >> > >
> > >> > > > It appears that KSudoku is failing catastrophically. Only the
> most
> > >> vanilla
> > >> > > > puzzle types can be selected
> > >> > > > (i.e.  Classic Sudoku nxn and Roxdoku nxnxn). All others fail to
> > >> create
> > >> > > > their data-structures from XML
> > >> > > > files and so fail to generate a puzzle and display it (e.g.
> XSudoku,
> > >> > > > Killer Sudoku, Aztec, Samurai
> > >> > > > and many more).
> > >> > > >
> > >> > > > For more details, please see
> > >> https://bugs.kde.org/show_bug.cgi?id=405422,
> > >> > > > especially comment #3.
> > >> > > >
> > >> > > > This was reported by Duncan, who builds KF5 and apps from
> live-git
> > >> and has
> > >> > > > just noticed the problem
> > >> > > > appearing in the last week or two --- more recently than any
> > >> changes in
> > >> > > > the KSudoku source.
> > >> > > >
> > >> > > > Please can someone who has access to builds and executables of
> the
> > >> latest
> > >> > > > development (HEAD)
> > >> > > > KSudoku code check if they can reproduce this error? You just
> need
> > >> to run
> > >> > > > KSudoku, select Aztec
> > >> > > > puzzle-type (for example) and click on "Generate A Puzzle".
> > >> > > >
> > >> > > > Thanks in advance,
> > >> > > > Ian Wadham.
> > >> > > >
> > >> > > >
> > >> > >
> > >> >
> > >> >
> > >> >
> > >> >
> > >>
> > >>
> >
>
>
>
>
>

[Attachment #3 (text/html)]

<div dir="ltr">I&#39;m currently using 5.11.3 from debian buster \
packages.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On \
Tue, Mar 19, 2019 at 3:23 PM Albert Astals Cid &lt;<a \
href="mailto:aacid@kde.org">aacid@kde.org</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">Hmm, which Qt are you using? There were some Qt \
verions where QTemporaryFile was a bit wonky (i remember i had to adjust Okular to \
work).<br> <br>
I&#39;m on Qt 5.12.2 now.<br>
<br>
Cheers,<br>
   Albert<br>
<br>
El dimarts, 19 de març de 2019, a les 17:43:37 CET, Jeremy Whiting va escriure:<br>
&gt; Hey Ian,<br>
&gt; <br>
&gt; I&#39;m not sure if this is the best fix for the problem. But here&#39;s a \
patch<br> &gt; that makes ksudoku not copy the xml file before loading it into<br>
&gt; QDomDocument, just loads it where it is instead. This fixes the issue here,<br>
&gt; but you probably have a reason for having the copyjob in there. Let me know<br>
&gt; if I can test anything else etc.<br>
&gt; <br>
&gt; BR,<br>
&gt; Jeremy<br>
&gt; <br>
&gt; On Tue, Mar 19, 2019 at 10:36 AM Jeremy Whiting &lt;<a \
href="mailto:jpwhiting@kde.org" target="_blank">jpwhiting@kde.org</a>&gt; wrote:<br> \
&gt; <br> &gt; &gt; I&#39;m not sure why gmail&#39;s reply to all isn&#39;t putting \
you in Ian... Anyway,<br> &gt; &gt; the cause is the QDomDocument::setContent from \
the QTemporaryFile after it<br> &gt; &gt; copies the file out of the installation \
path (why is that needed by the<br> &gt; &gt; way?) Adding some debugging to the call \
it seems the error is &quot;Unexpected<br> &gt; &gt; end of file&quot; on line 1 \
column 1. I checked the file does exist and such, I<br> &gt; &gt; wonder if the \
download copy job is leaving the QTemporaryFile object&#39;s seek<br> &gt; &gt; point \
at the end of the file as it writes it or something. No, adding a<br> &gt; &gt; \
tmpFile.reset() before setting the content does not help. It&#39;s as if the<br> &gt; \
&gt; copy job finishes before the file is written to disk. I don&#39;t have any<br> \
&gt; &gt; weird mount options (or any, since /tmp/ is just part of my / partition<br> \
&gt; &gt; here). Not sure what&#39;s going on to cause QDomDocument::setContent to \
think<br> &gt; &gt; the file is empty...<br>
&gt; &gt;<br>
&gt; &gt; On Mon, Mar 18, 2019 at 9:53 PM Ian Wadham &lt;<a \
href="mailto:iandw.au@gmail.com" target="_blank">iandw.au@gmail.com</a>&gt; \
wrote:<br> &gt; &gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt; On 19 Mar 2019, at 2:24 pm, Jeremy Whiting &lt;<a \
href="mailto:jpwhiting@kde.org" target="_blank">jpwhiting@kde.org</a>&gt; wrote:<br> \
&gt; &gt;&gt; &gt;<br> &gt; &gt;&gt; &gt; I&#39;ll see what I can figure out. no \
problem. Albert are you building<br> &gt; &gt;&gt; with kdesrc-build ? or manually? \
I&#39;m using kdesrc-build buliding into<br> &gt; &gt;&gt; /usr/local. Until this \
morning libkdegames didn&#39;t build because I was<br> &gt; &gt;&gt; missing \
libsndfile, after adding that I&#39;m seeing the same failure described<br> &gt; \
&gt;&gt; by Duncan in the bug. I&#39;ll debug it tomorrow and see what&#39;s causing \
it.<br> &gt; &gt;&gt;<br>
&gt; &gt;&gt; The variants that fail are all those whose rules are defined by XML \
files<br> &gt; &gt;&gt; in ksudoku/src/shapes<br>
&gt; &gt;&gt; — and only those variants. The failure point in KSudoku appears to \
be<br> &gt; &gt;&gt; exactly where it calls the<br>
&gt; &gt;&gt; loadCustomShape method in the sudoku::Serializer code. See details \
in<br> &gt; &gt;&gt;        <a href="https://bugs.kde.org/show_bug.cgi?id=405422#c3" \
rel="noreferrer" target="_blank">https://bugs.kde.org/show_bug.cgi?id=405422#c3</a><br>
 &gt; &gt;&gt;<br>
&gt; &gt;&gt; My guess is that some newer version of XML parsing libraries \
dislikes<br> &gt; &gt;&gt; KSudoku's XML files or<br>
&gt; &gt;&gt; possibly that some changed XML version or DOCTYPE has got into the \
act.<br> &gt; &gt;&gt;<br>
&gt; &gt;&gt; Ian W.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt; BR,<br>
&gt; &gt;&gt; &gt; Jeremy<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; On Mon, Mar 18, 2019 at 4:52 PM Albert Astals Cid &lt;<a \
href="mailto:aacid@kde.org" target="_blank">aacid@kde.org</a>&gt;<br> &gt; &gt;&gt; \
wrote:<br> &gt; &gt;&gt; &gt; El dilluns, 18 de març de 2019, a les 20:44:06 CET, \
Jeremy Whiting va<br> &gt; &gt;&gt; escriure:<br>
&gt; &gt;&gt; &gt; &gt; Yep, same thing happens here. Aztec -&gt; Generate A Puzzle \
shows a<br> &gt; &gt;&gt; dialog box<br>
&gt; &gt;&gt; &gt; &gt; that says &quot;<br>
&gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt; Unable to generate a puzzle of the chosen variant; please \
try<br> &gt; &gt;&gt; another.&quot;<br>
&gt; &gt;&gt; &gt; &gt; with a build I just did.<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Weird, works just fine for me.<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Jeremy guess it&#39;s on you to debug it :/<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Cheers,<br>
&gt; &gt;&gt; &gt;     Albert<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt; BR,<br>
&gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt; Jeremy<br>
&gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt; On Thu, Mar 14, 2019 at 9:24 PM Ian Wadham &lt;<a \
href="mailto:iandw.au@gmail.com" target="_blank">iandw.au@gmail.com</a>&gt;<br> &gt; \
&gt;&gt; wrote:<br> &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt; &gt; It appears that KSudoku is failing catastrophically. \
Only the most<br> &gt; &gt;&gt; vanilla<br>
&gt; &gt;&gt; &gt; &gt; &gt; puzzle types can be selected<br>
&gt; &gt;&gt; &gt; &gt; &gt; (i.e.   Classic Sudoku nxn and Roxdoku nxnxn). All \
others fail to<br> &gt; &gt;&gt; create<br>
&gt; &gt;&gt; &gt; &gt; &gt; their data-structures from XML<br>
&gt; &gt;&gt; &gt; &gt; &gt; files and so fail to generate a puzzle and display it \
(e.g. XSudoku,<br> &gt; &gt;&gt; &gt; &gt; &gt; Killer Sudoku, Aztec, Samurai<br>
&gt; &gt;&gt; &gt; &gt; &gt; and many more).<br>
&gt; &gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt; &gt; For more details, please see<br>
&gt; &gt;&gt; <a href="https://bugs.kde.org/show_bug.cgi?id=405422" rel="noreferrer" \
target="_blank">https://bugs.kde.org/show_bug.cgi?id=405422</a>,<br> &gt; &gt;&gt; \
&gt; &gt; &gt; especially comment #3.<br> &gt; &gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt; &gt; This was reported by Duncan, who builds KF5 and apps \
from live-git<br> &gt; &gt;&gt; and has<br>
&gt; &gt;&gt; &gt; &gt; &gt; just noticed the problem<br>
&gt; &gt;&gt; &gt; &gt; &gt; appearing in the last week or two --- more recently than \
any<br> &gt; &gt;&gt; changes in<br>
&gt; &gt;&gt; &gt; &gt; &gt; the KSudoku source.<br>
&gt; &gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt; &gt; Please can someone who has access to builds and \
executables of the<br> &gt; &gt;&gt; latest<br>
&gt; &gt;&gt; &gt; &gt; &gt; development (HEAD)<br>
&gt; &gt;&gt; &gt; &gt; &gt; KSudoku code check if they can reproduce this error? You \
just need<br> &gt; &gt;&gt; to run<br>
&gt; &gt;&gt; &gt; &gt; &gt; KSudoku, select Aztec<br>
&gt; &gt;&gt; &gt; &gt; &gt; puzzle-type (for example) and click on "Generate A \
Puzzle".<br> &gt; &gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt; &gt; Thanks in advance,<br>
&gt; &gt;&gt; &gt; &gt; &gt; Ian Wadham.<br>
&gt; &gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; <br>
<br>
<br>
<br>
<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic