Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: unhandled Failure detected in DESTROY #6097

Closed
p6rt opened this issue Feb 25, 2017 · 4 comments
Closed

WARNING: unhandled Failure detected in DESTROY #6097

p6rt opened this issue Feb 25, 2017 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Feb 25, 2017

Migrated from rt.perl.org#130857 (status was 'resolved')

Searchable as RT130857$

@p6rt
Copy link
Author

p6rt commented Feb 25, 2017

From @zoffixznet

The code in Failure.pm has​:

  # "Shouldn't happen." We use note here because the dynamic scope in GC is likely meaningless.
  submethod DESTROY () { if not $!handled { note "WARNING​: unhandled Failure detected in DESTROY​:\n" ~ self.mess } }

However, it does happen with this code​:
  my $matcher = *.so;
  say eager grep $matcher, gather with CORE​:: -> $c {
  with &?BLOCK -> &dig {
  for $c.keys.grep(* ne 'IterationEnd') {
  take $c.{$_};
  $c.{$_}.WHO.keys and dig $c.{$_};
  }
  }
  }

Output​:

  zoffix@​VirtualBox​:~$ perl6 /tmp/z.map.p6
  WARNING​: unhandled Failure detected in DESTROY​:
  Type SocketType does not support associative indexing.
  in block at /tmp/z.map.p6 line 6
  in code at /tmp/z.map.p6 line 3
  in block <unit> at /tmp/z.map.p6 line 2

  WARNING​: unhandled Failure detected in DESTROY​:
  Type PromiseStatus does not support associative indexing.
  in block at /tmp/z.map.p6 line 6
  in code at /tmp/z.map.p6 line 3
  in block <unit> at /tmp/z.map.p6 line 2

  WARNING​: unhandled Failure detected in DESTROY​:
  Type Signal does not support associative indexing.
  in block at /tmp/z.map.p6 line 6
  in code at /tmp/z.map.p6 line 3
  in block <unit> at /tmp/z.map.p6 line 2

  WARNING​: unhandled Failure detected in DESTROY​:
  Type Signal does not support associative indexing.
  in block at /tmp/z.map.p6 line 6
  in code at /tmp/z.map.p6 line 3
  in block <unit> at /tmp/z.map.p6 line 2

  Cannot find method 'keys'​: no method cache and no .^find_method
  in block at /tmp/z.map.p6 line 6
  in code at /tmp/z.map.p6 line 3
  in block <unit> at /tmp/z.map.p6 line 2

  zoffix@​VirtualBox​:~$ perl6 /tmp/z.map.p6
  Cannot find method 'keys'​: no method cache and no .^find_method
  in block at /tmp/z.map.p6 line 6
  in code at /tmp/z.map.p6 line 3
  in block <unit> at /tmp/z.map.p6 line 2

  zoffix@​VirtualBox​:~$

  zoffix@​VirtualBox​:~$ perl6 -v
  This is Rakudo version 2017.02-72-g3de7b08 built on MoarVM version 2017.02-7-g3d85900
  implementing Perl 6.c.
  zoffix@​VirtualBox​:~$

@p6rt
Copy link
Author

p6rt commented Apr 4, 2017

From jarkko@viidakko.fi

I'm also seeing this and it definitely started when I upgraded to 2017.03

Output​:

WARNING​: unhandled Failure detected in DESTROY​:
No such symbol 'Powerline​::Prompt​::Shell​::Bash'
  in block at /home/tojo/Git/perl6-powerline-prompt/examples/powerline-daemon.p6 line 12
  in sub MAIN at /home/tojo/Git/perl6-powerline-prompt/examples/powerline-daemon.p6 line 8
  in block <unit> at /home/tojo/Git/perl6-powerline-prompt/examples/powerline-daemon.p6 line 6

Code​:

https://github.com/7ojo/perl6-powerline-prompt/blob/master/examples/powerline-daemon.p6

Version​:

perl6 -v
This is Rakudo version 2017.03 built on MoarVM version 2017.03
implementing Perl 6.c.

--
best regards, Jarkko

@p6rt
Copy link
Author

p6rt commented Apr 4, 2017

From @zoffixznet

I only now realized what this message actually means /o\

A Failure that neither exploded nor was handled got GCed, potentially indicating an error in user's code due to missed Failures.

I improved the message in rakudo/rakudo@75c3f29100

@p6rt
Copy link
Author

p6rt commented Apr 4, 2017

@zoffixznet - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant