octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: uimenu implementation, 2nd version [octave_execution_exception]


From: Ben Abbott
Subject: Re: uimenu implementation, 2nd version [octave_execution_exception]
Date: Fri, 29 Oct 2010 16:11:46 +0800

On Oct 29, 2010, at 3:16 PM, Kai Habel wrote:

> Am 27.10.2010 09:56, schrieb Ben Abbott:
> 
> Ben,
> 
> I don't think the error is related to the call of error (msg). Can you check 
> this, by commenting out this line or placing an input('press enter') before 
> this line.

You are correct. When I comment out this line, the crash still occurs.

> I think the FLTK-GUI runs in "parallel" and is catching an mouse event.
> 
> When looking at the backtrace, I see that  at #18 plot_window::handle() is 
> called with event==1 (FL_PUSH?) and after that plot_window::pixel2axes_or_ca 
> (this=0x19123970, px=35,py=52). This looks like valid pixel coordinates. Can 
> you confirm that the error happens during pixel2axes_or_ca. That should be 
> possible with a debugger, or you can place some debug statements in there 
> e.g. printf("before\n"); printf("after\n"); 
> 
> The crash seems to happen later in:
> #14 0x001ccadd in screen_size_pixels () at graphics.cc:541
> 
> where we have
> 
> #13 0x017b67ea in Matrix::extract_n (this=0xbfff85e8, r1=0, c1=2, nr=1, nc=2)
> 
> ----------graphics.cc-----------
> // This function always returns the screensize in pixels
> 
> static Matrix
> screen_size_pixels (void)
> {
>   graphics_object obj = gh_manager::get_object (0);
>   Matrix sz = obj.get ("screensize").matrix_value ();
>   return convert_position (sz, obj.get ("units").string_value (), "pixels", 
> sz.extract_n (0, 2, 1, 2)).extract_n (0, 2, 1, 2);
> }
> -------------------------------------------------
> 
> It seems convert_position() is never called, because one of those 
> xxx.extract_n() calls fail.
> 
> Can you check there if all variables are ok there?
> 
> Kai

I'm a c++ flunky. It may be necessary for  you give me the commands I need to 
check the variables are ok.

I realize I should start with ...

        break graphics.cc:541

... which stops at "return convert_position (...)"

Is it enough to then to ..

        print sz

Which gives ..

$1 = {
    <Array<double>> = {
      rep = 0x2d6b7e0, 
      dimensions = {
        rep = 0x2d7c6c8
      }, 
      slice_data = 0x4955440, 
      slice_len = 4
    }, <No data fields>}, <No data fields>}

I can "continue" several times until the plot window appears with the uimenu, 
but then I'm unable to select the "clf" option since I have to go back to the 
command line and type "continue" again... hmm, I'm not being very clear. 
Hopefully you understand my problem with the debugger.

Is the a c++ command I can insert into the code to print the contents of "sz" 
to the command liine?

Ben


reply via email to

[Prev in Thread] Current Thread [Next in Thread]