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

#

[816 byte] By [muralisjcea] at [2007-10-3 10:59:56]
# 1

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?

andyblea at 2007-7-15 6:26:28 > top of Java-index,Security,Cryptography...
# 2

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();

muralisjcea at 2007-7-15 6:26:28 > top of Java-index,Security,Cryptography...
# 3
I always use player.deallocate() after the stop, cannot remember why. I have also found fobs a little flaky with windows media. I found that wma offered a duration without fobs.
andyblea at 2007-7-15 6:26:28 > top of Java-index,Security,Cryptography...
# 4
Hi andyble,Yes i too used player.deallocate() but it didnt solve that jvm crash. What u r trying to say is JMF gives me duration of wma, but i seen in api & jmf site , it doesnt support wma. It always gives me NoPlayerException . thanks& regardsmurali
muralisjcea at 2007-7-15 6:26:28 > top of Java-index,Security,Cryptography...
# 5

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.

andyblea at 2007-7-15 6:26:28 > top of Java-index,Security,Cryptography...
# 6
thanks andyble ,but i used player = Manager.createProcessor(url); instead of player = Manager.createRealizedPlayer(url); now thr is no jvm crash, i dont know the reason . just a trial & error method. thanks a lot.
muralisjcea at 2007-7-15 6:26:28 > top of Java-index,Security,Cryptography...