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

Calling $object.can from within PRE causes STORE to Nil error under some circumstances #4234

Open
p6rt opened this issue May 11, 2015 · 12 comments

Comments

@p6rt
Copy link

p6rt commented May 11, 2015

Migrated from rt.perl.org#125154 (status was 'new')

Searchable as RT125154$

@p6rt
Copy link
Author

p6rt commented May 11, 2015

From @hoelzro

Two example files that trigger the problem are attached.

@p6rt
Copy link
Author

p6rt commented May 11, 2015

From @hoelzro

pre-nil-2.p6

@p6rt
Copy link
Author

p6rt commented May 11, 2015

From @hoelzro

pre-nil.p6

@p6rt
Copy link
Author

p6rt commented May 11, 2015

From @hoelzro

On Mon May 11 13​:18​:18 2015, rob@​hoelz.ro wrote​:

Two example files that trigger the problem are attached.

Calling any method on self actually triggers this; not just .can.

@p6rt
Copy link
Author

p6rt commented May 11, 2015

From @hoelzro

On Mon May 11 13​:18​:18 2015, rob@​hoelz.ro wrote​:

Two example files that trigger the problem are attached.

Also, it seems to be related to use of callsame.

@p6rt
Copy link
Author

p6rt commented May 11, 2015

From @hoelzro

On Mon May 11 13​:27​:23 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:18​:18 2015, rob@​hoelz.ro wrote​:

Two example files that trigger the problem are attached.

Also, it seems to be related to use of callsame.

I think that $*DISPATCHER.exhausted is misreporting, and that this is related to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125135.

@p6rt
Copy link
Author

p6rt commented May 11, 2015

From @hoelzro

On Mon May 11 13​:34​:36 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:27​:23 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:18​:18 2015, rob@​hoelz.ro wrote​:

Two example files that trigger the problem are attached.

Also, it seems to be related to use of callsame.

I think that $*DISPATCHER.exhausted is misreporting, and that this is
related to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125135.

Ok, so the similarity is skin deep; whereas #​125135 has to do with a dispatcher mistakenly being used twice, this issue has to do with something setting the number of candidates to 0.

@p6rt
Copy link
Author

p6rt commented May 11, 2015

From @hoelzro

On Mon May 11 14​:05​:58 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:34​:36 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:27​:23 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:18​:18 2015, rob@​hoelz.ro wrote​:

Two example files that trigger the problem are attached.

Also, it seems to be related to use of callsame.

I think that $*DISPATCHER.exhausted is misreporting, and that this is
related to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125135.

Ok, so the similarity is skin deep; whereas #​125135 has to do with a
dispatcher mistakenly being used twice, this issue has to do with
something setting the number of candidates to 0.

Also happens with ENTER blocks. Doesn't happen if the ENTER/PRE block is wrapped in a do block.

@p6rt
Copy link
Author

p6rt commented May 11, 2015

From @hoelzro

On Mon May 11 14​:09​:27 2015, rob@​hoelz.ro wrote​:

On Mon May 11 14​:05​:58 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:34​:36 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:27​:23 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:18​:18 2015, rob@​hoelz.ro wrote​:

Two example files that trigger the problem are attached.

Also, it seems to be related to use of callsame.

I think that $*DISPATCHER.exhausted is misreporting, and that this
is
related to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125135.

Ok, so the similarity is skin deep; whereas #​125135 has to do with a
dispatcher mistakenly being used twice, this issue has to do with
something setting the number of candidates to 0.

Also happens with ENTER blocks. Doesn't happen if the ENTER/PRE block
is wrapped in a do block.

Even just calling say() in a PRE block triggers this problem.

@p6rt
Copy link
Author

p6rt commented May 12, 2015

From @hoelzro

On Mon May 11 14​:18​:02 2015, rob@​hoelz.ro wrote​:

On Mon May 11 14​:09​:27 2015, rob@​hoelz.ro wrote​:

On Mon May 11 14​:05​:58 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:34​:36 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:27​:23 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:18​:18 2015, rob@​hoelz.ro wrote​:

Two example files that trigger the problem are attached.

Also, it seems to be related to use of callsame.

I think that $*DISPATCHER.exhausted is misreporting, and that this
is
related to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125135.

Ok, so the similarity is skin deep; whereas #​125135 has to do with a
dispatcher mistakenly being used twice, this issue has to do with
something setting the number of candidates to 0.

Also happens with ENTER blocks. Doesn't happen if the ENTER/PRE block
is wrapped in a do block.

Even just calling say() in a PRE block triggers this problem.

I've discovered that in the case of the method calling .wrap, $*DISPATCHER is replaced with a MethodDispatcher, instead of the normal WrapDispatcher.

@p6rt
Copy link
Author

p6rt commented May 13, 2015

From @hoelzro

On Mon May 11 21​:45​:24 2015, rob@​hoelz.ro wrote​:

On Mon May 11 14​:18​:02 2015, rob@​hoelz.ro wrote​:

On Mon May 11 14​:09​:27 2015, rob@​hoelz.ro wrote​:

On Mon May 11 14​:05​:58 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:34​:36 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:27​:23 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:18​:18 2015, rob@​hoelz.ro wrote​:

Two example files that trigger the problem are attached.

Also, it seems to be related to use of callsame.

I think that $*DISPATCHER.exhausted is misreporting, and that
this
is
related to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125135.

Ok, so the similarity is skin deep; whereas #​125135 has to do
with a
dispatcher mistakenly being used twice, this issue has to do with
something setting the number of candidates to 0.

Also happens with ENTER blocks. Doesn't happen if the ENTER/PRE
block
is wrapped in a do block.

Even just calling say() in a PRE block triggers this problem.

I've discovered that in the case of the method calling .wrap,
$*DISPATCHER is replaced with a MethodDispatcher, instead of the
normal WrapDispatcher.

Apparently 319509a is the culprit (for one of the test files, anyway); I'll reach out to jnthn and see if he has some insights on how to fix this bug without sacrificing performance.

@p6rt
Copy link
Author

p6rt commented May 13, 2015

From @hoelzro

On Tue May 12 18​:59​:38 2015, rob@​hoelz.ro wrote​:

On Mon May 11 21​:45​:24 2015, rob@​hoelz.ro wrote​:

On Mon May 11 14​:18​:02 2015, rob@​hoelz.ro wrote​:

On Mon May 11 14​:09​:27 2015, rob@​hoelz.ro wrote​:

On Mon May 11 14​:05​:58 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:34​:36 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:27​:23 2015, rob@​hoelz.ro wrote​:

On Mon May 11 13​:18​:18 2015, rob@​hoelz.ro wrote​:

Two example files that trigger the problem are attached.

Also, it seems to be related to use of callsame.

I think that $*DISPATCHER.exhausted is misreporting, and that
this
is
related to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125135.

Ok, so the similarity is skin deep; whereas #​125135 has to do
with a
dispatcher mistakenly being used twice, this issue has to do
with
something setting the number of candidates to 0.

Also happens with ENTER blocks. Doesn't happen if the ENTER/PRE
block
is wrapped in a do block.

Even just calling say() in a PRE block triggers this problem.

I've discovered that in the case of the method calling .wrap,
$*DISPATCHER is replaced with a MethodDispatcher, instead of the
normal WrapDispatcher.

Apparently 319509a is the culprit (for one of the test files, anyway);
I'll reach out to jnthn and see if he has some insights on how to fix
this bug without sacrificing performance.

pre-nil-2.p6 is not actually a problem; I forgot to inherit from the base class in that test!

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