<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>329940</bug_id>
          
          <creation_ts>2014-01-14 01:04:51 +0000</creation_ts>
          <short_desc>KAlgebra takes a very long time to load, and uses 100% of CPU resources while loading.</short_desc>
          <delta_ts>2014-03-11 00:49:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kalgebra</product>
          <component>general</component>
          <version>0.11</version>
          <rep_platform>Mint (Ubuntu based)</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>skyclear242</reporter>
          <assigned_to name="Aleix Pol">aleixpol</assigned_to>
          <cc>cfeck</cc>
    
    <cc>g.schlisio</cc>
    
    <cc>jergus.g</cc>
    
    <cc>third-impact</cc>
    
    <cc>vertago1</cc>
    
    <cc>yacwroy</cc>
    
    <cc>yevhen.kemet</cc>
          
          <cf_commitlink>http://commits.kde.org/kalgebra/f97018ef87aef2dd6e40f4d62a88aad90f2ccf38</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>50</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1424636</commentid>
    <comment_count>0</comment_count>
    <who name="">skyclear242</who>
    <bug_when>2014-01-14 01:04:51 +0000</bug_when>
    <thetext>When I start KAlgebra, It doesn&apos;t show up on the screen right away. It loads for a very long time (about 9 minutes), and while it loads it uses 100% of resources on my first CPU core (I have AMD Athlon 2 X3 455 CPU).

Reproducible: Always

Steps to Reproduce:
1. Just start KAlgebra.
Actual Results:  
KAlgebra loaded after 9 minutes during which it used 100% of CPU resources (on the first core).

Expected Results:  
It should have loaded much faster, after like 2 seconds.

CPU: AMD Athlon 2 X3 455 3.3 GHz
GPU: NVIDIA GeForce 9500GT
Distro: Linux Mint 16 KDE (64-Bit)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1424639</commentid>
    <comment_count>1</comment_count>
    <who name="Aleix Pol">aleixpol</who>
    <bug_when>2014-01-14 01:09:22 +0000</bug_when>
    <thetext>That shouldn&apos;t be happening, here it starts instantly.

Can you provide more information maybe?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1424645</commentid>
    <comment_count>2</comment_count>
    <who name="">skyclear242</who>
    <bug_when>2014-01-14 01:29:46 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; That shouldn&apos;t be happening, here it starts instantly.
&gt; 
&gt; Can you provide more information maybe?

I don&apos;t know what else to post. What other info should I post?

By the way, I just found another bug in KAlgebra:

I click on the dictionary tab, and then I click on the word &quot;sin&quot;, and the program hangs forever.
The CPU usage also goes up to 100%.

It happens every time I do this.

Should I file this bug also?

Please let me know what other info would be helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1424683</commentid>
    <comment_count>3</comment_count>
    <who name="">skyclear242</who>
    <bug_when>2014-01-14 07:17:01 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Can you provide more information maybe?

I started the program, and while it hanged at the start, I interrupted it with Ctrl+C so I could do a backtrace. Here&apos;s the backtrace:

Starting program: /usr/bin/kalgebra 
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;/lib/x86_64-linux-gnu/libthread_db.so.1&quot;.

Program received signal SIGINT, Interrupt.
0x00007ffff36463c9 in ?? () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7ffff7fb67c0 (LWP 5468)):
#0  0x00007ffff36463c9 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff40476fb in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007ffff40478bd in QString::arg(QString const&amp;, int, QChar const&amp;) const
    () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007ffff5c43aab in ?? () from /usr/lib/x86_64-linux-gnu/libQtXml.so.4
#4  0x00007ffff5c4b88f in ?? () from /usr/lib/x86_64-linux-gnu/libQtXml.so.4
#5  0x00007ffff5c4cf00 in ?? () from /usr/lib/x86_64-linux-gnu/libQtXml.so.4
#6  0x00007ffff5c4d576 in ?? () from /usr/lib/x86_64-linux-gnu/libQtXml.so.4
#7  0x00007ffff5c4dd60 in ?? () from /usr/lib/x86_64-linux-gnu/libQtXml.so.4
#8  0x00007ffff5c4f945 in ?? () from /usr/lib/x86_64-linux-gnu/libQtXml.so.4
#9  0x00007ffff5c4fce8 in QXmlSimpleReader::parse(QXmlInputSource const*, bool)
    () from /usr/lib/x86_64-linux-gnu/libQtXml.so.4
#10 0x00007ffff5c39124 in ?? () from /usr/lib/x86_64-linux-gnu/libQtXml.so.4
#11 0x00007ffff5c3c834 in ?? () from /usr/lib/x86_64-linux-gnu/libQtXml.so.4
#12 0x00007ffff5c3c8cb in QDomDocument::setContent(QString const&amp;, bool, QString*, int*, int*) () from /usr/lib/x86_64-linux-gnu/libQtXml.so.4
#13 0x000000000042deaf in MmlDocument::setContent(QString, QString*, int*, int*) ()
#14 0x000000000042e003 in QtMmlWidget::setContent(QString const&amp;, QString*, int*, int*) ()
#15 0x000000000041b49a in Dictionary::Dictionary (this=0xcdae90, 
    p=&lt;optimized out&gt;) at ../../src/dictionary.cpp:85
#16 0x0000000000419fde in KAlgebra::KAlgebra (this=0x889780, 
    parent=&lt;optimized out&gt;) at ../../src/kalgebra.cpp:336
#17 0x0000000000415526 in main (argc=1, argv=0x7fffffffddb8)
    at ../../src/main.cpp:37
A debugging session is active.

	Inferior 1 [process 5468] will be killed.

Quit anyway? (y or n)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1424843</commentid>
    <comment_count>4</comment_count>
    <who name="">skyclear242</who>
    <bug_when>2014-01-15 00:06:30 +0000</bug_when>
    <thetext>Here&apos;s a backtrace with qt debufg symbols installed:

Program received signal SIGINT, Interrupt.
replaceArgEscapes (s=..., d=..., field_width=field_width@entry=0, arg=..., 
    larg=..., fillChar=...) at tools/qstring.cpp:6462
6462	tools/qstring.cpp: No such file or directory.

Thread 1 (Thread 0x7ffff7fb67c0 (LWP 12718)):
#0  replaceArgEscapes (s=..., d=..., field_width=field_width@entry=0, arg=..., 
    larg=..., fillChar=...) at tools/qstring.cpp:6462
#1  0x00007ffff40478bd in QString::arg (this=this@entry=0x7fffffffd2f0, a=..., 
    fieldWidth=fieldWidth@entry=0, fillChar=...) at tools/qstring.cpp:6585
#2  0x00007ffff5c43aab in QXmlSimpleReaderPrivate::isExpandedEntityValueTooLarge (this=this@entry=0xd355f0, errorMessage=errorMessage@entry=0x7fffffffd4d0)
    at sax/qxml.cpp:6656
#3  0x00007ffff5c4b88f in QXmlSimpleReaderPrivate::parseEntityDecl (
    this=this@entry=0xd355f0) at sax/qxml.cpp:6781
#4  0x00007ffff5c4cf00 in QXmlSimpleReaderPrivate::parseMarkupdecl (
    this=this@entry=0xd355f0) at sax/qxml.cpp:5399
#5  0x00007ffff5c4d576 in QXmlSimpleReaderPrivate::parseDoctype (
    this=this@entry=0xd355f0) at sax/qxml.cpp:5033
#6  0x00007ffff5c4dd60 in QXmlSimpleReaderPrivate::parseProlog (this=0xd355f0)
    at sax/qxml.cpp:3788
#7  0x00007ffff5c4f945 in QXmlSimpleReaderPrivate::parseBeginOrContinue (
    this=this@entry=0xd355f0, state=state@entry=0, 
    incremental=incremental@entry=false) at sax/qxml.cpp:3493
#8  0x00007ffff5c4fce8 in QXmlSimpleReader::parse (this=&lt;optimized out&gt;, 
    input=0x7fffffffd900, incremental=&lt;optimized out&gt;) at sax/qxml.cpp:3447
#9  0x00007ffff5c39124 in QDomDocumentPrivate::setContent (
    this=this@entry=0xd35400, source=source@entry=0x7fffffffd900, 
    reader=reader@entry=0x7fffffffd8a0, errorMsg=errorMsg@entry=0x0, 
    errorLine=errorLine@entry=0x0, errorColumn=errorColumn@entry=0x0)
    at dom/qdom.cpp:6248
#10 0x00007ffff5c3c834 in QDomDocumentPrivate::setContent (this=0xd35400, 
    source=source@entry=0x7fffffffd900, 
    namespaceProcessing=namespaceProcessing@entry=false, 
    errorMsg=errorMsg@entry=0x0, errorLine=errorLine@entry=0x0, 
    errorColumn=errorColumn@entry=0x0) at dom/qdom.cpp:6228
#11 0x00007ffff5c3c8cb in QDomDocument::setContent (this=0x7fffffffd9c0, 
    text=..., namespaceProcessing=&lt;optimized out&gt;, errorMsg=0x0, 
    errorLine=0x0, errorColumn=0x0) at dom/qdom.cpp:6680
#12 0x000000000042deaf in MmlDocument::setContent(QString, QString*, int*, int*) ()
#13 0x000000000042e003 in QtMmlWidget::setContent(QString const&amp;, QString*, int*, int*) ()
#14 0x000000000041b49a in Dictionary::Dictionary (this=0xcdb350, 
    p=&lt;optimized out&gt;) at ../../src/dictionary.cpp:85
#15 0x0000000000419fde in KAlgebra::KAlgebra (this=0x88b3e0, 
    parent=&lt;optimized out&gt;) at ../../src/kalgebra.cpp:336
#16 0x0000000000415526 in main (argc=1, argv=0x7fffffffddb8)
    at ../../src/main.cpp:37</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1424845</commentid>
    <comment_count>5</comment_count>
    <who name="Aleix Pol">aleixpol</who>
    <bug_when>2014-01-15 00:18:18 +0000</bug_when>
    <thetext>Looks like a but in QtMmlWidget, will look into this.

Thanks for the bug report!!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1424884</commentid>
    <comment_count>6</comment_count>
    <who name="Gauss">third-impact</who>
    <bug_when>2014-01-15 09:37:29 +0000</bug_when>
    <thetext>I can confirm this bahaviour for Kubuntu 13.10. 
KAlgebra takes several minutes to start and produces a high CPU load while loading.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1426264</commentid>
    <comment_count>7</comment_count>
    <who name="Georg Schlisio">g.schlisio</who>
    <bug_when>2014-01-22 09:47:59 +0000</bug_when>
    <thetext>this bug has a duplicate one: https://bugs.kde.org/show_bug.cgi?id=329035.

i can confirm very slow start and 100% cpu usage in kalgebra 4.12.1 in official archlinux package.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1426596</commentid>
    <comment_count>8</comment_count>
    <who name="Jekyll Wu">adaptee</who>
    <bug_when>2014-01-24 08:02:42 +0000</bug_when>
    <thetext>*** Bug 330339 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1426598</commentid>
    <comment_count>9</comment_count>
    <who name="Jekyll Wu">adaptee</who>
    <bug_when>2014-01-24 08:02:45 +0000</bug_when>
    <thetext>*** Bug 329035 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1434390</commentid>
    <comment_count>10</comment_count>
    <who name="Simon">yacwroy</who>
    <bug_when>2014-03-08 11:13:48 +0000</bug_when>
    <thetext>Confirming for mint 16 xfce 64-bit here. Fully uses 1 core and, in my case, hasn&apos;t ever started.
IMHO, importance should be changed to critical (or grave).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1434481</commentid>
    <comment_count>11</comment_count>
    <who name="Allen Webb">vertago1</who>
    <bug_when>2014-03-09 01:28:04 +0000</bug_when>
    <thetext>I downloaded the source for 4.11.2; and have the same problem. I commented out the dictionary tab and it seemed to fix the problem. It looks like it takes it forever to parse some xml to build the dictionary tab.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1434997</commentid>
    <comment_count>12</comment_count>
    <who name="Aleix Pol">aleixpol</who>
    <bug_when>2014-03-11 00:49:47 +0000</bug_when>
    <thetext>Git commit f97018ef87aef2dd6e40f4d62a88aad90f2ccf38 by Aleix Pol.
Committed on 11/03/2014 at 00:37.
Pushed by apol into branch &apos;master&apos;.

Stop depending on QtMMLWidget

It was a nice idea, sadly it was not maintained (AFAIK) and it ended up
deeply breaking KAlgebra startup. Not worth it, so long. :/

M  +0    -4    CMakeLists.txt
M  +0    -1    src/CMakeLists.txt
M  +0    -10   src/dictionary.cpp
M  +0    -2    src/dictionary.h

http://commits.kde.org/kalgebra/f97018ef87aef2dd6e40f4d62a88aad90f2ccf38</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>