Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxmaxima freezes running test suite #1756

Open
beew opened this issue Feb 19, 2023 · 6 comments
Open

wxmaxima freezes running test suite #1756

beew opened this issue Feb 19, 2023 · 6 comments

Comments

@beew
Copy link

beew commented Feb 19, 2023

Wxmaxima freezes for run_testsuite(display_all = true) , the top command shows that wxmaxima is consuming 100% cpu (in addition to 100% from sbcl)

then at problem 80 (line 232), it looks like it just quits. Top doesn't show any cpu activity even though wxmaxima is still running (just that the test session is killed apparently)

Run_testsuite() without display works fine and all the cpu consumption is from sbcl, wxmaxima is taking up less than 1%.

run_testsuite(display_all = true) works without issue in xmaxima, so it is not a maxima issue.

OS Ubuntu 22.04, wxmaxima 23.02.0, maxima 5.45.1

daute added a commit that referenced this issue Feb 20, 2023
Created using a few shell commands from src/testsuite.lisp
in the Maxima repository.

This should be a good test for wxMaxima and simplify
debugging reported issues like #1756 and #1556.
@daute
Copy link
Member

daute commented Feb 20, 2023

Thanks for the report.
run_testsuite(display_all=true, tests=[rtestode]);
creates a XML error with an up-to-date Maxima (compiled using ECL). Will check in the next days, what's going on here...

@gunterkoenigsmann
Copy link
Member

I tried the whole thing using a maxima that was compiles with SBCL and with both maxima and wxMaxima from the current git HEAD. In that case wxMaxima is busy for hours layouting all the math maxima produces. But it eventually finishes without any XML error, works fine afterwards, but still requires half of a CPU on my system. I guess I do want to profile this once the current bugs are resolved. My maxima-ECL won't start currently, and --logtostderrdoesn't work for me => seems we found an excellent, even if very long-running test case.

@daute
Copy link
Member

daute commented Feb 21, 2023

The following code from the testsuite seems problematic:

''(f(x) = sin(x)*(at('diff(f(x),x,1),x = 0)-2)+f(0)*cos(x)+2*x);

/* BUG 3899 */
errcatch(desolve('diff(f(x),x),x));

This results in the following XML (as seen in the XML monitor):

<math>
  <t>desolve(<eqn>,<depvar>): dependant variable <depvar> cannot be a mapatom, found: </t>
     <mi>x</mi>
     </math>

Which of course is not valid XML, the "tag" <depvar> is closed by </t>. There must be a replacement with the corresponding entitites. Somewhere in our Lisp code...

This is found by the following code:
src/wxMaxima.cpp(1906): assert "cell" failed in DoConsoleAppend(): There was an error in generated XML!

@gunterkoenigsmann
Copy link
Member

Seems we lack a (wxxml-fix-string ) somewhere that escapes the < and > before sending them to Maxima. We'll have to search for where the <t> flags are generated...

gunterkoenigsmann added a commit that referenced this issue Feb 22, 2023
On my computer I get XML that didn't trigger the bug, which means that I
cannot test it; In order to make an incemental build use the new wxMathml.lisp
one needs to touch CMakelists.txt first.
@gunterkoenigsmann
Copy link
Member

Yesterday's release should allow the user interface more often to send signals even when wxMaxima is busy - and nearly all of the XML bugs I found have been resolved in the meantime => I would say that bug report has greatly improved the quality of wxMaxima. Let's hope I managed to resolve the actual issue, as well.

@beew
Copy link
Author

beew commented Apr 29, 2023

Yesterday's release should allow the user interface more often to send signals even when wxMaxima is busy - and nearly all of the XML bugs I found have been resolved in the meantime => I would say that bug report has greatly improved the quality of wxMaxima. Let's hope I managed to resolve the actual issue, as well.

Still happening in wxmaxima 23.04.1. Wxmaxima is still using 100% cpu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants