help-octave
[Top][All Lists]
Advanced

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

Re: Dynamic Extension & Bus error


From: Daniel Eggert
Subject: Re: Dynamic Extension & Bus error
Date: Wed, 22 Apr 2009 11:37:10 -0700


On Apr 22, 2009, at 10:31 AM, Thomas Treichl wrote:

Daniel Eggert schrieb:
I'm trying to create my own dynamic extension, but it won't run:
> sushi
panic: Bus error -- stopping myself...
The code looks like:
#include <octave/oct.h>
DEFUN_DLD(sushi,
                  args,
                  nargout,
                  "[...] = sushi (...)\n")
{
        return octave_value(1);
}
The back trace looks like this:
0 liboctave.dylib 0x01afafc6 Array<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::operator=(Array<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&) + 38 1 liboctinterp.dylib 0x00f4ad9c octave_builtin::do_multi_index_op(int, octave_value_list const&) + 284 2 liboctinterp.dylib 0x00f337d9 octave_value::do_multi_index_op(int, octave_value_list const&) + 41 3 liboctinterp.dylib 0x0106f071 tree_identifier::rvalue(int) + 1409 4 liboctinterp.dylib 0x010933c7 tree_statement::eval (bool, int, bool) + 343 5 liboctinterp.dylib 0x01093770 tree_statement_list::eval(bool, int) + 176
6   liboctinterp.dylib                  0x00e9ecb3 main_loop() + 163
7   liboctinterp.dylib                  0x00e41f71 octave_main + 3361
8   octave-3.0.5                        0x00004d80 main + 32
9   octave-3.0.5                        0x000046e2 _start + 216
10  octave-3.0.5                        0x00004609 start + 41
Any thoughts?

I think that you need to provide some more information about what you are doing, which OSX and hardware platform you are using, where you got your Octave from, etc. Try calling "bug_report" in Octave to see what else is very useful for us. All this because I cannot reproduce the problem with my 3.0.5 binary:

$ ~/bin/Octave.app.3.0.5/Octave.app/Contents/Resources/bin/ mkoctfile sushi.cc
 $ ~/bin/Octave.app.3.0.5/Octave.app/Contents/Resources/bin/octave -q
 octave-3.0.5:1> sushi
 ans =  1

Best regards,

 Thomas

Ok. I wasn't compiling with mkoctfile, because I need to link to other things, and mkoctfile is not flexible enough for that. So I was querying "mkoctfile -p" for the flags and then compiling from within Xcode.

I can't figure out why I get a bug error this way, though.

/Daniel





reply via email to

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