• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Embedded VM in a cpp code and crash information

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello;

I am integrating in a executable the VM embedded with JNI.

I have this scenary;
1.- The cpp with the functions to initiate the VM \jre_1_4_2_12\\bin\\client\\jvm.dll
2.- A native DLL that has a bridge between JNI and CPP
3.- a .jar file that connects with this .dll

And I have the following problem;
a)
When I run the VM from the CPP and certain code in the dll crashes, The Java hotspot tells me with the traditional log
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00d060bf, pid=672, tid=608
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_12-b03 mixed mode)
# Problematic frame:
# C [mydll.dll+0x60bf]

But I cannot get the DUMP file for the process generated by Drwatson (I configured this debugger with the -i option to get the error)

I loaded previously in the cpp the library to shared with JVM but It does not work.

b)
Instead of this if I run a process that it is initiated with java.exe with the option -XX:+ShowMessageBoxOnError the dump file is generated but I do not see the callstack to localize the problem in the DLL


Can anybody knows how can I get the dumpfile with the a) case
Regards

Isi
 
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you run your whole application from your C++ development environment (e.g. Visual Studio), with debugger? Or connect your C++ debugger before the crash?
 
Isidro Garc�a
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello;

Yes, when I put in the starting JVM configuration this option
-XX:+ShowMessageBoxOnError

when the C code crashes I have the posiblity to launch into visualStudio the postmorten debug.

But my problem is how to tell to generate directly a dmp file because this application is in the client and if I don't put the -XX option it only generates .log file. In this file there is no posibility to see CPP calstacks and any view. With the dmp file I can use it with windbg.

Isi
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, you've exceeded my experience now. I have not had to do post-mortem debugging of crashed C++ with embedded JVM.

Good luck!
 
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic