Issue 73681 - Crash When switch Application from Simpress and Scalc or Swriter
Summary: Crash When switch Application from Simpress and Scalc or Swriter
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: programming (show other issues)
Version: OOo 2.1
Hardware: All Windows XP
: P2 Trivial (vote)
Target Milestone: OOo 2.4
Assignee: christian.guenther
QA Contact: issues@graphics
URL:
Keywords: crash, oooqa
Depends on:
Blocks:
 
Reported: 2007-01-20 08:29 UTC by xzcheng
Modified: 2008-07-03 13:15 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description xzcheng 2007-01-20 08:29:54 UTC
1. create a new swriter document or a scalc document,(must not input any word)
2. create a new simpress document or a draw document
3.In simpress ,click "Insert--Picture--From File" ,select random one file.
4.Then click "Edit--ImageMap"
5 switch the window between swriter and simpress for several times
6 crach
This bug are also found in any version based on oo680 Source 
I found it that there is something wrong in the 
function /svx/source/dialog/imapdlg.cxx/SvxIMapDlg::Update(.. Maybe....
Comment 1 xzcheng 2007-01-20 08:31:15 UTC
I have set one miletone
Comment 2 liujiaxiang 2007-01-20 08:44:01 UTC
It is OK when debuging the product use VC.net.
only crash when install a builded version.
It is difficult to track the code error point.
Comment 3 kpalagin 2007-01-20 10:54:26 UTC
Confirming with 2.1 and 9107 on WinXP. 2.1 on Linux seems to be fine.
Comment 4 peter.junge 2007-01-20 12:28:38 UTC
Also reproduced on Linux using a fresh OOo 2.1 download
Reassigned to CGU
Hello Christian,
please find someone to fix it. I hope it's not too late for OOo 2.2.
Best regards
Peter
Comment 5 xzcheng 2007-01-22 02:04:10 UTC
kpalagin: if not crash when you switch between sc/sw and simpress/sdraw.
please draw a circle or any kind of shape in the imagemap dialog ,then switch 
for more than 10 times. the Frequency of switching must be high,not too slow.
Then you can find it must crash .
Comment 6 peter.junge 2007-01-22 07:00:29 UTC
@xzcheng, kpalagin: From my experience this looks like a timing problem while
switching windows focus. I wouldn't be too suprised if there are some systems
that do not reproduce the problem. The behavoiur Liutao describes while having a
debugger attached is another evidence for this theory.

Peter
Comment 7 christian.guenther 2007-01-22 15:56:13 UTC
I can't reproduce the bug.
Could you please send a crash report and tell me wich email adress you entered
in the report?
Comment 8 kpalagin 2007-01-22 19:15:41 UTC
cgu,
crash reporter is not invoking for me on any of my XP machines so I can't send 
crash report (I am willing to tro
I can provide access to machine which exhibits the problem, via Remote Desktop 
Protocol (it happens in this scenario as well).

BTW, I managed to crash OO on Linux as well (Suse 10.2 running in Virtual PC 
session), using described steps. Again - no crash reporter. I can provide this 
VPC image via ftp.
Comment 9 peter.junge 2007-01-23 05:17:21 UTC
Hi Christian,
I can confirm that there's no crashreporter. Perhaps try another system because
there are obviously differences in ease of reproduction.

Best regards
Peter
Comment 10 peter.junge 2007-01-23 05:39:20 UTC
... and there's another issue, see
http://www.openoffice.org/issues/show_bug.cgi?id=73774
which I flagges on 'OOo later' because it doesn't seem to be essiential.
But if I try it in this order:
- new document,
- insert image,
- invoke image map editor,
- new document,
- switch focus,
I am not able to reproduce the issue too.
Best regards
Peter
Comment 11 kpalagin 2007-01-23 06:57:58 UTC
pj,
you need to switch (mouse or Alt-Tab seem to work equally well) between 
windows _several times_ (in some cases up to ten) for crash to happen.
Comment 12 peter.junge 2007-01-23 13:20:27 UTC
kpalagin,
yes I know. I confirmed the issue earlier. My latest comment just should say
that it is not reproducible if you change the order of actions a little bit,
maybe that was the problem of CGU. If you take the steps decribed in #i73774#
the second (unwanted) instance of the map editor seems to cover the issue.
Peter
Comment 13 christian.guenther 2007-01-30 14:16:20 UTC
I can't reproduce the bug therefore I change the target.
Comment 14 christian.guenther 2007-01-30 16:21:58 UTC
I tried to reproduce the bug again with the description from issue 73774but I
still can't reproduce the bug.
I change the status to works for me.
Comment 15 pavel 2007-01-30 16:31:57 UTC
pj: can you show the crash to cgu on your machine?
Comment 16 utomo99 2007-01-31 02:54:20 UTC
I think we better not closing this issue yet, because:
3 person confirming this. xzcheng, kpalagin , pj.
and it is a Crash. 
If It is a true crsh problems, I wish the target can be set back to OOo 2.2 
instead of 2.x.

Thanks

Comment 17 xzcheng 2007-01-31 03:03:06 UTC
I have confirmed this crash on more than 10 machines and all kind of OO 
versions before I report this falt.There must be something wrong with the 
simpress and sdraw source. 
Comment 18 peter.junge 2007-01-31 06:42:44 UTC
pjanik: I guess you expect me to work in the same building as CGU? That's not
the case because I quit at Sun some month ago and I am now working for CH2000 in
Beijing, P.R.China. Fortunately I am currently in Hamburg and I will visit CGU
with my Notebook next week.

I tried to attach GDB to abtain a stack with no result. But funny, when you
restart soffice after doing this I get a crach report.

I will come back with the ID as soon as I found out.
-> Reopened
Comment 19 peter.junge 2007-01-31 06:54:34 UTC
OOPS,
I forgot to reassign the issue.
Peter
Comment 20 peter.junge 2007-01-31 06:56:57 UTC
ARRRGGH!
Sorry it's early in the morning!
Of course I have to check REOPEN.
Sorry for all the spam.

Peter
Comment 21 pavel 2007-01-31 09:45:09 UTC
pj: thanks. Yes, now I remember ;-))
Comment 22 feroze_avaz 2007-02-02 01:52:15 UTC
I was able to successfully replicate the problem with the steps provided. I am
using Windows XP SP2 with OpenOffice 2.1 installed. However while replicating
the problem I realized that the following steps also lead to crash.

1. create a new simpress document
2. create a new document of any application of OpenOffice suite other than sbase.
3. If the ImageMap window opens up in the other application (the one you opened
in the previous step) then close it.
4. In simpress ,click "Insert--Picture--From File" ,select random one file.
5. In simpress, click on Edit and then ImageMap.
6. switch the window between the two softwares and it will crash

Note: The order in which you do step 1-5 doesn't really matter. However if the
imageMap window automatically open up in the application you opened in step 2
then close it because if you leave it open then it won't crash.
Comment 23 azeemab 2007-02-02 03:51:32 UTC
Successfully replicated by following xzcheng's instructions and switching the
window 9 times between swriter and simpress. Using OOo 2.1 on Windows XP SP2.
Comment 24 utomo99 2007-02-02 04:00:49 UTC
Please test using the lates OOo

developer snapshot build OOF680_m5 which installs as OOo-Dev 2.2 has been 
uploaded to ftp master. The rename of the productname to OOo-dev allows the 
installation of the OpenOffice.org snapshot parallel to an OpenOffice.org 
2.x 'final' (released) version.

If you find severe issues within this build please file them to IssueTracker. 
If such issues are critical for the 2.2 release then please discuss the issues 
within dev@qa mailing list.

You will find the snapshot builds including source tarballs within 
the "developer/OOF680_m5/" directory on the servers of our mirror network:

http://download.openoffice.org/680/index.html

If JavaScript is activated then the link above will point to the
OOF680_m5 directory automatically. For those who don't want to use Javascript 
there is

http://download.openoffice.org/680/index-nojs.html

the md5sums:

http://download.openoffice.org/680/md5sums.html
Comment 25 peter.junge 2007-02-02 06:10:44 UTC
Utomo,

the issue is confirmed on a 2.0.04 and 2.1. I can also confirm it for a 2.0.2.
Nobody fixed it yet. For this reason it is likely still there. If you already
got the latest snapshot please help us and confirm it for this version too. It
normaly takes 20 seconds.

Peter
Comment 26 bhatiap 2007-02-02 07:00:44 UTC
I have been able to successfully replicate the bug on Windows XP Home ed. SP2
installed, using OOo 2.0.3. 

After the crash recovery, the Image Map editor windows that open in all the
recovered files might be annoying to the customers. 
Comment 27 liujiaxiang 2007-02-02 07:31:32 UTC
I can reproduce the bug.
Comment 28 groucho266 2007-02-02 12:58:50 UTC
I can reproduce the crash.  

The reason for it lies in the SVXIMAPDLG macro that is used in
DrawViewShell::GetIMapState().  The macro calls SfxViewFrame::GetChildWindow()
and GetWindow() at its result.  Because this macro is called only after
SfxViewFrame::HasChildWindow() returned true for the same id
(SvxIMapDlgChildWindow::GetChildWindowId()) everything should be OK.  For some
unknown reason everyting is not OK: GetChildWindow() returns NULL and the
following call to GetWindow() crashes.

A local fix in sd is to manually expand the macro and check the SfxChildWindow
pointer returned by GetChildWindow().
Comment 29 christian.guenther 2007-02-02 13:17:46 UTC
The important thing to reproduce the bug is to close the 2nd image map dialog.
Now I can reproduce the bug too.
Comment 30 groucho266 2007-02-02 15:50:43 UTC
Accepted.
Comment 31 groucho266 2007-09-17 09:14:05 UTC
Changed target.
Comment 32 groucho266 2007-12-05 12:48:23 UTC
Added GetImageMapDialog() method to ViewShell::Implementation that takes care of
any NULL pointers while acquiring the dialog.

Modified files:
sd/source/ui/view/drviewsc.cxx    rev. 1.32.148.1
sd/source/ui/view/drviewsg.cxx    rev. 1.13.224.1
sd/source/ui/view/ViewShellImplementation.hxx    1.10.108.1
sd/source/ui/view/ViewShellImplementation.cxx    1.24.108.1
Comment 33 groucho266 2007-12-05 16:15:19 UTC
Fixed.
Comment 34 clippka 2008-01-14 11:46:16 UTC
verified fix in cws, back to qa
Comment 35 wolframgarten 2008-01-15 14:38:28 UTC
Verified in CWS.
Comment 36 christian.guenther 2008-07-03 13:15:06 UTC
CGU: integrated in dev300m22