|
From: | Colin Verrilli |
Subject: | Re: [Bug-apl] assertion failure on )load |
Date: | Wed, 5 Nov 2014 21:24:06 -0500 |
Hi,
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
RANK ERROR
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"/>
</Parser>
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"/>
<end-of-file>
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.
Thanks.
Blake
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 )loadI can't )copy it eitherThe previous )save crashed also
This program is free software, and you are welcome to redistribute itaccording to the GNU Public License (GPL) version 3 or later.)load APL2_INTRO
==============================================================================Assertion failed: idx < items_validin Function: operator[]in file: Simple_string.hh:136
Call stack:
------------------------------------------ Stack trace at Simple_string.hh:136----------------------------------------0x43195865 __libc_start_main0x8085ca8 main0x81972f5 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) const0x80837e50x809434a do_Assert(char const*, char const*, char const*, int)========================================
SI stack:
Depth: 0Exec: 0x8b41a48Safe ex: noPmode: ◊ 2 2⊃VPC: 0==============================================================================Assertion failed: idx < items_validin Function: operator[]in file: Simple_string.hh:136
Call stack:*** do_Assert() called recursively ***==============================================================================*** immediate_execution() caught other exception ***
apl2_intro_save_after_error.xml
Description: Text Data
APL2_INTRO_sav.xml
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |