

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
2 messages in net.java.dev.jna.usersFwd: JNA: Modulo by Zero in Structure| From | Sent On | Attachments |
|---|---|---|
| Timothy Wall | Feb 13, 2008 11:44 am | |
| Timothy Wall | Feb 14, 2008 7:55 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Fwd: JNA: Modulo by Zero in Structure | Actions... |
|---|---|---|
| From: | Timothy Wall (twal...@dev.java.net) | |
| Date: | Feb 14, 2008 7:55:57 am | |
| List: | net.java.dev.jna.users | |
Begin forwarded message:
From: "Nikolas Lotz" <nlo...@nde.ag> Subject: Re: JNA: Modulo by Zero in Structure
Field alignments will always be greater than or equal to "1"; I don't know how you would get a zero. Please put together a JUnit test which exhibits the error.
i guess putting together a JUnit-Test will be pretty hard: i found out, that the exception only occurs after deploying my application to tomcat. it runs as a module for an opensource-cms called 'OpenCMS' ( http://opencms.org ). when i run the application on the command-line everything is fine. these are the results of 'getNativeAlignment()' for the members of the struct:
--- snip --------------------------------------------------------- getNativeAlignment( int , 0 , true ) => 4 getNativeAlignment( int , 0 , false ) => 4 getNativeAlignment( int , 0 , false ) => 4 getNativeAlignment( int , 0 , false ) => 4 getNativeAlignment( class com.sun.jna.Pointer , null , false ) => 4 getNativeAlignment( int , 0 , false ) => 4 getNativeAlignment( class com.sun.jna.Pointer , null , false ) => 4 --- /snip --------------------------------------------------------
but as soon as i run this in tomcat:
--- snip --------------------------------------------------------- getNativeAlignment( int , 0 , true ) => 0 --- /snip --------------------------------------------------------
... BOOM. the same JVM is used for both invocations (linux x86):
--- snip --------------------------------------------------------- java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode) --- /snip --------------------------------------------------------
as i said before, i'm sorry as i don't have time to look into this at the moment. i will try to give you more details asap ...
I wonder if this might be related to the crashes reported below.
-----Original Message----- Subject: Re: [jna-users] Possible issue with JNA causing JVM crash on Solaris 10 x86
On Jan 31, 2008, at 1:51 PM, Geoffrey Arnold wrote:
I'm researching an issue resulting in a crash of the JVM running our application on Solaris x86 after ~3 days of uptime. Attached is the GDB session output, as well as the HotSpot error log.
It appears to me that the crash happens when the Java GC is attempting
to unload the library native library, however I am not certain of that
fact.
The signal handler *does* appear to be called on the GC thread, but what indicates to you that JNA is involved? It seems odd that the hotspot stack doesn't provide any symbol information, since it seems you're running against a JDK VM with symbols.
AJ: I have had the same crash on my application running on a customized distro of Linux. The exact same hotspot crash log is seen in our application logs as well.
Though I cannot say with absolute certainty, I believe this error appeared after I incorporated JNA in our application. I never reported it earlier because I thought the error might be due to another sub-system. I am only mentioning it now because it _might_ be related to this issue.
I am not sure how to run the debugger, but if there is any way I can gather more information, please do let me know and I will try to get it.







