[ome-users] showinf issue in C++ binding [bug report and fix]
Joe Ping-Lin Hsiao
phsiao at cs.unc.edu
Tue Jun 23 16:03:40 BST 2015
Alright I figured it out. The culprit is this line
OMEXMLServiceImpl service;
To solve the problem just delay the object's instantiation after JVM.
Specifically change the line to
OMEXMLServiceImpl *service;
And use 'new' to instantiate the variable in main() instead
try {
JavaTools::createJVM();
service = new OMEXMLServiceImpl();
testRead(argc, argv);
delete service;
}
Don't forget to search for each usage of 'service' and change the '.'
operator to '->' because it is a pointer now.
On Tue, Jun 23, 2015 at 9:47 AM, Joe Ping-Lin Hsiao <phsiao at cs.unc.edu>
wrote:
> Roger,
>
> This is my output from 'java -version':
>
> java version "1.7.0_79"
> OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
> OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
>
> I assume it's Java 7?
>
> The link you provided talks about errors during maven creating proxy
> classes, but I didn't have those issues. Every step in the tutorial works
> fine for me.
>
> On Mon, Jun 22, 2015 at 4:55 PM, Roger Leigh <r.leigh at dundee.ac.uk> wrote:
>
>> On 22/06/2015 20:13, Joe Ping-Lin Hsiao wrote:
>>
>>> Hi,
>>>
>>> I am on Ubuntu 14.04 64-bit and I just built Bio-formats with C++
>>> bindings by following the instructions here
>>> (
>>> http://www.openmicroscopy.org/site/support/bio-formats5.1/developers/jace/build-linux.html
>>> ).
>>>
>>> Every step looks fine, but when I run the 'showinf' program, I got the
>>> the message
>>>
>>> terminate called after throwing an instance of
>>> 'jace::VirtualMachineShutdownError'
>>> what(): The virtual machine is not running
>>> Abort (core dumped)
>>>
>>
>> Which version of Java do you have installed as the system default?
>> i.e. the output of "java -version"
>>
>> Note that this is known to not work with Java 8:
>> https://github.com/uw-loci/cppwrap-maven-plugin/issues/2
>> So if you're using Java 8 I would suggest trying with Java 7 instead as
>> a workaround.
>>
>>
>> Regards,
>> Roger Leigh
>>
>>
>> --
>> Dr Roger Leigh -- Open Microscopy Environment
>> Wellcome Trust Centre for Gene Regulation and Expression,
>> College of Life Sciences, University of Dundee, Dow Street,
>> Dundee DD1 5EH Scotland UK Tel: (01382) 386364
>>
>> The University of Dundee is a registered Scottish Charity, No: SC015096
>> _______________________________________________
>> ome-users mailing list
>> ome-users at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20150623/952f60c4/attachment.html>
More information about the ome-users
mailing list