-
Notifications
You must be signed in to change notification settings - Fork 14
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
Apparent error in string conversion #10
Comments
(also: I noticed that java booleans seem to be the opposite from the ones in rust: Passing the java value |
Also, I'm getting a similar error when calling a java function that takes an Integer array as input. When converting the corresponding |
Unfortunately I can't check the code right now, I'll get back to you later this week. From the stack trace it seems that it's the string conversion that fails from Rust as you suggested.
🤦 Right here. To get to 1.0 I'm going to need an extensive test suite, that's for sure. Could you provide a minimal example? Or try switching to a different |
Hi, I'm really sorry I can't be more informative. The string bug I tried to narrow down to something simpler, but in all my toy examples it worked - only in the actual setting where I needed it to work did it not, and I have no idea what was different (the strings were definitely equal on an as_bytes()-level). So all I can say is that it's not a specific string that caused the problem, and in the setting where it happened, it seemed to happen with every string. |
This is definitely related to signature parsing in jni-rs |
@Jazzpirate I know it's been a while since you posted this, but can you provide a full traceback of the failed string conversion? Or a link to the whole project, if it's possible. |
BTW, can't a pending exception be the case? |
Hi, I appreciate you looking into this, but I unfortunately can't be of much help (anymore). I never pushed the code anywhere since I couldn't get it to work, and I switched to jni-rs directly soon after... |
But may be you can remember if it's possible that you had a java exception thrown before you call |
Hmm, I'm fairly certain I didn't - the idea is that I wrote a TeX-to-HTML converter in rust, which I want to use from java and use functions such as the one sketched above to pass output messages back. So all the java code did was basically something like |
I have a struct with
...but when calling this function, I get an Error:
...which looks to me like a bug in the string conversion to java. It's difficult to find the precise cause, since I can't set break points in rust when running the program from java (or, actually, Scala, but that shouldn't make a difference).
Any help would be very much appreciated :)
The text was updated successfully, but these errors were encountered: