Menu

bug that causes python to use 99% of the cpu

jiun
2013-05-11
2013-05-16
  • jiun

    jiun - 2013-05-11

    it seems there is a bug that causes python to spike in cpu usage for some inputs,
    here is one case that i ran into:

    >>> a =u'(%o10) log(x^2-x+1)/6+atan((2*x-1)/sqrt(3))/sqrt(3)-log(x+1)/3'
    >>> import asciitomathml.asciitomathml
    >>> the_string = a
    >>> the_string = unicode(the_string.decode('utf8')) # adjust to your own encoding
    >>> math_obj =  asciitomathml.asciitomathml.AsciiMathML()
    >>> math_obj.parse_string(the_string)
    

    after this the computer get so overwhelmed i have to do a hard restart, since it becomes totally unresponsive.
    this is a serious one.

     

    Last edit: jiun 2013-05-11
    • Paul Henry Tremblay

      On 5/11/13 4:10 AM, jiun wrote:

      a =u'(%o10) log(x^2-x+1)/6+atan((2*x-1)/sqrt(3))/sqrt(3)-log(x+1)/3'
      I've fixed the bug and the newest version, .88, should now work.

      By the way, couldn't you just use ctr-C to quit out of your shell rather
      than having to do a hard restart on your computer?

      Paul

       
  • Paul Henry Tremblay

    I fixed the bug. By the way, can't you just use ctr-c to force the program to quite from the shell, rather than doing a hard restart?

     
    • jiun

      jiun - 2013-05-16

      Thanks for the fix, apparently sourceforge does not give nottifications.
      But, when the usage spiked, even the keyboard+mouse was unresponsive, there was no way for me to kill the process.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.