To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=43741
                  Issue #:|43741
                  Summary:|slot:5500 crasher ...
                Component:|utilities
                  Version:|680m79
                 Platform:|All
                      URL:|
               OS/Version:|All
                   Status:|NEW
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|PATCH
                 Priority:|P3
             Subcomponent:|code
              Assigned to:|hro
              Reported by:|mmeeks





------- Additional comments from [EMAIL PROTECTED] Mon Feb 28 13:13:53 -0800 
2005 -------
So, for a longish time, we've had a 'New OO.o Document' .desktop file that 
launches:

$ soffice slot:5500

This used to have the effect of allowing using of the Templates and Documents
dialog which made a nice starting point for OO.o users.

Unfortunately - in 2.0 this seg-faults shortly after creating the new frame -
giving a slightly sub-optimal experience ;-)
By adding debug I generated this confusing & not altogether relevant trace that
will hopefully be self explanatory:
officeipcthread :: run start
dispatchwatcher: foo!
NewDocExec_Impl: start
Double clicked
OpenFile impl 0
queried dispatch of 'private:factory/swriter/GlobalDocument'
PostUserEVent (async foo !) ... 
OpenFile exits
Double click ended
NewDocExec_Impl: nRet: 'ok' - newwin 0
NewDocExec_Impl: end early
dispatchwatcher: done 1
dispatchwatcher: check for open tasks
dispatchwatcher: apparently no open tasks => terminate [!]
Try: ExecuteHdl_Impl (async baa!) ... 
Done: ExecuteHdl_Impl (async baa!) ... 

What it shows is the dispatchwatcher quitting, before the idle handler
ExecuteHdl_Impl can be run to create the new frame - and then - well, it all
goes rather bad.

The (nasty / hacked up etc.) patch - makes the file open synchronous; thus
avoiding this problem.

Of course, in an ideal world I'd have a new UNO service, that did this, and a
new -newfromtemplate command line argument to invoke this behavior, and things
could continue in a fun asynchronous fashion (I suppose). It wasn't really that
clear to me how to implement that though: design ideas appreciated.

Index: svtools/source/contnr/templwin.hxx
===================================================================
RCS file: /cvs/util/svtools/source/contnr/templwin.hxx,v
retrieving revision 1.30
diff -u -r1.30 templwin.hxx
--- svtools/source/contnr/templwin.hxx  27 Jan 2005 10:39:40 -0000      1.30
+++ svtools/source/contnr/templwin.hxx  28 Feb 2005 18:55:53 -0000
@@ -268,6 +268,7 @@
     {
         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
    xDispatch;
         ::com::sun::star::util::URL                                           
    aTargetURL;
+               bool                                                            
           bDone;
     };
 
     DECL_STATIC_LINK(       SvtFrameWindow_Impl, ExecuteHdl_Impl,
SvtExecuteInfo* );

sfx2/source/appl/appopen.cxx (NewDocExec_Impl)Index:
svtools/source/contnr/templwin.cxx
===================================================================
RCS file: /cvs/util/svtools/source/contnr/templwin.cxx,v
retrieving revision 1.65
diff -u -r1.65 templwin.cxx
--- svtools/source/contnr/templwin.cxx  27 Jan 2005 10:39:20 -0000      1.65
+++ svtools/source/contnr/templwin.cxx  28 Feb 2005 18:55:51 -0000
@@ -994,7 +995,7 @@
     {
     }
 
-    delete pExecuteInfo;
+       pExecuteInfo->bDone = true;
     return 0;
 }
 
@@ -1135,12 +1143,15 @@
                 SvtExecuteInfo* pExecuteInfo = new SvtExecuteInfo;
                 pExecuteInfo->xDispatch = xDisp;
                 pExecuteInfo->aTargetURL = aURL;
+                               pExecuteInfo->bDone = false;
                 Application::PostUserEvent(
                     STATIC_LINK(0, SvtFrameWindow_Impl, ExecuteHdl_Impl),
pExecuteInfo );
+                               while( !pExecuteInfo->bDone )
+                                               Application::Yield();
                                m_aOpenURL = rtl::OUString();
                        }
                }
        }
 }
 
 void SvtFrameWindow_Impl::ToggleView( sal_Bool bDI )

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to