Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-5443 TMathText issues
  3. ROOT-5039

Typing MathText can make it crash

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed (View Workflow)
    • Medium
    • Resolution: Fixed
    • < v5-28-00
    • None
    • Graphics
    • None
    • GNU/Linux

    Description

      Hi,

      TLatex* l = new TLatex(0.2,0.2, "\\sqrt{")
      l->Draw()

      causes

      #9  &amp;lt;signal handler called&amp;gt;
      #10 0x00007fdfd5a6b9ce in mathtext::math_text_renderer_t::math_tokenize (this=0x26aeab0, math_list_begin=..., math_list_end=..., style=6) at /home/axel/build/root/v5-34-00-patches/src/graf2d/mathtext/src/mathrendertoken.cxx:191
      #11 0x00007fdfd5a65dbb in mathtext::math_text_renderer_t::math_bounding_box (this=0x26aeab0, math_list_begin=..., math_list_end=..., style=6) at /home/axel/build/root/v5-34-00-patches/src/graf2d/mathtext/src/mathrender.cxx:298
      #12 0x00007fdfd5a67db6 in mathtext::math_text_renderer_t::math_bounding_box (this=0x26aeab0, field=..., style=6) at /home/axel/build/root/v5-34-00-patches/src/graf2d/mathtext/src/mathrender.cxx:443
      #13 0x00007fdfd5a68376 in mathtext::math_text_renderer_t::bounding_box (this=0x26aeab0, textbb=..., display_style=false) at /home/axel/build/root/v5-34-00-patches/src/graf2d/mathtext/src/mathrender.cxx:608
      #14 0x00007fdfd5944976 in TMathText::GetAlignPoint (this=0x7fff90a845f8, x0=
      0x7fff90a84238: 0, y0=
      0x7fff90a84230: 6.9531436082559572e-310, size=0.05000000074505806, angle=0, t=0x7fff90a84269 &amp;quot;\\sqrt{&amp;quot;, align=11) at /home/axel/build/root/v5-34-00-patches/src/graf2d/graf/src/TMathText.cxx:468
      #15 0x00007fdfd5945a47 in TMathText::PaintMathText (this=0x7fff90a845f8, x=0.20000000000000001, y=0.20000000000000001, angle=0, size=0.05000000074505806, text1=0x26ace01 &amp;quot;\\sqrt{&amp;quot;) at /home/axel/build/root/v5-34-00-patches/src/graf2d/graf/src/TMathText.cxx:636
      #16 0x00007fdfd593534a in TLatex::PaintLatex (this=0x26acdd0, x=0.20000000000000001, y=0.20000000000000001, angle=0, size=0.05000000074505806, text1=0x26ace01 &amp;quot;\\sqrt{&amp;quot;) at /home/axel/build/root/v5-34-00-patches/src/graf2d/graf/src/TLatex.cxx:1894
      #17 0x00007fdfd593516e in TLatex::Paint (this=0x26acdd0) at /home/axel/build/root/v5-34-00-patches/src/graf2d/graf/src/TLatex.cxx:1865
      #18 0x00007fdfd54e078c in TPad::PaintModified (this=0x28e1bc0) at /home/axel/build/root/v5-34-00-patches/src/graf2d/gpad/src/TPad.cxx:3123
      #19 0x00007fdfd54b8ec4 in TCanvas::Update (this=0x28e1bc0) at /home/axel/build/root/v5-34-00-patches/src/graf2d/gpad/src/TCanvas.cxx:2122
      #20 0x00007fdfd948d231 in TCint::UpdateAllCanvases () at /home/axel/build/root/v5-34-00-patches/src/core/meta/src/TCint.cxx:2123

      Of course that's invalid text but it must be handled by MathText: it's what e.g. I type when editing an axis title in the editor, character by character, and the title is updated live and can thus be incomplete.

      This renders MathText unusable (and dangerous, actually) in interactive mode.

      Cheers, Axel.

      Attachments

        Activity

          People

            couet Olivier Couet
            axel Axel Naumann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual End: