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 :-(