OK, I have come up with a way to reproduce this. This is a simplified
version of a program started to fail, and when I try to )SIC after the
error, I get the error.
To reproduce, first define the following operator:
∇(OP rep) N;ct
ct←0
Lnext:
→(ct=N)/0
⊣OP ⎕IO+ct
ct←ct+1
→Lnext
∇
Then, define some dummy values:
* next ← {⍵}*
* V←1*
Then run the following:
*{disp ← '.#'[⎕IO+V←next V ⊣ ⎕DL ÷20]} rep 10*
SYNTAX ERROR
rep[1] ct←0
^
Run )SIC to clear the stack and try again:
*)SIC*
{disp ← '.#'[⎕IO+V←next V ⊣ ⎕DL ÷20]} rep 10
SYNTAX ERROR
rep[1] ct←0
^
Finally, run )SIC again, and the error is seen:
*)SIC*
==============================================================================
Assertion failed: value_stack.size()
in Function: pop
in file: Symbol.cc:312
Call stack:
----------------------------------------
-- Stack trace at Symbol.cc:312
----------------------------------------
0x7f9212d3aec5 __libc_start_main
0x4db91d main
0x5816e8 Workspace::immediate_execution(bool)
0x4b3747 Command::process_line()
0x4b37f6 Command::process_line(UCS_string&)
0x4b3ee0 Command::do_APL_command(std::ostream&, UCS_string&)
0x583c1d Workspace::clear_SI(std::ostream&)
0x581597 Workspace::pop_SI(char const*)
0x53c37b StateIndicator::~StateIndicator()
0x53e87c UserFunction::pop_local_vars() const
0x56bfdd UserFunction_header::pop_local_vars() const
0x54cb3c Symbol::pop()
0x49181e do_Assert(char const*, char const*, char const*, int)
========================================
SI stack:
Depth: 0
Exec: 0x27f5080
Safe ex: no
Pmode: ◊ {disp ← '.#'[⎕IO+V←next V ⊣ ⎕DL ÷20]} rep 10
PC: 3 ENDL
Stat: {disp ← '.#'[⎕IO+V←next V ⊣ ⎕DL ÷20]} rep 10
err_code: 0x0
thrown: at StateIndicator.cc:41
e_msg_1: 'No Error'
e_msg_2: ''
e_msg_3: ''
==============================================================================
*** immediate_execution() caught other exception ***
Regards,
Elias
On 17 August 2014 23:47, Elias Mårtenson <[email protected]> wrote:
> I have a consistent error when recompiling a function from Emacs. I'm
> working on a simple way of reproducing it, but in the meantime here is the
> error output in case it's enough:
>
>
> ==============================================================================
> Assertion failed: value_stack.size()
> in Function: pop
> in file: Symbol.cc:312
>
> Call stack:
>
> ----------------------------------------
> -- Stack trace at Symbol.cc:312
> ----------------------------------------
> 0x7fe3f5cf2182
> 0x7fe3e0d72d44 connection_loop(void*)
> 0x7fe3e0d75ecc NetworkConnection::run()
> 0x7fe3e0d75d61 NetworkConnection::process_command(std::string const&)
> 0x7fe3e0d79e4f SicCommand::run_command(NetworkConnection&,
> std::vector<std::string, std::allocator<std::string> > const&)
> 0x583c1d Workspace::clear_SI(std::ostream&)
> 0x581597 Workspace::pop_SI(char const*)
> 0x53c37b StateIndicator::~StateIndicator()
> 0x53e87c UserFunction::pop_local_vars() const
> 0x56bfdd UserFunction_header::pop_local_vars() const
> 0x54cb3c Symbol::pop()
> 0x49181e do_Assert(char const*, char const*, char const*, int)
> ========================================
>
> SI stack:
>
> Depth: 0
> Exec: 0x201d420
> Safe ex: no
> Pmode: ◊ {disp ← '.#'[⎕IO+V←next V ⊣ ⎕DL ÷20]} rep 10
> PC: 3 ENDL
> Stat: {disp ← '.#'[⎕IO+V←next V ⊣ ⎕DL ÷20]} rep 10
> err_code: 0x0
> thrown: at StateIndicator.cc:41
> e_msg_1: 'No Error'
> e_msg_2: ''
> e_msg_3: ''
>
> Regards,
> Elias
>