denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] [bug #30450] Bugs


From: anonymous
Subject: [Denemo-devel] [bug #30450] Bugs
Date: Sat, 14 Aug 2010 13:00:18 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)

Follow-up Comment #17, bug #30450 (project denemo):

I read the code in print.c, function open_viewer as: It uses
run_file_association when the length of the viewer field for the relevant
type(pdf or png) is 0.  When this condition is not satisfied, i.e., when the
relevant field is non-empty, it uses g_spawn_async.  
It does seem like a long shot that the default verb changing would be the
cause.
...
I was just scrutinizing the run_file_association and it occurred to me that
maybe the CoInitializeEx needed to be closed.  And browsing the documentation
I found this.  

http://msdn.microsoft.com/en-us/library/ms886306.aspx

CoInitializeEx must be called at least once, and is usually called only once,
for each thread that uses the COM library. Multiple calls to CoInitializeEx 
by the same thread are allowed as long as they pass the same concurrency flag,
but subsequent valid calls return S_FALSE. To close the COM library gracefully
on a thread, each successful call to CoInitializeEx, including any call that
returns S_FALSE, must be balanced by a corresponding call to CoUninitialize.


void CoUninitialize(); 
A thread must call CoUninitialize once for each successful call it has made
to CoInitializeEx. Only the CoUninitialize call corresponding to the
CoInitializeEx call that initialized the library can close it.

...
If I'm wrong about this I'll stop bothering you with conjectures.  But this
seems to be a possible explanation for the problem: every time we call
run_file_association it is making another call to CoInitializeEx, and it is
never uninitialized.  It sounds like it would be better to have a separate
function that (on windows) calls CoInitializeEx when denemo starts or at the
first call to run_file_association and another one that calls CoUninitialize. 
-DW

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30450>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]