Re: [ROOT] My Gui problem

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Wed May 21 2003 - 01:16:51 MEST


Hi Michal,

   in MyMainFrame.cxx replace the line:

    TGPopupMenu *fMenuFile = new TGPopupMenu(gClient->GetRoot());

by

    fMenuFile = new TGPopupMenu(gClient->GetRoot());

and it will work fine. You were locally redefining the variable
fMenuFile, which therefore was undefined in HandleMenu() and caused some
random member function to be called.

Cheers, Fons.


 
On Tue, 2003-05-20 at 23:08, Michal Lijowski wrote:
>   Hello
> 
> I have been still experimenting with basics of compiled ROOT GUI using ROOT
> 3.05/05
> under RH Linux 9.0 and gcc 3.2.2-5. The code is based on guitest.C in
> root/tutorials
> and code from http://root.cern.ch/root/roottalk/roottalk02/1826.html.
> It works OK except when I select Print Setup it produces the following error
> messages.
> 
>  I appreciate any recommendations.
> 
>  Michal
> 
> 
> 
> MyMainFrame has been created. Welcome!
> menu popped up
> menu popped down
> fIniDir = .
> Open file: (null) (dir: .)
> menu popped up
> menu popped down
> M_FILE_PRINTSETUP
> Enabling "Print"
> 
>  *** Break *** segmentation violation
>  Generating stack trace...
>  0x401a4632 in TUnixSystem::StackTrace() + 0x202 from
> /home/michal/cern/root/lib/libCore.so
>  0x401a3434 in TUnixSystem::DispatchSignals(ESignals) + 0x104 from
> /home/michal/cern/root/lib/libCore.so
>  0x401a26e5 in <unknown> from /home/michal/cern/root/lib/libCore.so
>  0x401a5f05 in <unknown> from /home/michal/cern/root/lib/libCore.so
>  0x40e087c8 in <unknown> from /lib/tls/libpthread.so.0
>  0x080505cf in <unknown> from ./MyMain
>  0x405d04e8 in G__CallFunc::Exec(void*) + 0x6c from
> /home/michal/cern/root/lib/libCint.so
>  0x4010ce49 in TQConnection::ExecuteMethod(long) + 0x85 from
> /home/michal/cern/root/lib/libCore.so
>  0x4010fd59 in TQObject::Emit(char const*, long) + 0x1c1 from
> /home/michal/cern/root/lib/libCore.so
>  0x40eeaca9 in TGPopupMenu::Activated(int) + 0x29 from
> /home/michal/cern/root/lib/libGui.so
>  0x40eea93f in TGMenuTitle::DoSendMessage() + 0x43 from
> /home/michal/cern/root/lib/libGui.so
>  0x40ee7162 in TGMenuBar::HandleButton(Event_t*) + 0x112 from
> /home/michal/cern/root/lib/libGui.so
>  0x40ecc777 in TGFrame::HandleEvent(Event_t*) + 0xfb from
> /home/michal/cern/root/lib/libGui.so
>  0x40eb6d02 in TGClient::HandleEvent(Event_t*) + 0x3a from
> /home/michal/cern/root/lib/libGui.so
>  0x40eb6a87 in TGClient::ProcessOneEvent() + 0x73 from
> /home/michal/cern/root/lib/libGui.so
>  0x40eb6b0d in TGClient::HandleInput() + 0x25 from
> /home/michal/cern/root/lib/libGui.so
>  0x40eb3d36 in TGInputHandler::Notify() + 0x1e from
> /home/michal/cern/root/lib/libGui.so
>  0x401a326c in TUnixSystem::DispatchOneEvent(bool) + 0x384 from
> /home/michal/cern/root/lib/libCore.so
>  0x40126c67 in TSystem::InnerLoop() + 0x1b from
> /home/michal/cern/root/lib/libCore.so
>  0x40126c00 in TSystem::Run() + 0x78 from
> /home/michal/cern/root/lib/libCore.so
>  0x400dc6e9 in TApplication::Run(bool) + 0x2d from
> /home/michal/cern/root/lib/libCore.so
>  0x0804e085 in main + 0x69 from ./MyMain
>  0x420156a4 in __libc_start_main + 0xe4 from /lib/tls/libc.so.6
>  0x0804df8d in TGMainFrame::RemoveBind(TGWindow const*, int, int) const +
> 0x31 from ./MyMain
> menu popped up
> menu popped down
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET