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

redcarpet: Message not supported: TO_NATIVE (UnsupportedMessageException) #1441

Closed
deepj opened this issue Nov 1, 2018 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@deepj
Copy link

deepj commented Nov 1, 2018

Redcarpet is Markdown parser with native code.

After successful installation, this issue is occurred using this short code

require 'redcarpet'
require 'redcarpet/render_strip'

markdown = Redcarpet::Markdown.new(Redcarpet::Render::StripDown)

puts markdown.render("**This** _is_ an [example](http://example.org/).")

The error:

~/.rubies/truffleruby-1.0.0-rc8/lib/truffle/truffle/cext.rb:221:in `execute_without_conversion': Cannot convert LLVMTypedForeignObject+0x0 to LLVMNativePointer (IllegalStateException) (RuntimeError)
	from java.lang.Throwable.<init>(Throwable.java:287)
	from java.lang.Exception.<init>(Exception.java:84)
	from java.lang.RuntimeException.<init>(RuntimeException.java:80)
	from java.lang.IllegalStateException.<init>(IllegalStateException.java:75)
	from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNode$LLVMObjectToNativeNode.transitionToNative(LLVMToNativeNode.java:117)
	from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNodeGen$LLVMObjectToNativeNodeGen.executeAndSpecialize(LLVMToNativeNodeGen.java:301)
	from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNodeGen$LLVMObjectToNativeNodeGen.executeWithTarget(LLVMToNativeNodeGen.java:201)
	from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNode.doOther(LLVMToNativeNode.java:78)
	from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNodeGen.executeAndSpecialize(LLVMToNativeNodeGen.java:129)
	from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNodeGen.executeWithTarget(LLVMToNativeNodeGen.java:50)
Caused by:
Message not supported: TO_NATIVE (UnsupportedMessageException)
	from java.lang.Throwable.<init>(Throwable.java:265)
	from java.lang.Exception.<init>(Exception.java:66)
	from com.oracle.truffle.api.interop.InteropException.<init>(InteropException.java:52)
	from com.oracle.truffle.api.interop.UnsupportedMessageException.<init>(UnsupportedMessageException.java:57)
	from com.oracle.truffle.api.interop.UnsupportedMessageException.raise(UnsupportedMessageException.java:84)
	from org.truffleruby.interop.RubyMessageResolution$ForeignToNativeNode.access(RubyMessageResolution.java:190)
	from org.truffleruby.interop.RubyMessageResolutionForeign$ForeignToNativeSubNode.accessWithTarget(RubyMessageResolutionForeign.java:503)
	from org.truffleruby.interop.RubyMessageResolutionForeignFactory$ForeignToNativeSubNodeGen.executeAndSpecialize(RubyMessageResolutionForeignFactory.java:602)
	from org.truffleruby.interop.RubyMessageResolutionForeignFactory$ForeignToNativeSubNodeGen.executeWithTarget(RubyMessageResolutionForeignFactory.java:588)
	from org.truffleruby.interop.RubyMessageResolutionForeign$ForeignToNativeSubNode$TO_NATIVERootNode.execute(RubyMessageResolutionForeign.java:520)
Translated to internal error
	from ~/.rubies/truffleruby-1.0.0-rc8/lib/truffle/truffle/cext.rb:221:in `execute_with_mutex'
	from ~/.rubies/truffleruby-1.0.0-rc8/lib/truffle/truffle/cext_ruby.rb:36:in `initialize'
	from ~/.rubies/truffleruby-1.0.0-rc8/lib/truffle/truffle/cext.rb:893:in `new'
	from ~/.rubies/truffleruby-1.0.0-rc8/lib/truffle/truffle/cext.rb:893:in `__send__'
	from ~/.rubies/truffleruby-1.0.0-rc8/lib/truffle/truffle/cext.rb:893:in `rb_funcall'
	from ~/.gem/truffleruby/2.4.4/gems/redcarpet-3.4.0/ext/redcarpet/rc_markdown.c:99:in `rb_redcarpet_md__new'
	from ~/.rubies/truffleruby-1.0.0-rc8/lib/truffle/truffle/cext.rb:221:in `execute_without_conversion'
	from ~/.rubies/truffleruby-1.0.0-rc8/lib/truffle/truffle/cext.rb:221:in `execute_with_mutex'
	from ~/.rubies/truffleruby-1.0.0-rc8/lib/truffle/truffle/cext_ruby.rb:36:in `new'
	from redcarpet.rb:4:in `<main>'
@deepj
Copy link
Author

deepj commented Feb 4, 2019

This can be closed. No issue with RC12 @eregon @chrisseaton

@eregon
Copy link
Member

eregon commented Feb 4, 2019

@deepj Great, thanks for confirming it's working :)
This is very helpful as it can take a while to check issues.

@eregon eregon closed this as completed Feb 4, 2019
@eregon eregon added this to the 1.0.0-rc12 milestone Feb 4, 2019
@eregon eregon added the cexts label Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants