An unexpected error has been detected by HotSpot Virtual Machine
hi
I am trying calculate time duration of wma media files using fobs4jmf...
i am getting following error. some times i wont get any error . Can any one help me...
Duration of C:\temp\dir1\behind blue.mp3 = 00:06:05
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c918fea, pid=4216, tid=3664
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-rc-b63 mixed mode, sharing)
# Problematic frame:
# C [ntdll.dll+0x18fea]
#
# An error report file with more information is saved as hs_err_pid4216.log
#
# If you would like to submit a bug report, please visit:
#http://java.sun.com/webapps/bugreport/crash.jsp
#
I would suggest that you do not use fobs for Windows Media if using a PC and if you only need a Player, eg getDuration().
Instead go into JMStudio / File / Preferences / Mime Types then for either 慳udio/mpeg?or 憊ideo/mpg?do Add for the wma extension and Commit.
Whilst there you may wish to Add wmv and asf into 憊ideo/mpg?
hi andyble,
Actually doing this for file server, i am not playing file, i just need to get media file information like duration of a wma file .
Adding mime type played the wma file, but what i need is to get the info, for that i used fobs.
Without using fobs also i got this jvm crash , when i tried with mp3 file.
I think the problem with player.close(); in my program.
Player player = null;
URL url;
url = new URL("file:///" + path);
//path is ur file path
player = Manager.createRealizedPlayer(url);
long timeInSeconds = (long) player.getDuration().getSeconds();
long hours, minutes, seconds;
hours = timeInSeconds / 3600;
timeInSeconds = timeInSeconds - (hours * 3600);
minutes = timeInSeconds / 60;
seconds = timeInSeconds % 60;
System.out.println("Duration of " + path + " = "
+ (hours < 10 ? "0" : "") + hours + ":"
+ (minutes < 10 ? "0" : "") + minutes + ":"
+ (seconds < 10 ? "0" : "") + seconds);
player.stop();
player.close();
If you are using a PC and have native codecs installed because you have likes of DirectX/DirectShow and/or Windows Media Player on it then JMF will find you a player for wma, wmv etc but only if you register the extensions as outlined in my post above, even though not documented as supported. I can then read the duration of a wma, with no crashes, once it realizes a player.