[Bug 21832] New: using threading model Both instead of Apartment let my application render correclty

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Feb 23 08:18:11 CST 2010


http://bugs.winehq.org/show_bug.cgi?id=21832

           Summary: using threading model Both instead of Apartment let my
                    application render correclty
           Product: Wine
           Version: 1.1.39
          Platform: x86
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: windowscodecs
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: prahal at yahoo.com


Using the application from :
http://www.codeproject.com/KB/winsdk/messagespy.aspx
(either builded from source via monodevelop or using the binary) leads to a 1
pixel line behing rendered.
Switching the threading model from the PNG WIC decoder to "Both" from
"Apartment" fixes this.

This applications requires dlls shipped in the exe from 
http://www.nektra.com/products/deviare-api-hook-windows/download


Vanilla wine-1.1.39-61-g520a283 with mono 2.6 from upstream installed without
futher ado:
wine ./DeviareMsgSpy.exe
Warning: may be not all fields of the class 'TypeEntryInner' were described
Warning: may be not all fields of the class 'ModuleEntryInner' were described
Warning: may be not all fields of the class 'FunctionEntryInner' were described
Warning: may be not all fields of the class 'ParamEntriesInner' were described
Warning: may be not all fields of the class 'ParamEntryInner' were described
Warning: may be not all fields of the class 'FunctionEntriesInner' were
described
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:marshal_object couldn't get IPSFactory buffer for interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf}
err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub,
hres=0x80040155
err:ole:CoMarshalInterface Failed to marshal the interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf}, 80040155
fixme:ole:CoCreateInstance no instance created for interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf} of class
{389ea17b-5078-4cde-b6ef-25c15175c751}, hres is 0x80040155

Unhandled Exception: System.Exception: Generic Error [GDI+ status:
GenericError]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename
unknown>:0 
  at System.Drawing.Image.InitFromStream (System.IO.Stream stream) [0x00000] in
<filename unknown>:0 
  at System.Drawing.Bitmap..ctor (System.IO.Stream stream, Boolean useIcm)
[0x00000] in <filename unknown>:0 
  at System.Drawing.Bitmap..ctor (System.IO.Stream stream) [0x00000] in
<filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor
(System.IO.Stream)
  at System.Windows.Forms.ResourceImageLoader.Get (System.String name)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.PictureBox..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.PictureBox:.ctor
()
  at DeviareMsgSpy.Window.InitializeComponent () [0x00000] in <filename
unknown>:0 
  at DeviareMsgSpy.Window..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) DeviareMsgSpy.Window:.ctor ()
  at EntryPoint.Main (System.String[] args) [0x00000] in <filename unknown>:0 


With the swith from Apartment to Both in the threading model of
389ea17b-5078-4cde-b6ef-25c15175c751 ie png wic.
 wine ./DeviareMsgSpy.exe
Warning: may be not all fields of the class 'TypeEntryInner' were described
Warning: may be not all fields of the class 'ModuleEntryInner' were described
Warning: may be not all fields of the class 'FunctionEntryInner' were described
Warning: may be not all fields of the class 'ParamEntriesInner' were described
Warning: may be not all fields of the class 'ParamEntryInner' were described
Warning: may be not all fields of the class 'FunctionEntriesInner' were
described
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:marshal_object couldn't get IPSFactory buffer for interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf}
err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub,
hres=0x80040155
err:ole:CoMarshalInterface Failed to marshal the interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf}, 80040155
fixme:ole:CoCreateInstance no instance created for interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf} of class
{6b462062-7cbf-400d-9fdb-813dd10f2778}, hres is 0x80040155
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:marshal_object couldn't get IPSFactory buffer for interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf}
err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub,
hres=0x80040155
err:ole:CoMarshalInterface Failed to marshal the interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf}, 80040155
fixme:ole:CoCreateInstance no instance created for interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf} of class
{6b462062-7cbf-400d-9fdb-813dd10f2778}, hres is 0x80040155
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded

-> works somewhat fine.



If you try to use the application to capture a window properties (the whole
point of the application), you ll end up with this error coming frmo
unimplemented function in mono.
wine ./DeviareMsgSpy.exe
Warning: may be not all fields of the class 'TypeEntryInner' were described
Warning: may be not all fields of the class 'ModuleEntryInner' were described
Warning: may be not all fields of the class 'FunctionEntryInner' were described
Warning: may be not all fields of the class 'ParamEntriesInner' were described
Warning: may be not all fields of the class 'ParamEntryInner' were described
Warning: may be not all fields of the class 'FunctionEntriesInner' were
described
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:marshal_object couldn't get IPSFactory buffer for interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf}
err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub,
hres=0x80040155
err:ole:CoMarshalInterface Failed to marshal the interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf}, 80040155
fixme:ole:CoCreateInstance no instance created for interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf} of class
{6b462062-7cbf-400d-9fdb-813dd10f2778}, hres is 0x80040155
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:marshal_object couldn't get IPSFactory buffer for interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf}
err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub,
hres=0x80040155
err:ole:CoMarshalInterface Failed to marshal the interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf}, 80040155
fixme:ole:CoCreateInstance no instance created for interface
{9edde9e7-8dee-47ea-99df-e6faf2ed44bf} of class
{6b462062-7cbf-400d-9fdb-813dd10f2778}, hres is 0x80040155
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
System.NotSupportedException: non imported interfaces on             imported
classes is not yet implemented.
  at (wrapper cominterop-invoke) Deviare.DHookEvents_Event:add_OnFunctionCalled
(Deviare.DHookEvents_OnFunctionCalledEventHandler)
  at DeviareMsgSpy.Window.button1_Click (System.Object sender, System.EventArgs
e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000] in
<filename unknown>:0 
  at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000] in
<filename unknown>:0 
  at System.Windows.Forms.ButtonBase.OnMouseUp
(System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs
mevent) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 
err:seh:setup_exception_record stack overflow 1272 bytes in thread 003f eip
7ef9e4a6 esp 00410e38 stack 0x410000-0x411000-0x610000





http://www.ureader.com/msg/1491614.aspx tells :
"Note that threading model for a given decoder is a choice of the decoder’s 
developer and “Both” is only used as an example."

Though I tried "Both" and it leaded to better rendering.

I do not know much about threading model and cannot tell if the issue is in the
choice of the model, the dll or otherwise.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the wine-bugs mailing list