Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8123

TCanvas::SaveAs() crash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 6.04/16
    • Fix Version/s: 6.08/00
    • Component/s: Graphics
    • Labels:
      None
    • Environment:

      CentOS 7, gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), ROOT 6.04/16 configured with --enable-mathmore --build=debug
      Also, Ubuntu 14.04.1, gcc 4.8.4, ROOT 5.34/32

      Description

      I was making some plots with lots of ellipses, similar to those of Phobos Glauber plots. I found that the code crashes when making png files. I made a small example that does the same. I got crash also for .bmp, but not for .ps. Also, it didn't crash when I ran root without -b.

      Here's what I tried and what I got:

      $ root -b
      ------------------------------------------------------------

      Welcome to ROOT 6.04/16 http://root.cern.ch
      (c) 1995-2014, The ROOT Team
      Built for linuxx8664gcc
      From tag , 17 March 2016
      Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'

      ------------------------------------------------------------

      root [0] .L ellipses.C++
      Info in <TUnixSystem::ACLiC>: creating shared library /home/pliu/sandbox/./ellipses_C.so
      root [1] ellipses();

          • Break *** segmentation violation

      ===========================================================
      There was a crash (kSigSegmentationViolation).
      This is the entire stack trace of all threads:
      ===========================================================
      #0 0x00007f63231540ac in waitpid () from /lib64/libc.so.6
      #1 0x00007f63230d9092 in do_system () from /lib64/libc.so.6
      #2 0x00007f6324182eb2 in TUnixSystem::Exec (this=0x1990780, shellcmd=0x2d04710 "/home/pliu/bin/root-6.04.16/etc/gdb-backtrace.sh 6522 1>&2") at /home/pliu/bin/root-6.04.16/core/unix/src/TUnixSystem.cxx:2073
      #3 0x00007f632418372d in TUnixSystem::StackTrace (this=0x1990780) at /home/pliu/bin/root-6.04.16/core/unix/src/TUnixSystem.cxx:2301
      #4 0x00007f6324186f37 in TUnixSystem::DispatchSignals (this=0x1990780, sig=kSigSegmentationViolation) at /home/pliu/bin/root-6.04.16/core/unix/src/TUnixSystem.cxx:3539
      #5 0x00007f632417f3d5 in SigHandler (sig=kSigSegmentationViolation) at /home/pliu/bin/root-6.04.16/core/unix/src/TUnixSystem.cxx:395
      #6 0x00007f6324186e86 in sighandler (sig=11) at /home/pliu/bin/root-6.04.16/core/unix/src/TUnixSystem.cxx:3516
      #7 0x00007f63241bd340 in textinput::TerminalConfigUnix::HandleSignal (this=0x7f6324507580 <textinput::TerminalConfigUnix::Get()::s>, signum=11) at /home/pliu/bin/root-6.04.16/core/textinput/src/textinput/TerminalConfigUnix.cpp:96
      #8 0x00007f63241bd07d in (anonymous namespace)::TerminalConfigUnix__handleSignal (signum=11) at /home/pliu/bin/root-6.04.16/core/textinput/src/textinput/TerminalConfigUnix.cpp:36
      #9 <signal handler called>
      #10 0x00007f63165e73db in TASImage::DrawLineInternal (this=0x2be2170, x1=505, y1=472, x2=508, y2=469, col=4294967295, thick=1) at /home/pliu/bin/root-6.04.16/graf2d/asimage/src/TASImage.cxx:4010
      #11 0x00007f63165ea666 in TASImage::DrawPolyLine (this=0x2be2170, nn=47, xy=0x7f6316b3fd20 <TImageDump::DrawPS(int, double*, double*)::gPointCache>, col=0x1af2b50 "#ffffff", thick=1, mode=TImage::kCoordModeOrigin) at /home/pliu/bin/root-6.04.16/graf2d/asimage/src/TASImage.cxx:4707
      #12 0x00007f63168eafcd in TImageDump::DrawPS (this=0x29c76d0, nn=-46, x=0x2d230b0, y=0x2cff430) at /home/pliu/bin/root-6.04.16/graf2d/postscript/src/TImageDump.cxx:598
      #13 0x00007f6316daaa48 in TPad::PaintFillArea (this=0x7ffe3c38f220, nn=62, xx=0x7f631808c020 <TEllipse::PaintEllipse(double, double, double, double, double, double, double, char const*)::x>, yy=0x7f631808c680 <TEllipse::PaintEllipse(double, double, double, double, double, double, double, char const*)::y>) at /home/pliu/bin/root-6.04.16/graf2d/gpad/src/TPad.cxx:3546
      #14 0x00007f6317de5c14 in TEllipse::PaintEllipse (this=0x2944c10, x1=0.64812557469122112, y1=0.062917665811255574, r1=0.10000000000000001, r2=0.10000000000000001, phimin=0, phimax=360, theta=0, option=0x290bfb9 "") at /home/pliu/bin/root-6.04.16/graf2d/graf/src/TEllipse.cxx:569
      #15 0x00007f6317de5742 in TEllipse::Paint (this=0x2944c10, option=0x290bfb9 "") at /home/pliu/bin/root-6.04.16/graf2d/graf/src/TEllipse.cxx:531
      #16 0x00007f6316da7c3b in TPad::Paint (this=0x7ffe3c38f220) at /home/pliu/bin/root-6.04.16/graf2d/gpad/src/TPad.cxx:3030
      #17 0x00007f6316de1ee5 in TCanvas::Paint (this=0x7ffe3c38f220, option=0x7f6316df0a21 "") at /home/pliu/bin/root-6.04.16/graf2d/gpad/src/TCanvas.cxx:1450
      #18 0x00007f6316db029c in TPad::Print (this=0x7ffe3c38f220, filenam=0x7ffe3c38f119 "0.png", option=0x7f6316df0e23 "png") at /home/pliu/bin/root-6.04.16/graf2d/gpad/src/TPad.cxx:4743
      #19 0x00007f6316db2462 in TPad::SaveAs (this=0x7ffe3c38f220, filename=0x7f632470a1bb "0.png") at /home/pliu/bin/root-6.04.16/graf2d/gpad/src/TPad.cxx:5198
      #20 0x00007f6316b43c41 in ellipses () at /home/pliu/sandbox/./ellipses.C:18
      #21 0x00007f632472103f in ?? ()
      #22 0x00007f63208ed31d in ?? () from /home/pliu/bin/root-6.04.16/lib/libCling.so
      #23 0x00007ffe3c38f950 in ?? ()
      #24 0x00007ffe3c38fec0 in ?? ()
      #25 0x00007f631f26931e in cling::IncrementalExecutor::executeWrapper (this=0x19ca640, function=..., returnValue=0x7ffe3c38f950) at /home/pliu/bin/root-6.04.16/interpreter/cling/lib/Interpreter/IncrementalExecutor.h:186
      #26 0x00007f631f266753 in cling::Interpreter::RunFunction (this=0x19c67a0, FD=0x28ed5d0, res=0x7ffe3c38f950) at /home/pliu/bin/root-6.04.16/interpreter/cling/lib/Interpreter/Interpreter.cpp:755
      #27 0x00007f631f267491 in cling::Interpreter::EvaluateInternal (this=0x19c67a0, input="#line 1 \"ROOT_prompt_1\"\nellipses();", CO=..., V=0x7ffe3c38f950, T=0x0) at /home/pliu/bin/root-6.04.16/interpreter/cling/lib/Interpreter/Interpreter.cpp:1021
      #28 0x00007f631f26577b in cling::Interpreter::process (this=0x19c67a0, input="#line 1 \"ROOT_prompt_1\"\nellipses();", V=0x7ffe3c38f950, T=0x0) at /home/pliu/bin/root-6.04.16/interpreter/cling/lib/Interpreter/Interpreter.cpp:500
      #29 0x00007f631f421ad2 in cling::MetaProcessor::process (this=0x1b00be0, input_text=0x1b91290 "#line 1 \"ROOT_prompt_1\"\nellipses();", compRes=
      0x7ffe3c38fc8c: cling::Interpreter::kSuccess, result=0x7ffe3c38f950) at /home/pliu/bin/root-6.04.16/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:173
      #30 0x00007f631f10f6b8 in TCling::ProcessLine (this=0x19c5f50, line=0x1b93300 "#line 1 \"ROOT_prompt_1\"\nellipses();", error=0x7ffe3c38ff0c) at /home/pliu/bin/root-6.04.16/core/meta/src/TCling.cxx:1966
      #31 0x00007f63240fa9e1 in TApplication::ProcessLine (this=0x19b4d30, line=0x1b93300 "#line 1 \"ROOT_prompt_1\"\nellipses();", sync=false, err=0x7ffe3c38ff0c) at /home/pliu/bin/root-6.04.16/core/base/src/TApplication.cxx:994
      #32 0x00007f6323bb566e in TRint::ProcessLineNr (this=0x19b4d30, filestem=0x7f6323bb9bd7 "ROOT_prompt_", line=0x7ffe3c38ff69 "ellipses();", error=0x7ffe3c38ff0c) at /home/pliu/bin/root-6.04.16/core/rint/src/TRint.cxx:734
      #33 0x00007f6323bb5112 in TRint::HandleTermInput (this=0x19b4d30) at /home/pliu/bin/root-6.04.16/core/rint/src/TRint.cxx:605
      #34 0x00007f6323bb2d71 in TTermInputHandler::Notify (this=0x271bec0) at /home/pliu/bin/root-6.04.16/core/rint/src/TRint.cxx:128
      #35 0x00007f6323bb63db in TTermInputHandler::ReadNotify (this=0x271bec0) at /home/pliu/bin/root-6.04.16/core/rint/src/TRint.cxx:120
      #36 0x00007f63241814c9 in TUnixSystem::CheckDescriptors (this=0x1990780) at /home/pliu/bin/root-6.04.16/core/unix/src/TUnixSystem.cxx:1301
      #37 0x00007f6324180946 in TUnixSystem::DispatchOneEvent (this=0x1990780, pendingOnly=false) at /home/pliu/bin/root-6.04.16/core/unix/src/TUnixSystem.cxx:1056
      #38 0x00007f63240e9751 in TSystem::InnerLoop (this=0x1990780) at /home/pliu/bin/root-6.04.16/core/base/src/TSystem.cxx:410
      #39 0x00007f63240e94ec in TSystem::Run (this=0x1990780) at /home/pliu/bin/root-6.04.16/core/base/src/TSystem.cxx:360
      #40 0x00007f63240fb374 in TApplication::Run (this=0x19b4d30, retrn=false) at /home/pliu/bin/root-6.04.16/core/base/src/TApplication.cxx:1142
      #41 0x00007f6323bb451f in TRint::Run (this=0x19b4d30, retrn=false) at /home/pliu/bin/root-6.04.16/core/rint/src/TRint.cxx:459
      #42 0x00000000004012f1 in main (argc=1, argv=0x7ffe3c3923c8) at /home/pliu/bin/root-6.04.16/main/src/rmain.cxx:30
      ===========================================================

      The lines below might hint at the cause of the crash.
      If they do not help you then please submit a bug report at
      http://root.cern.ch/bugs. Please post the ENTIRE stack trace
      from above as an attachment in addition to anything else
      that might help us fixing this issue.
      ===========================================================
      #10 0x00007f63165e73db in TASImage::DrawLineInternal (this=0x2be2170, x1=505, y1=472, x2=508, y2=469, col=4294967295, thick=1) at /home/pliu/bin/root-6.04.16/graf2d/asimage/src/TASImage.cxx:4010
      #11 0x00007f63165ea666 in TASImage::DrawPolyLine (this=0x2be2170, nn=47, xy=0x7f6316b3fd20 <TImageDump::DrawPS(int, double*, double*)::gPointCache>, col=0x1af2b50 "#ffffff", thick=1, mode=TImage::kCoordModeOrigin) at /home/pliu/bin/root-6.04.16/graf2d/asimage/src/TASImage.cxx:4707
      #12 0x00007f63168eafcd in TImageDump::DrawPS (this=0x29c76d0, nn=-46, x=0x2d230b0, y=0x2cff430) at /home/pliu/bin/root-6.04.16/graf2d/postscript/src/TImageDump.cxx:598
      #13 0x00007f6316daaa48 in TPad::PaintFillArea (this=0x7ffe3c38f220, nn=62, xx=0x7f631808c020 <TEllipse::PaintEllipse(double, double, double, double, double, double, double, char const*)::x>, yy=0x7f631808c680 <TEllipse::PaintEllipse(double, double, double, double, double, double, double, char const*)::y>) at /home/pliu/bin/root-6.04.16/graf2d/gpad/src/TPad.cxx:3546
      #14 0x00007f6317de5c14 in TEllipse::PaintEllipse (this=0x2944c10, x1=0.64812557469122112, y1=0.062917665811255574, r1=0.10000000000000001, r2=0.10000000000000001, phimin=0, phimax=360, theta=0, option=0x290bfb9 "") at /home/pliu/bin/root-6.04.16/graf2d/graf/src/TEllipse.cxx:569
      #15 0x00007f6317de5742 in TEllipse::Paint (this=0x2944c10, option=0x290bfb9 "") at /home/pliu/bin/root-6.04.16/graf2d/graf/src/TEllipse.cxx:531
      #16 0x00007f6316da7c3b in TPad::Paint (this=0x7ffe3c38f220) at /home/pliu/bin/root-6.04.16/graf2d/gpad/src/TPad.cxx:3030
      #17 0x00007f6316de1ee5 in TCanvas::Paint (this=0x7ffe3c38f220, option=0x7f6316df0a21 "") at /home/pliu/bin/root-6.04.16/graf2d/gpad/src/TCanvas.cxx:1450
      #18 0x00007f6316db029c in TPad::Print (this=0x7ffe3c38f220, filenam=0x7ffe3c38f119 "0.png", option=0x7f6316df0e23 "png") at /home/pliu/bin/root-6.04.16/graf2d/gpad/src/TPad.cxx:4743
      #19 0x00007f6316db2462 in TPad::SaveAs (this=0x7ffe3c38f220, filename=0x7f632470a1bb "0.png") at /home/pliu/bin/root-6.04.16/graf2d/gpad/src/TPad.cxx:5198
      #20 0x00007f6316b43c41 in ellipses () at /home/pliu/sandbox/./ellipses.C:18
      #21 0x00007f632472103f in ?? ()
      #22 0x00007f63208ed31d in ?? () from /home/pliu/bin/root-6.04.16/lib/libCling.so
      #23 0x00007ffe3c38f950 in ?? ()
      #24 0x00007ffe3c38fec0 in ?? ()
      #25 0x00007f631f26931e in cling::IncrementalExecutor::executeWrapper (this=0x19ca640, function=..., returnValue=0x7ffe3c38f950) at /home/pliu/bin/root-6.04.16/interpreter/cling/lib/Interpreter/IncrementalExecutor.h:186
      #26 0x00007f631f266753 in cling::Interpreter::RunFunction (this=0x19c67a0, FD=0x28ed5d0, res=0x7ffe3c38f950) at /home/pliu/bin/root-6.04.16/interpreter/cling/lib/Interpreter/Interpreter.cpp:755
      #27 0x00007f631f267491 in cling::Interpreter::EvaluateInternal (this=0x19c67a0, input="#line 1 "ROOT_prompt_1"nellipses();", CO=..., V=0x7ffe3c38f950, T=0x0) at /home/pliu/bin/root-6.04.16/interpreter/cling/lib/Interpreter/Interpreter.cpp:1021
      #28 0x00007f631f26577b in cling::Interpreter::process (this=0x19c67a0, input="#line 1 "ROOT_prompt_1"nellipses();", V=0x7ffe3c38f950, T=0x0) at /home/pliu/bin/root-6.04.16/interpreter/cling/lib/Interpreter/Interpreter.cpp:500
      #29 0x00007f631f421ad2 in cling::MetaProcessor::process (this=0x1b00be0, input_text=0x1b91290 "#line 1 "ROOT_prompt_1"nellipses();", compRes=
      0x7ffe3c38fc8c: cling::Interpreter::kSuccess, result=0x7ffe3c38f950) at /home/pliu/bin/root-6.04.16/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:173
      ===========================================================

      Root >

        Attachments

          Activity

            People

            • Assignee:
              couet Olivier Couet
              Reporter:
              c1605ae2abd9a90b40e6 Peifeng Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual End: