Michael Goffioul wrote:
> On Wed, Jun 29, 2011 at 6:08 PM, Philip Nienhuis<pr.nienh...@hccnet.nl>  
> wrote:
>>> On Wed, Jun 29, 2011 at 5:18 PM, Michael Goffioul
>>> <michael.goffi...@gmail.com>    wrote:
:
<long snip>
:
>
> I took another look and I don't think the "dispatch" warning is
> related. The dispatch is/was
> used to change the implementation of standard octave functions when
> called with a COM
> object. For instance, calling get(obj, ...) would result in
> com_get(obj, ...) being called. The
> same for set, invoke, delete...
> OTOH the error you're seeing is a subsref problem, as used with syntax
> like obj.something.
> (Note also that the DISPATCH_METHOD and similar are related to Win32
> COM automation,
> it's different from the dispatch mechanism from octave).
>
> To debug, you'd need an octave version compiled with debug enabled.
> Then I guess the
> easiest would be to put a breakpoint on the error() function from
> octave (see error.cc)
> and dump a backtrace to see where it's coming from.

OK, thanks to Tatsuro's work I now have a debug-enabled Octave.

Here's a backtrace + some initialization.
This is all a bit beyond me, I hope you can make something of it:

#=================================================================
(gdb) b error.cc:495
Breakpoint 2 at 0x65cea882: file error.cc, line 495.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: x:\octave\octave-3.4.2dbg\bin/octave.exe
[New Thread 2408.0xa78]
GNU Octave, version 3.4.2
Copyright (C) 2011 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "i686-pc-mingw32".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.


Breakpoint 2, error (fmt=0x6651ff66 "load: unable to find file %s") at 
error.cc:498
498       va_start (args, fmt);
(gdb) c
Continuing.
warning: dispatch is obsolete and will be removed from a future version 
of Octave; please use class
s instead
octave.exe:1> cd C:\Home\Philip\MyDocs\octave\spreadsheet-tst
octave.exe:2> xlapp = actxserver ('Excel.Application')
[New Thread 2408.0x988]
[New Thread 2408.0x4ac]
[New Thread 2408.0xf94]
xlapp =

<COM object _Application (0x0x26c444)>

octave.exe:3> wb = xlapp.Workbooks.Add()

Breakpoint 2, error (fmt=0x66534938 "can't perform indexing operations 
for %s type")
     at error.cc:498
498       va_start (args, fmt);
(gdb) bt
#0  error (fmt=0x66534938 "can't perform indexing operations for %s 
type") at error.cc:498
#1  0x65edfa64 in octave_base_value::subsref (this=0x11bddbc8) at 
ov-base.cc:159
#2  0x65f6986a in octave_value::subsref (this=0x22fa04, type=..., 
idx=..., nargout=1)
     at ov.cc:1199
#3  0x65f6990e in octave_value::subsref (this=0x22fa04, type=..., 
idx=..., nargout=1, lvalue_list=
     0x0) at ov.cc:1212
#4  0x65fa73bb in tree_index_expression::rvalue (this=0x118fb890, 
nargout=1, lvalue_list=0x0)
     at pt-idx.cc:407
#5  0x65fa8fec in tree_index_expression::rvalue (this=0x118fb890, 
nargout=1) at pt-idx.cc:277
#6  0x65fa07a1 in tree_index_expression::rvalue1 (this=0x118fb890, 
nargout=1) at pt-idx.cc:418
#7  0x65f85c1c in _fu2196___ZNSs4_Rep20_S_empty_rep_storageE 
(this=0x11903198) at pt-assign.cc:205
#8  0x65f989ae in tree_evaluator::visit_statement (this=0x666eb72c, 
stmt=...) at pt-eval.cc:737
#9  0x65f92d08 in _fu5396__octave_signal_caught (this=0x666eb72c, 
lst=...) at pt-eval.cc:773
#10 0x65e9ed4c in _fu7868__octave_bad_alloc_hook () at toplev.cc:573
#11 0x65e547b5 in _fu1136___ZNSs4_Rep20_S_empty_rep_storageE (argc=1, 
argv=0x114f0da8, embedded=0)
     at octave.cc:935
#12 0x004013e8 in main (argc=1, argv=0x114f0da8) at main.c:35
(gdb)
#=====================================================================

Also interesting:

#==============================================
octave.exe:5> class (xlapp)
ans = octave_com_object
octave.exe:6> methods ("octave_com_object")
Methods for class octave_com_object:

                          <= Empty

octave.exe:7> methods (xlapp)

Breakpoint 2, error (fmt=0x665362c8 "methods: expecting object or class 
name as argument")
     at error.cc:498
498       va_start (args, fmt);
(gdb)
#==============================================

With my limited C++/Octave internals knowledge I surmisee that the 
object-oriƫnted stuff is somehow broken.

What can I do next to get further?

Thanks,

Philip

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to