Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Richard Heck
Abdelrazak Younes wrote: Richard Heck wrote: Abdelrazak Younes wrote: Richard Heck wrote: What follows has to be const_cast(buffer).dispatch(). No, I want rather to use the global dispatch method. So that would be: +lyx::dispatch(FuncRequest(LFUN_BUFFER_CHILD_OPEN, MSVC chose this one

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Abdelrazak Younes
Richard Heck wrote: Abdelrazak Younes wrote: Richard Heck wrote: What follows has to be const_cast(buffer).dispatch(). No, I want rather to use the global dispatch method. So that would be: +lyx::dispatch(FuncRequest(LFUN_BUFFER_CHILD_OPEN, MSVC chose this one automatically for me but

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Richard Heck
Abdelrazak Younes wrote: Richard Heck wrote: What follows has to be const_cast(buffer).dispatch(). No, I want rather to use the global dispatch method. So that would be: +lyx::dispatch(FuncRequest(LFUN_BUFFER_CHILD_OPEN, MSVC chose this one automatically for me but I'll do the change a

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Richard Heck
Abdelrazak Younes wrote: Richard Heck wrote: What follows has to be const_cast(buffer).dispatch(). No, I want rather to use the global dispatch method. So that would be: +lyx::dispatch(FuncRequest(LFUN_BUFFER_CHILD_OPEN, MSVC chose this one automatically for me but I'll do the change a

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Abdelrazak Younes
Richard Heck wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Richard Heck wrote: Idea for fix: Since the buffer_func.cpp version of loadLyXFile() is called from LyXView::loadLyXFile(), anyway, all the child doc stuff could be moved there. But I don't know this code terribly well. Abd

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Abdelrazak Younes
Richard Heck wrote: Abdelrazak Younes wrote: Richard Heck wrote: Idea for fix: Since the buffer_func.cpp version of loadLyXFile() is called from LyXView::loadLyXFile(), anyway, all the child doc stuff could be moved there. But I don't know this code terribly well. Abdel? Very good analysis Ric

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Richard Heck
Abdelrazak Younes wrote: Abdelrazak Younes wrote: Richard Heck wrote: Idea for fix: Since the buffer_func.cpp version of loadLyXFile() is called from LyXView::loadLyXFile(), anyway, all the child doc stuff could be moved there. But I don't know this code terribly well. Abdel? Very good analysi

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Richard Heck
Abdelrazak Younes wrote: Richard Heck wrote: Idea for fix: Since the buffer_func.cpp version of loadLyXFile() is called from LyXView::loadLyXFile(), anyway, all the child doc stuff could be moved there. But I don't know this code terribly well. Abdel? Very good analysis Richard! The solution is

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Abdelrazak Younes
Richard Heck wrote: Idea for fix: Since the buffer_func.cpp version of loadLyXFile() is called from LyXView::loadLyXFile(), anyway, all the child doc stuff could be moved there. Of course you are right but I don't want to do that now because it will involves much more intrusive changes in Bu

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Richard Heck wrote: Idea for fix: Since the buffer_func.cpp version of loadLyXFile() is called from LyXView::loadLyXFile(), anyway, all the child doc stuff could be moved there. But I don't know this code terribly well. Abdel? Very good analysis Richard! The solution

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Abdelrazak Younes
Richard Heck wrote: Idea for fix: Since the buffer_func.cpp version of loadLyXFile() is called from LyXView::loadLyXFile(), anyway, all the child doc stuff could be moved there. But I don't know this code terribly well. Abdel? Very good analysis Richard! The solution is to use the LFUN instead

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Richard Heck
Richard Heck wrote: Richard Heck wrote: Second problem: Now, with the TOC open, close the master document. BOOM. Backtrace below. I'm guessing that the problem here is related to the first problem. This bug may have been revealed by my "don't close buffer dependent dialogs" patch: http://w

Re: [PATCH] Bug 3860 Toc crash WITH child documents

2007-06-15 Thread Richard Heck
Richard Heck wrote: Abdelrazak Younes wrote: I won't be able to commit it this week-end so could anyone show a little bit of interest please? I've patched and am compiling now. This patch does fix that crash, but I'm seeing some other odd behavior, and I'm getting another crash. I don't know t