8 messages in net.java.dev.jna.users"Native call setup failure" passing s...
FromSent OnAttachments
Duncan McGregorDec 13, 2007 6:52 am 
Duncan McGregorDec 13, 2007 7:19 am 
Timothy WallDec 13, 2007 7:41 am 
Timothy WallDec 13, 2007 8:01 am 
Duncan McGregorDec 13, 2007 2:12 pm 
Timothy WallDec 13, 2007 4:14 pm 
Duncan McGregorDec 14, 2007 2:35 am 
Duncan McGregorDec 14, 2007 3:55 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:"Native call setup failure" passing struct of struct by valueActions...
From:Duncan McGregor (dun@oneeyedmen.com)
Date:Dec 13, 2007 6:52:41 am
List:net.java.dev.jna.users

I have a weird intermittent test failure passing QTTimeRange structs to a QTMovie on Mac.

public class QTTimeRange extends Structure implements Structure.ByValue { public QTTime time; public QTTime duration;

public class QTTime extends Structure implements Structure.ByValue { public long timeValue; public int timeScale; public int flags;

The calling code says

movie.setSelection(new QTTimeRange(new QTTime(50, 1000), new QTTime (750, 1000)));

which maps onto a call to objc_msgSend(ID, SEL, ...)

Some of the time the call succeeds, sometimes I get E_BAD_ACCESS of varying locations, and sometimes I get an exception

Caused by: java.lang.IllegalArgumentException: Native call setup failure: 1 at com.sun.jna.Function.invokeInt(Native Method) at com.sun.jna.Function.invoke(Function.java:301) at com.sun.jna.Function.invoke(Function.java:236) at com.sun.jna.LibraryHandler.invoke(LibraryHandler.java:132) at $Proxy2.objc_msgSend(Unknown Source)

The QTTimeRange always looks like this

2:37:36 PM Foundation.send - calling objc_msgSend([ID 0x36c100], [Selector setSelection:], org.rococoa.quicktime.QTTimeRange(Native Allocated Memory <0x367f00> (32 bytes)) class org.rococoa.quicktime.QTTime time@0=org.rococoa.quicktime.QTTime(Native Allocated Memory <0x3911e0> (16 bytes)) long timeValue@0=50 int timeScale@8=1000 int flags@c=0 memory dump [00000000] [00000000] [00000000] [00000000] class org.rococoa.quicktime.QTTime duration@10=org.rococoa.quicktime.QTTime(Native Allocated Memory <0x3875c0> (16 bytes)) long timeValue@0=750 int timeScale@8=1000 int flags@c=0 memory dump [00000000] [00000000] [00000000] [00000000] memory dump [00000000] [00000000] [00000000] [00000000] [00000000] [00000000] [00000000] [00000000])

I had thought that the movie might not be fully loaded, but waiting doesn't seem to change anything. Is there any likely cause of "Native call setup failure: 1"?

Thanks

Duncan (Currently mourning the passing of Quicktime for Java, RIP :-(