-
-
Notifications
You must be signed in to change notification settings - Fork 7k
JSSC with Windows 10 (64 bit) and Java 9 #6788
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
Comments
Hi @wholder , |
Update: 11-8-2017 Since posting this I have discovered that the issue is more complex than I first thought. The "fixed" code I attached below was built using a 30 day trial version of Visual Studio and was compiled in x64 DEBUG mode and seemed to work. However, when I deinstalled Visual Studio when the 30 day trial period was over, I found that my code would no longer work. Eventually, I discovered a tool called Dependency Walker that let me analyze the DLLs that my revised jSSC-2.8_x86_64.dll relied on and found it needed these other DLLs and, in turn, these DLLs seem to depend on other DLLs that are missing in Windows 10 (and too numerous to list):
I then ran Dependency Walker on the original jSSC-2.8_x86_64.dll file and it reported these DLLs which, as above, each depend on other DLLs that are not available in Windows 10:
Based on this, I now think a proper fix will require eliminating the need for DLLs that are no longer available in Windows 10. Wayne I've managed to create what I think is a reasonably good fix for the problem. It boils down to the way memory was being allocated on the stack in the C++ functions Caveat: I found it rather difficult to test my changes to the DLL file as it seem like it would get cached in some cases and I could myself testing what I thought was new code only to find windows using the prior version. To detect this. I would temporarily change the value of the Wayne |
I apologize for posting here as it's not entirely related to Arduino, but I have a bootloader that is written in Java that is using jssc and crashes on Windows 10. @wholder, I tried your method of rebuilding with the modified EDIT: I found your issue on the java-simple-serial-connector project. I'll redirect my attention there. |
I just replied to your post in the JSSC Wiki, but here what I said:
I only compiled the 64 bit DLL and, compiling it in debug mode, it came out
to be 81.5Kb. If you'd like to try my jssc.jar file, it's posted as part of
a project I have posted on Github. The links is:
https://github.com/wholder/LaserCut
You'll find my modified jssc.jar file in the lib folder.
Wayne
…On Mon, Oct 9, 2017 at 11:15 AM, Alex Stout ***@***.***> wrote:
I apologize for posting here as it's not entirely related to Arduino, but
I have a bootloader that is written in Java that is using jssc and crashes
on Windows 10. @wholder <https://github.com/wholder>, I tried your method
of rebuilding with the modified jssc.c++ in Visual Studio (VS). The build
was successful, but I am concerned the resulting dll is missing a lot of
data because the original jssc-2.8.0.jar windows dll files were 66KB for
the x86 version and 120KB for the x86_64 version and after I built them in
VS they were 8KB and 9.5KB respectively. I tried inserting them into the
.jar anyway but it the result was the same, the JVM crashes. Did your dll
builds turn out any larger than mine? Would you be willing zip up your
resulting dlls and/or the whole jssc-2.8.0.jar and providing those?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6788 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABA2ciFjBVgEvWMonuNBkHZexO_cY_Rhks5sqmK-gaJpZM4PrewP>
.
|
FYI, myself and another Java developer forked the JSSC codebase and released a build system as well as updated binaries. Minus some minor changes for MSVC compat (as well as scripting the version info into the header), you should find the C code to be identical to the official 2.8 release. The Java code has changed a bit to accommodate attempts to use a standardized technique to load the native libs (the portion of the code that locates It's running in CI so others can reproduce the build environment locally. Unit tests are incomplete, but the Java and C builds are now documented and live. Lastly, there are a few platforms that we've dropped support for (ARM soft float and legacy 32-bit/PPC macOS being the most notable) due to a decision to simplify the build system. Due to some fundamental disagreements with the author of JSSC, our changes are to remain in a fork for the foreseeable future. I wanted to share here for those that could benefit from it. We've documented all of our tricks to get the |
I'm posting this as a possible "heads up" for a potential future problem for the Arduino IDE. I use JSSC for serial I/O with Java and some time back Arduino switched to JSSC (from RXTX) for its serial I/O, so I think a problem I just started having with JSSC on Windows 10 (64 bit) with the new Java 9 release may potentially be an issue for the Arduino IDE in the future. For details, see the JSSC wiki entry I posted here:
https://github.com/scream3r/java-simple-serial-connector/issues/116
I've included some simple Java test code in the wiki entry that demonstrates the problem but, basically, a call to
openPort()
to open a serial connection just completely crashes the JVM. I'm not an expert at reading Windows stack traces, but I think the issue my result from this call:DCB *dcb = new DCB();
in
Java_jssc_SerialNativeInterface_openPort()
.Wayne
The text was updated successfully, but these errors were encountered: