<div>Hi Ahmad,</div>  <div> </div>  <div>Thanks for the advice but I am using a sun jvm (1.6). I will try to debug as far as I can but the problem is the jre dies so I can not get to far into the issue. I am hoping this is a simple issue that the jvlc or vlc group can explain and fix otherwise I will have to give up on jvlc/vlc. It is beta but I have spent weeks getting this far into trying to get java to work and I expect no matter what jvm is used it will crash.</div>  <div> </div>  <div>I appreciate the advice but this is up to the jvlc/vlc team.</div>  <div> </div>  <div>Regards,</div>  <div>-Tony<BR><BR><B><I>Ahmad Hamadallah <ahmdprog@gmail.com></I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">  <META content="Microsoft Word 12 (filtered medium)" name=Generator>  <STYLE>  v\:* {behavior:url(#default#VML);}  o\:* {behavior:url(#default#VML);}  w\:*
 {behavior:url(#default#VML);}  .shape {behavior:url(#default#VML);}  </STYLE>    <STYLE>  <!--   /* Font Definitions */   @font-face   {font-family:Calibri;   panose-1:2 15 5 2 2 2 4 3 2 4;}  @font-face   {font-family:Tahoma;   panose-1:2 11 6 4 3 5 4 4 2 4;}   /* Style Definitions */   p.MsoNormal, li.MsoNormal, div.MsoNormal   {margin:0in;   margin-bottom:.0001pt;   font-size:12.0pt;   font-family:"Times New Roman","serif";}  a:link, span.MsoHyperlink   {mso-style-priority:99;   color:blue;   text-decoration:underline;}  a:visited, span.MsoHyperlinkFollowed   {mso-style-priority:99;   color:purple;   text-decoration:underline;}  p   {mso-style-priority:99;   mso-margin-top-alt:auto;   margin-right:0in;   mso-margin-bottom-alt:auto;   margin-left:0in;   font-size:12.0pt;   font-family:"Times New Roman","serif";}  span.EmailStyle18   {mso-style-type:personal-reply;   font-family:"Calibri","sans-serif";   color:#1F497D;}  .MsoChpDefault   {mso-style-type:export-only;} 
 @page Section1   {size:8.5in 11.0in;   margin:1.0in 1.25in 1.0in 1.25in;}  div.Section1   {page:Section1;}  -->  </STYLE>    <DIV class=Section1>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Hi Tony,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Try to use Sun JVM, I faced many problems with debugging other than Sun JVM.<o:p></o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Try to use Sun JVM and netbeans, you will stay in safe side of debagging and running application.<o:p></o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR:
 #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">I am not saying that it will solve your current problem, but at least, you are in safe side while using Sun JVM.<o:p></o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Good luck.<o:p></o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Regards,<o:p></o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY:
 'Calibri','sans-serif'">Ahmad.<o:p></o:p></SPAN></div>  <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div>  <DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">  <div class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> vlc-devel-bounce@videolan.org [mailto:vlc-devel-bounce@videolan.org] <B>On Behalf Of </B>Tony Anecito<BR><B>Sent:</B> Sunday, May 13, 2007 10:08 AM<BR><B>To:</B> vlc-devel@videolan.org<BR><B>Cc:</B> filippo@carone.org<BR><B>Subject:</B> [vlc-devel] Re: Multiple instances of vlc have incorrect instance references (vlc on windows unstable?)<o:p></o:p></SPAN></div></DIV>  <div class=MsoNormal><o:p> </o:p></div> 
 <DIV>  <div class=MsoNormal>Hi Filippo,<o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal> <o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal>When I correct the logic the destroy method kills the running application. I used my debugger (Eclipse) and right when the destroy method is called the application or in this case jre crashes. On the other hand if not fixed there is a fairly big memory leak because I found out the instance of libvlc stays in memory if destory is never called as indicated in the method I pasted in previous email.<o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal> <o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal>Lets try to figure this out quickly I hate to see such unstable code in a project.<o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal> <o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal>Regards,<o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal>-Tony<BR><BR><B><I>Tony Anecito <adanecito@yahoo.com></I></B>
 wrote:<o:p></o:p></div></DIV>  <BLOCKQUOTE style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; MARGIN-TOP: 5pt; PADDING-LEFT: 4pt; MARGIN-BOTTOM: 5pt; PADDING-BOTTOM: 0in; MARGIN-LEFT: 3.75pt; BORDER-LEFT: #1010ff 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">  <DIV>  <div class=MsoNormal>Hi Filippo,<o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal> <o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal>I figured out the problem. The destroy method in JVLC.java will never work. The logic is wrong. I am not sure what was being attempted but being destroyed should be false.<o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal> <o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal>Again, not sure why the logic is this way.<o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal> <o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal>Regards,<o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal>-Tony<o:p></o:p></div></DIV>  <DIV> 
 <div class=MsoNormal> <o:p></o:p></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE: 10pt">/**<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE: 10pt">* Destroys the current instance of jvlc, cleaning up objects.<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE: 10pt">* This is unreversible.<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE: 10pt">*/<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE: 10pt">public void destroy() {<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE: 10pt">beingDestroyed = true;<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE: 10pt">if (!beingDestroyed)<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE: 10pt">{<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE:
 10pt">_destroy();<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE: 10pt">}<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><SPAN style="FONT-SIZE: 10pt">}<o:p></o:p></SPAN></div></DIV>  <DIV>  <div class=MsoNormal><BR><BR><B><I>Filippo Carone <filippo@carone.org></I></B> wrote:<o:p></o:p></div></DIV>  <BLOCKQUOTE style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; MARGIN-TOP: 5pt; PADDING-LEFT: 4pt; MARGIN-BOTTOM: 5pt; PADDING-BOTTOM: 0in; MARGIN-LEFT: 3.75pt; BORDER-LEFT: #1010ff 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">  <div class=MsoNormal style="MARGIN-BOTTOM: 12pt">Tony Anecito ha scritto:<BR>> ...<BR><BR>Hi Tony,<BR>a workaround for avoiding the removal of the first libvlc instance,<BR>could the use of addNotify() and removeNotify() methods, as Daniel<BR>Kaufmann recently suggested to me. Java awt controls implement these 2<BR>methods, which are invoked when the window
 peer is created (-><BR>addNotify()) and removed (removeNotify()). A test I ask you to do could<BR>do would be:<BR><BR>1. do not implement natively paint(), but leave the default implementation<BR>2. override addNotify to run the current native code used for paint()<BR>3. override removeNotify to destroy the libvlc instance<BR><BR>this could help avoiding the vout window to be created without a peer. <BR>The problem you exposed could be a missing delay time between the play() <BR>command and the peer creation. If the operating system has not created <BR>the peer window and you run play() on jvlc, it will happen vlc will <BR>spawn a new window.<BR><BR>> Now I run the same test but with only one child with the libvlc video<BR>> step 7 above has matching libvlc instances so get the correct window<BR>> handle back and the video plays int the canvas as expected.<BR><BR>That's normal.<BR><BR>> So I was curious where in the code the p_vout->p_libvlc is set
 since<BR>> that is part of the key for the retrieval of the window handle from<BR>> the var_Get( p_vout->p_libvlc, "drawable", &val ) function. The<BR>> other part of the key for retrieval is the "drawable" string.<BR>> <BR>> Does that help more?<BR><BR>Let me know your thoughts about the above suggestion,<BR>cheers,<BR>Filippo<BR><BR>-- <BR>This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/<BR>To unsubscribe, please read http://developers.videolan.org/lists.html<o:p></o:p></div></BLOCKQUOTE>  <div class=MsoNormal><o:p> </o:p></div>  <DIV>  <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center>  <HR align=center width="100%" SIZE=1>  </DIV>  <div class=MsoNormal><A href="http://us.rd.yahoo.com/evt=49938/*http:/tools.search.yahoo.com/toolbar/features/mail/">Never miss an email again!<BR>Yahoo! Toolbar</A> alerts you the instant new Mail arrives.<A
 href="http://us.rd.yahoo.com/evt=49937/*http:/tools.search.yahoo.com/toolbar/features/mail/"> Check it out.</A><o:p></o:p></div></DIV>  <div class=MsoNormal><o:p> </o:p></div>  <div>  <o:p></o:p></div>  <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center>  <HR align=center width="100%" SIZE=1>  </DIV>  <div class=MsoNormal>Expecting? Get great news right away with <A href="http://us.rd.yahoo.com/evt=49982/*http:/advision.webevents.yahoo.com/mailbeta/newmail_tools.html">email Auto-Check.</A><BR>Try the <A href="http://us.rd.yahoo.com/evt=49982/*http:/advision.webevents.yahoo.com/mailbeta/newmail_tools.html">Yahoo! Mail Beta.</A><o:p></o:p></div></BLOCKQUOTE></DIV></BLOCKQUOTE><BR><p>
      <hr size=1>Sick sense of humor? Visit Yahoo! TV's 
<a href="http://us.rd.yahoo.com/evt=47093/*http://tv.yahoo.com/collections/222">Comedy with an Edge </a>to see what's on, when.