-
Notifications
You must be signed in to change notification settings - Fork 13
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
[jvm] ExceptionInInitializerError #27
Comments
This looks like a bug in the JVM target itself and you would need to report it directly at https://github.com/HaxeFoundation/haxe/issues. Does it work with the Java target? |
The java target is deprecated and my project can't compile with it. |
This is the issue that I opened on the haxe project. |
@acarioni can you give me a code example where the compilation fails. I am somehow not able to reproduce it. The following compiles fine for me when using the jvm target. import hx.concurrent.executor.Executor;
class Test {
static final executor = Executor.create(2);
public static function main() {
executor.submit(function() {
trace("hi");
}, FIXED_RATE(100));
}
} |
I tried hard to reproduce the issue by means of a simple example but unfortunately I wasn’t able. However I can reproduce it systematically when I compile my open source project. |
If you locally modify the ThreadPool.hx file and replace the occurrences of |
I replaced the (only) occurrence of |
Ok, then I am out of ideas. I hoped by adding the return type explicitly it may help the Haxe compiler to generate code that is compatible with the java Runnable interface. Then we have to wait that the upstream issue you reported gets resolved directly by the haxe team |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If the issue is still valid, please add a respective comment to prevent this issue from being closed automatically. Thank you for your contributions. |
When I run my tests with haxe-concurrent 5.1.3 and haxe 4.3.1, I get the following error. However if I compile the same tests with haxe 4.3-rc.1, they work fine.
Unfortunately I am not able to reproduce the error by means of a simple test, but the basic execution flow is trivial: I create an instance of Executor in a static variable and, when I try to call the method submit on it from the method Test.delay, the exception ExceptionInInitializerError is thrown.
The text was updated successfully, but these errors were encountered: