Paste: Bug?

Author: XZentus
Mode: factor
Date: Mon, 13 Nov 2017 14:04:55
Plain Text |
Directory does not exist/not enough permissions
You have triggered a bug in Factor. Please report.
critical_error: The die word was called by the library.: 0
Starting low level debugger...
Basic commands:
  q ^Z             -- quit Factor
  c                -- continue executing Factor - NOT SAFE
  t                -- throw exception in Factor - NOT SAFE
  .s .r .c         -- print data, retain, call stacks
  help             -- full help, including advanced commands

> .s
==== DATA STACK:
"б╕┴┬╡╝╡ ╜╡ ├┤░╡┬┴╧ ╜░╣┬╕ ├║░╖░╜╜╦╣ ┐├┬╠."
T{ threads:thread "Initial" [ ] [ ] 11 T{ boxes:box f f } f syntax:t f T{ hashtables:hashtable 0 0 { T{ hashtables.priva
te:tombstone f } T{ hashtables.private:tombstone f } T{ hashtables.private:tombstone f } T{ hashtables.private:tombstone
 f } } } f }
> .c
==== CALL STACK:

frame: 00000077FFD00E48 size 64
executing: kernel:die
scan: 1
word/quot addr: 778023808c
word/quot xt: 778cede060
return address: 778cede091

frame: 00000077FFD00E88 size 64
executing: [ kernel:die kernel:drop continuations:rethrow ]
scan: 0
word/quot addr: 7780d596b4
word/quot xt: 778d3fec80
return address: 778d3fec8f

frame: 00000077FFD00EC8 size 48
executing: object=>error-in-thread
scan: -1
word/quot addr: 77800679bc
word/quot xt: 778d3c4e10
return address: 778d3c4f08

frame: 00000077FFD00EF8 size 48
executing: continuations:rethrow
scan: -1
word/quot addr: 778006b4cc
word/quot xt: 778d3c8550
return address: 778d3c869d

frame: 00000077FFD00F28 size 48
executing: ls:ls-run
scan: -1
word/quot addr: 778218747c
word/quot xt: 778d3bbcc0
return address: 778d3bbe9f

frame: 00000077FFD00F58 size 64
executing: [ init:boot T{ hashtables:hashtable 0 0 { T{ hashtables.private:tombstone f } T{ hashtables.private:tombstone
 f } T{ hashtables.private:tombstone f } T{ hashtables.private:tombstone f } } } kernel:clone alien.private:callbacks na
mespaces:set-global T{ hash-sets:hash-set 0 0 { T{ hashtables.private:tombstone f } T{ hashtables.private:tombstone f }
} } kernel:clone destructors:disposables namespaces:set-global T{ vectors:vector { } 0 }... ]
scan: 62
word/quot addr: 77821dd764
word/quot xt: 778d3fe230
return address: 778d3fe405

frame: 00000077FFD00F98 size 64
executing: kernel.private:c-to-factor
scan: 1
word/quot addr: 77800fa41c
word/quot xt: 778ceec610
return address: 778ceec634
> .r
==== RETAIN STACK:
> g
Nursery   : [000000778C840000 -> 000000778CA40000]    2097152 bytes
Aging     : [000000778C040000 -> 000000778C440000]    4194304 bytes
Tenured   : [0000007780040000 -> 000000778C040000]  201326592 bytes
Cards     : [00000077FE2F1740 -> 00000077FE3BBB40]     828416 bytes

Contexts:

  Active:
  Datastack   : [00000077FFB61000 -> 00000077FFBA1000]     262144 bytes
  Retainstack : [00000077FFBB1000 -> 00000077FFBF1000]     262144 bytes
  Callstack   : [00000077FFC01000 -> 00000077FFD01000]    1048576 bytes

  Datastack   : [00000077911F1000 -> 0000007791231000]     262144 bytes
  Retainstack : [0000007791241000 -> 0000007791281000]     262144 bytes
  Callstack   : [0000007791291000 -> 0000007791391000]    1048576 bytes


source:

! Copyright (C) 2017 Your name.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors command-line io io.directories io.files.types
    kernel namespaces sequences continuations ;
IN: ls

<PRIVATE

: list-files-dirs ( path -- files dirs )
    directory-entries [ type>> +regular-file+ = ] partition ;

: pprint-names ( seq str -- )
    write [ name>> write nl ] each ;

: check-args ( -- arg )
    [ command-line get first ]
    [ drop "No args passed, using current path\n" write "." ] recover ;

PRIVATE>

: ls ( path -- )
    list-files-dirs
    "DIRECTORIES:\n----------------\n" pprint-names
    "\nFILES:\n----------------\n"     pprint-names ;

: ls-run ( -- )
    check-args [ ls ] [ ] [ drop "Directory does not exist/not enough permissions\n" write ] cleanup ;

MAIN: ls-run

New Annotation

Summary:
Author:
Mode:
Body: