[Top][All Lists]

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

Re: [Bug-apl] assertion failure on )load

From: Juergen Sauermann
Subject: Re: [Bug-apl] assertion failure on )load
Date: Wed, 05 Nov 2014 17:36:38 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0


what I can see is that saving of an SI entry fails.
The entry was caused by something like this in immediate execution:

      V←(2 3⍴'HERYOU') (2 2⍴'HEME')
      2 2⊃V
      2 2⊃V
      ^   ^

The problem is that if I )SAVE that then it works fine and and I get

      <Parser assign-pending="0" lookahead-high="2">
        <Token pc="2" tag="4107070F" vid="3"/>
        <Token pc="1" tag="50020907" fun-id="5002"/>
        <Token pc="0" tag="4105070F" vid="2"/>

in my .xml file, which is almost the same as Colin's file except that pc="2" in my case and pc="0" in Colin's file:

      <Parser assign-pending="0" lookahead-high="2">
        <Token pc="0" tag="4105070F" vid="51"/>

The output lines are written with std::endl, which is supposed to also do std::flush. Therefore output buffering
should not matter. I rather suspect that the token at pc="1" was corrupt (also because lookahead-high="2" does
not quite fit to pc="0" in the file).

/// Jürgen

On 11/05/2014 03:44 PM, Blake McBride wrote:
Perhaps the truncation point of the xml file may point towards the )SAVE problem.  Also, perhaps turning off IO buffering during a )SAVE will help make the resulting xml file more indicative of the error on early terminations.

Just some ideas.



On Wed, Nov 5, 2014 at 8:03 AM, Juergen Sauermann <address@hidden> wrote:
Hi Colin,

thanks.  The assertion on )LOAD was caused by the .xml file being truncated.

I have changed the )LOAD command to print a message when it detects a truncated .xml file.
I also changed the )COPY command to deal with truncated .xml files, provided that the truncation
happens late in the file (like in your case). You should now be able to )COPY the broken .xml file, SVN 503.

The root cause - the failed )SAVE - is not fixed yet. For that I would need more information such as
the printout when the )SAVE failed.

/// Jürgen

On 11/05/2014 03:07 AM, Colin Verrilli wrote:
I'm getting this assertion failure on a workspace )load
I can't )copy it either
The previous )save crashed also

  This program is free software, and you are welcome to redistribute it
         according to the GNU Public License (GPL) version 3 or later.
      )load APL2_INTRO

Assertion failed: idx < items_valid
in Function:      operator[]
in file:          Simple_string.hh:136

Call stack:

-- Stack trace at Simple_string.hh:136
0x43195865 __libc_start_main
0x8085ca8  main
0x81972f5   Workspace::immediate_execution(bool)
0x80ca008    Command::process_line()
0x80c9f28     Command::process_line(UCS_string&)
0x80c979f      Command::do_APL_command(std::ostream&, UCS_string&)
0x819a759       Workspace::load_WS(std::ostream&, std::vector<UCS_string, std::allocator<UCS_string> > const&, UCS_string&)
0x8091dc8        XML_Loading_Archive::read_Workspace()
0x808efcc         XML_Loading_Archive::read_StateIndicator()
0x808e9e8          XML_Loading_Archive::read_Parsers(StateIndicator&)
0x80d297e           throw_apl_error(ErrorCode, char const*)
0x8151835            StateIndicator::update_error_info(Error&)
0x80d3f96             Executable::set_error_info(Error&, Function_PC2) const
0x809434a               do_Assert(char const*, char const*, char const*, int)

SI stack:

Depth:    0
Exec:     0x8b41a48
Safe ex:  no
Pmode:    ◊  2 2⊃V
PC:       0
Assertion failed: idx < items_valid
in Function:      operator[]
in file:          Simple_string.hh:136

Call stack:
*** do_Assert() called recursively ***
*** immediate_execution() caught other exception ***

reply via email to

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