const_iterator i = elts.begin ();
i != elts.end ();
i++)
do_append (*i, warn);
// Restore add hook and execute for all newly added directories.
unwind_protect::run ();
for (dir_info_list_iterator i = dir_info_list.begin ();
i != dir_info_list.end ();
i++)
{
if (add_hook)
add_hook (i->dir_name);
}
}
Generates an exception at add_hook(i->dir_name). It seems to make it through the first 3 directories (dir_name)
0) .
1) C:\NEWMSVC\Share\Octave\site\m
2) C:\NEWMSVC\Share\Octave\site\m\Startup
3) C:\NEWMSVC\libexec\Octave\3.0.0+\oct\i686-pc-msvc with as the dir_name add_hook(i->dir_name) generates exception
These paths do exist in my Octave installation on the PC
Anyways, it descends into execute_pkg_add_or_del and then descends to parse.y (one of JWE's update files) for directory (3) case:
void
source_file (const std::string& file_name, const std::string& context,
bool verbose, bool require_file, const std::string& warn_for)
{
std::string file_full_name = file_ops::tilde_expand (file_name);
unwind_protect::begin_frame ("source_file");
unwind_protect_str (curr_fcn_file_name);
unwind_protect_str (curr_fcn_file_full_name);
curr_fcn_file_name = file_name;
curr_fcn_file_full_name = file_full_name;
if (! context.empty ())
{
if (context == "caller")
octave_call_stack::goto_caller_frame ();
else if (context == "base")
octave_call_stack::goto_base_frame ();
else
error ("source: context must be \"caller\" or \"base\"");
if (! error_state)
unwind_protect::add (octave_call_stack::unwind_pop);
}
if (! error_state)
{
octave_function *fcn = parse_fcn_fil
Context = "base" so the code descends to toplev.h:
static void goto_base_frame (void)
{
if (instance_ok ())
instance->do_goto_base_frame ();
}
Which descends to
static bool instance_ok (void)
{
bool retval = true;
if (! instance)
instance = new octave_call_stack ();
Which descends to Microsofts new.cpp:
operator new function .....
It successfully allocates the memory.
Then the following:
octave_call_stack::do_goto_base_frame (void)
{
call_stack_elt tmp (cs[0]);
tmp.prev = curr_frame;
curr_frame = cs.size ();
cs.push_back (tmp);
symbol_table::set_scope_and_context (tmp.scope, tmp.context);
}
It breaks after call_stack_elt tmp (cs[0]); which calls deque
I am not sure what is wrong - any hints are appreciated.
Fred