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

MoarVM Panic Running Example 18, Cairo Draw Handler #85

Closed
tsalada opened this issue Sep 19, 2018 · 3 comments
Closed

MoarVM Panic Running Example 18, Cairo Draw Handler #85

tsalada opened this issue Sep 19, 2018 · 3 comments

Comments

@tsalada
Copy link

tsalada commented Sep 19, 2018

I'm trying to run example 18, the Cairo Draw Handler, from the GTK::Simple module on Ubuntu 18.04 using Rakudo Star version 2018.06 built on MoarVM version 2018.06 implementing Perl 6.c.
I get the following error message.
MoarVM panic: Internal error: Unwound entire stack and missed handler

@jnthn
Copy link

jnthn commented Sep 19, 2018

I don't know about the example in question (which would want fixing), but the error pretty much always means that a callback leaked an exception, and since an exception cannot be thrown into C code on the callstack, it panics.

@jonathanstowe
Copy link
Contributor

Hi,
it is indeed as @jnthn says. The actual reason is that if the Cairo module isn't installed, the attempt to require it fails silently leaving some variables undefined that are subsequently used in the add-draw-handler callback wrapper, thus causing an exception in the callback.

Assuming you already have the cairo libraries installed on your computer then:

zef install Cairo

will fix.

If I get a minute today I'll fix the gtk_simple_use_cairo so that it doesn't just blunder on if Cairo isn't installed.

@jonathanstowe
Copy link
Contributor

It took a little more time to get around to it than I expected but I have put in a simple fix to avoid the condition whereby the MoarVM panic is triggered.

There may be a more refined solution possible, but this should stop this being a problem.

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

3 participants