Text archives Help
- From: Ramón Casero Cañas <ramon.casero@comlab.ox.ac.uk>
- To: seg3d@sci.utah.edu
- Subject: [Seg3D] Re: Re: trying to create a new GUI Tool for Seg3D
- Date: Tue, 15 Sep 2009 21:36:40 +0100
Kristen Zygmunt wrote:
Ramon,
I was able to get your code working with the following process:
1) In DialogBlocks, edit the test window to uncheck the wxDIALOG_MODAL
style property
2) Have DialogBlocks generate a test.xrc file for the test panel.
3) Copy all of the object tags from test.xrc into data/Seg3D.xrc (I did
this at the end of the file just before the closing resource tag).
4) part of the build process is to copy this file into the bin/data
directory. Either rebuild, or manually copy Seg3D.xrc to the bin/data
directory
5) Try running.
I think the error was occurring because the modal dialog style was
enabled, so you should be able to just uncheck the wxDIALOG_MODAL
property and then regenerate the Seg3D.xrc directly. However, this did
not work for me. Either I am doing something wrong in DialogBlocks or
there is something wrong with the Seg3D.pjd file in the repository.
Hi Kristen,
Thanks for your email, but it is still crashing when I try to run the
application.
I couldn't see the style options in DialogBlocks, so I had to edit
data/Seg3d.pjd by hand. Then I was able to see the wxDIALOG_MODAL style
option in DialogBlocks.
In any case, I have checked that wxDIALOG_MODAL is set to 0 in the files
themselves.
I also checked that Seg3D.xrc has all the object tags from test.xrc. (I
couldn't create the XRC file directly from DialogBlocks, so I had to
copy and paste the XML from the DialogBlocks GUI).
I rebuilt the code, and Seg3D.xrc is identical to the one in bin/data.
Compilation works fine, but the application crashes with the error
<ERROR>
$ ./Seg3D
Before Create Test
Constructor: before setparent
Constructor: before createcontrols
Before creating controls
Before creating control mSpinner
Before creating control mStart
Before creating control mStopr
After creating controls
Constructor: before getsize
Constructor: before centre
Thread "main" (id: 139947044747296, pid: 13368)
caught signal SIGSEGV at address 0x19 (segmentation violation)
...handle_abort_signals...
niceAbort
Backtrace:
1. ./Seg3D
in SCIRun::handle_abort_signals(int, siginfo*, void*)
2. /lib/libc.so.6 [0x7f47f0e27040]
3. ./Seg3D
in wxWindow::DoSetSize(int, int, int, int, int)
4. ./Seg3D
in wxWindowBase::DoCentre(int)
5. ./Seg3D
in Test::Create(wxWindow*, int, wxPoint const&, wxSize const&, long)
6. ./Seg3D
in Test::Test(wxWindow*, int, wxPoint const&, wxSize const&, long)
7. ./Seg3D
in SCIRun::Seg3DFrame::Seg3DFrame(std::string const&, wxFrame*,
wxString const&, wxPoint const&, wxSize const&, long)
8. ./Seg3D
in Seg3D::OnInit()
9. ./Seg3D
in wxEntry(int&, char**)
a. ./Seg3D(main+0x12) [0x733ba2]
b. /lib/libc.so.6(__libc_start_main+0xe6) [0x7f47f0e125a6]
c. ./Seg3D [0x733a29]
139947044747296:main( RUNNING, List: )
Abort signalled by pid: 13368
Occured for thread: "main"
Exiting
</ERROR>
I am curious which method solves the problem for you.
Also, I noticed that the lines:
EVT_BUTTON(XRCID("START_BUTTON"), Test::OnStartButtonClick)
EVT_BUTTON(XRCID("CLOSE_BUTTON"), Test::OnCloseButtonClick)
are missing from your test.cpp file. This did not cause your current
problem, but will be needed for your buttons to work.
We had those lines in test.cpp. But I think we put them in the wrong
place, so maybe when you regenerated the project in Dialogblocks, they
were overwritten. I just had the same problem.
<test.cpp>
////@begin Test event table entries
EVT_BUTTON( XRCID("START_BUTTON"), Test::OnStartButtonClick )
EVT_BUTTON( XRCID("CLOSE_BUTTON"), Test::OnCloseButtonClick )
////@end Test event table entries
</test.cpp>
I will attach my working version of test.xrc . I am curious if the
version you get from DialogBlocks matches.
Yes, they are identical.
Would it be possible that you tag the version that works for you as a
branch in the subversion repository, so that it can be checked out, and
I'll test it?
Best regards,
Ramon.
--
Ramón Casero Cañas, DPhil
Computational Biology, Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD
tlf +44 (0) 1865 610807
web
http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos
http://www.flickr.com/photos/rcasero/
- [Seg3D] Re: Re: trying to create a new GUI Tool for Seg3D, Ramón Casero Cañas, 09/15/2009
Archive powered by MHonArc 2.6.16.