Re: BROP-1-0-1 and something must be wrong here.......

From: Jens Ivar Jordre (jens@fi.uib.no)
Date: Fri Jul 13 2001 - 21:12:10 EDT

  • Next message: Christian Holm Christensen: "Re: Update of Brahms Online programs"

    On Fri, 13 Jul 2001, Christian Holm Christensen wrote:
    
    > > The dialog, PrintDialogBox, inherits from TGTransientFrame and is
    > > constructed with "new PrintDialogBox(<arguments>)".
    >
    > Hmm.  Odd.  How is the window unmapped?  Does the "Ok", "Cancel",
    > ladida button delete the object it self?  I believe it should (see
    > also guitest.C in the ROOT source tree).
    
    Comparing with guitest.C and especially its TestMsgBox, they are
    strikingly similar. They both call their overwritten CloseWindow() member
    function that is simply "delete this;". However, one class works
    flawlessly and the other one doesn't.
    
    You can have a look yourself in
    <your_brop_dir>/monitor/abc/BrPrintManager.cxx:
    PrintDialogBox::SetupWindow
    
    > I really REALLY recoomend using the signal/slot thing instead, since
    > it is soooo much nicer and easier to understand.
    
    Any documentation references?
    
    > > > Try running the application in the debugger, and see where it fails.
    > >
    > > This leads to file format problems,
    >
    > Uh?
    
    Yes, apparently I did "gdb supermon" on the binary generated with
    "make" (not "make install") and got the error message:
    
    "/home/bergen/jens/brahms/brop/monitor/apps/supermon": not in executable
    format: File format not recognized.
    
    However, when I run gdb with the binary created with "make install" it
    works fine.
    
    So, the output from gdb indcates that it is the resizing of the printer
    dialog that causes trouble:
    
    % gdb supermon
    
    ....supermon initialization output.....
    
    root [0] Trying to print, fPrintManager = 145062992
    Trying to print, fPrintManager = 145062992
    
    Program received signal SIGSEGV, Segmentation fault.
    0x40ca5dab in TGHorizontalLayout::GetDefaultSize () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    Current language:  auto; currently c
    (gdb) bt
    #0  0x40ca5dab in TGHorizontalLayout::GetDefaultSize () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #1  0x40c9fe03 in TGCompositeFrame::GetDefaultSize () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #2  0x40ca578d in TGVerticalLayout::GetDefaultSize () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #3  0x40c9fe03 in TGCompositeFrame::GetDefaultSize () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #4  0x40ca578d in TGVerticalLayout::GetDefaultSize () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #5  0x40c9fe03 in TGCompositeFrame::GetDefaultSize () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #6  0x40ca5d8d in TGHorizontalLayout::GetDefaultSize () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #7  0x40c9fe03 in TGCompositeFrame::GetDefaultSize () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #8  0x41548fed in PrintDialogBox::SetupWindow (this=0x9244f00, main=0x8a2f210) at BrPrintManager.cxx:338
    #9  0x415478aa in PrintDialogBox::PrintDialogBox (this=0x9244f00, p=0x89a9550, main=0x8a2f210, w=400, h=200, options=3, info=0x8a57c78, ret_stat=0xbffff0fc)
        at BrPrintManager.cxx:132
    #10 0x4154754c in BrPrintManager::Print (this=0x8a57c50, can=0x9246298) at BrPrintManager.cxx:67
    #11 0x415407fb in BrMonitorCanvas::ProcessMessage (this=0x92a4050, msg=259, parm1=5, parm2=0) at BrMonitorCanvas.cxx:198
    #12 0x40c9d939 in TGFrame::HandleClientMessage () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #13 0x40c9ef3f in TGMainFrame::HandleClientMessage () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #14 0x40c9d74d in TGFrame::HandleEvent () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #15 0x40c9357d in TGClient::HandleEvent () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #16 0x40c9339c in TGClient::ProcessOneEvent () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #17 0x40c9340b in TGClient::HandleInput () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #18 0x40c91b2b in TGInputHandler::Notify () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libGui.so
    #19 0x40231acd in TUnixSystem::DispatchOneEvent () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libCore.so
    #20 0x401e1a38 in TSystem::InnerLoop () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libCore.so
    #21 0x401e19bd in TSystem::Run () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libCore.so
    #22 0x401a821d in TApplication::Run () from
    /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libCore.so
    #23 0x40b3ee01 in TRint::Run () from /afs/rhic/opt/brahms/root/root_v3.00.06/lib/libRint.so
    #24 0x8049b7c in main (argc=1, argv=0xbffffa34) at SuperMon.cxx:343
    (gdb) q
    
    Here a print dialog is opened successfully for the first histogram to be
    printed, giving the first "Trying to print....." line at stdout. When the
    second histogram is to be printed the seg.violation occurs.
    
    > If you want to avoid this optimisation, configure the source tree as
    >
    >   CXXFLAGS="-g" ./configure <options>
    
    That's the bash way of doing it. How about csh and its decendants? Maybe
    your proposed arguments to configure (below) should be included right
    away.
    
    > > Using BRAT 2 and other module (in the CVS meaning of the word)
    >
    > Let's call that a software package to minimize confusion.
    
    I suppose we could do that.
    
    > I may at some point write a M4 macro that lets you choose this via the
    > configure script directly, like
    >
    >   ./configure --disable-optimisation
    >
    > and
    >
    >   ./configure --disable-debug
    
    
    Best wishes from
    Jens Ivar
    
    -- 
    Jens Ivar Jřrdre
    e-mail:    JensIvar.Jordre@fi.uib.no
    usually:   Dep. of Phys., Allégt. 55, N-5007 BERGEN, NORWAY
    currently: Bldg 510D, P.O.Box 5000, Upton, NY 11973-5000, USA
    phone:     +1-631-344-4223
    



    This archive was generated by hypermail 2b30 : Fri Jul 13 2001 - 19:13:27 EDT