Re: [Ikvm-developers] possible ikvmc AWT deadlock
Brought to you by:
jfrijters
|
From: Volker B. <vol...@go...> - 2012-03-10 22:30:10
|
Hi Matthias,
I have add a JUnit test and fix it. Your first change was the right thing.
Volker
Am 10.03.2012 18:39, schrieb Matthias Dittrich:
> Hi Volker,
>
> first of all thanks for the really quick fix!
>
> Now I did run into another issue, when doing the same action (opening
> settings on a ikvmc jDownloader.jar):
>
> System.ArgumentException
> Control does not support transparent background colors
>
> at System.Windows.Forms.Control.set_BackColor(Color value)
> at System.Windows.Forms.Form.set_BackColor(Color value)
> at
> ikvm.awt.NetComponentPeer`2.<>c__DisplayClass25.<setBackground>b__23()
> at
> System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry
> tme)
> at
> System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at
> System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
> code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.RunInternal(ExecutionContext
> executionContext, ContextCallback callback, Object state)
> at System.Threading.ExecutionContext.Run(ExecutionContext
> executionContext, ContextCallback callback, Object state, Boolean
> ignoreSyncCtx)
> at System.Threading.ExecutionContext.Run(ExecutionContext
> executionContext, ContextCallback callback, Object state)
> at
> System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry
> tme)
> at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
> at System.Windows.Forms.Form.WndProc(Message& m)
> at
> System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
> hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
> at
> System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr
> dwComponentID, Int32 reason, Int32 pvLoopData)
> at
> System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
> reason, ApplicationContext context)
> at
> System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
> reason, ApplicationContext context)
> at System.Windows.Forms.Application.Run()
> at ikvm.awt.NetToolkit.MessageLoop()
> at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at
> System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
> code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.RunInternal(ExecutionContext
> executionContext, ContextCallback callback, Object state)
> at System.Threading.ExecutionContext.Run(ExecutionContext
> executionContext, ContextCallback callback, Object state, Boolean
> ignoreSyncCtx)
> at System.Threading.ExecutionContext.Run(ExecutionContext
> executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
>
>
>
> I did resolve it, not sure how good or bad these changes are...
>
> *Fix1* toolkit-0.95.cs Zeile 83 (UndecoratedForm Constructor):
> changing
> SetStyle(ControlStyles.UserPaint |
> ControlStyles.ResizeRedraw, true);
> to
> SetStyle(ControlStyles.UserPaint |
> ControlStyles.ResizeRedraw |
> ControlStyles.SupportsTransparentBackColor, true);
>
> or *Fix2 *toolkit-0.95.cs Zeile 2759 (setBackground)
> Changing
> NetToolkit.BeginInvoke(delegate {
> this.control.BackColor = J2C.ConvertColor(color); });
> to
> NetToolkit.BeginInvoke(delegate {
> this.control.BackColor = Color.FromArgb(255,
> J2C.ConvertColor(color)); });
>
> Like I said before the gui is not important for me (but nice to have
> for debugging). So I have no problems with ugly L&F ;)
>
> Settings are now working fine, thank you!,
> Matthias
>
>
>
> On Sat, Mar 10, 2012 at 3:41 PM, Volker Berlin
> <vol...@go... <mailto:vol...@go...>>
> wrote:
>
> Hi Matthias,
>
> I fix this dead lock. It was a regression. I had add a wait to
> prevent a NPE. But the images from JDownloader seams animated.
> This means it receive never the state of all bits available.
>
> I fix also 2 other problems with the L&F. But the custom L&F look
> horrible. It use a AlphaComposite.SRC_IN which I can not
> implements in .NET
>
> Volker
>
>
> Am 08.03.2012 22:46, schrieb Matthias Dittrich:
>> Hi Volker,
>>
>> like I said this is not critical for me so...
>> I'm working with this jDownloader.jar/jDownloader.dll for some
>> time now and lots of exceptions are simply there because of
>> missing files and extensions jDownloader is searching. (I could
>> fix almost all of them but the "deadlock")
>> Maybe I can save you some time there if you want. (However I
>> don't know so much about the internals of ikvm until now)
>>
>> Regards,
>> Matthias
>>
>> On Thu, Mar 8, 2012 at 9:15 PM, Volker Berlin
>> <vol...@go...
>> <mailto:vol...@go...>> wrote:
>>
>> Hi Matthias,
>>
>> Bad news for me, good news for you. I can reproduce it. I
>> have reproduce it with a more simple steps for me. "ikvm -jar
>> JDownloader.jar" reproduce it and show a long list of
>> exceptions before. I will look into it now.
>>
>> Volker
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Virtualization & Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> _______________________________________________
>> Ikvm-developers mailing list
>> Ikv...@li...
>> <mailto:Ikv...@li...>
>> https://lists.sourceforge.net/lists/listinfo/ikvm-developers
>>
>>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Ikvm-developers mailing list
> Ikv...@li...
> <mailto:Ikv...@li...>
> https://lists.sourceforge.net/lists/listinfo/ikvm-developers
>
>
|