Issue 118671 - Simple macro crashes OOo.Impress
Summary: Simple macro crashes OOo.Impress
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: viewing (show other issues)
Version: 3.4.1
Hardware: PC Linux, all
: P2 Major with 2 votes (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-07 04:00 UTC by Zirneklitis
Modified: 2022-10-28 12:54 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 4.0.0_release_blocker+


Attachments
Custom slide show with killer macro (77.40 KB, application/vnd.oasis.opendocument.presentation)
2011-12-07 04:00 UTC, Zirneklitis
no flags Details
ALG: A possible solution (962 bytes, patch)
2013-07-08 17:35 UTC, Armin Le Grand
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Zirneklitis 2011-12-07 04:00:43 UTC
Created attachment 77063 [details]
Custom slide show with killer macro

OOo.Impress is crashing during a
slide show when one custom slide show is replaced by another.

Version-Release number of selected component (if applicable):
openoffice.org-impress 3.3.x

How reproducible:
100%

Steps to Reproduce:
1. Open the attached presentation.
2. Enable macros for this presentation.
3. Start slide show.
4. Navigate to the second slide.
5. Choose the second or the third example.


Actual results:
OpenOffice.org crashes.

Expected results:
The slide show must go on.

Verified OS/OOo:
This presentation crashes on:
Fedora 14 x64
   - with OOo from repository
     x86_64 1:3.3.0-20.8.fc14
   - with latest stable pre-compiled binary (3.3.0)
     x64 from www.openoffice.org
   - with latest stable pre-compiled binary (3.4.4 , OOO340m1, Build:402)
     x64 from www.libreoffice.org
Scientific Linux 6.1 x86 LiveDVD
   - with latest stable pre-compiled binary (3.3.0)
     x86 from www.openoffice.org

This presentation works fine with OOo 3.2.0


The "Killer-Macro" is as follows:
------------------------------------
Sub KursSkats (view_name as String)

 oDoc = ThisComponent
 oDoc.Presentation.setPropertyValue("CustomShow", view_name)
 oDoc.Presentation.start() 

End Sub
-------------------------------------
Comment 1 Zirneklitis 2011-12-07 04:08:35 UTC
This bug was reported also to:

https://bugzilla.redhat.com/show_bug.cgi?id=759647
Comment 2 Marcus 2011-12-07 19:15:59 UTC
The versions you've tested with are not from the OOo project but 3rd party. Please try again with a vanilla build and report here. Thanks.
Comment 3 Zirneklitis 2011-12-07 19:59:41 UTC
I have already mentioned "with latest stable pre-compiled binary (3.3.0) x64 from www.openoffice.org" (the downloaded archive is OOo_3.3.0_Linux_x86-64_install-rpm-wJRE_en-US.tar.gz) and with latest stable pre-compiled binary (3.3.0)  x86 from www.openoffice.org (the downloaded archive is OOo_3.3.0_Linux_x86_install-rpm-wJRE_en-GB.tar.gz). Both of them crashes.
Comment 4 Zirneklitis 2012-05-16 08:11:14 UTC
Pre-compiled binaries Apache OpenOffice 3.4.0 (AOO340m, rev 1327774)

1. Apache_OpenOffice_incubating_3.4.0_Win_x86_install_en-US.exe
Microsoft Windows XP SP 3 – works as expected.

2. Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_en-US.tar.gz
Ubuntu 10.04 (Lucid) + Xfce – CRASHES!
Ubuntu 10.04 (Lucid) + Gnome – CRASHES!
Comment 5 liuping 2012-08-28 07:16:39 UTC
can not reproduce on AOO350ml 1377620 on Win7-64bit
Comment 6 Zirneklitis 2012-10-07 19:39:25 UTC
This bug has not been fixed!!!

The macro crashes the latest AOO:

Apache OpenOffice 3.4.1
AOO341m1(Build:9593) - Rev.1372282
2012-08013 09:43:38 (Mon, 13 Aug 2012) - Linux i686
on
Ubuntu 10.04
Linux 2.6.32-43-generic #97-Ubuntu SMP Wed Sep 5 16:43:09 UTC 2012 i686 GNU/Linux

as well as x64 version on Fedora 14 x64.
Comment 7 Ariel Constenla-Haile 2012-10-07 20:38:29 UTC
Co9nfirmed on Linux, with current trunk
Comment 8 Ariel Constenla-Haile 2012-10-07 20:40:25 UTC
(In reply to comment #6)
> This bug has not been fixed!!!
> 
> The macro crashes the latest AOO:
> 
> Apache OpenOffice 3.4.1
> AOO341m1(Build:9593) - Rev.1372282
> 2012-08013 09:43:38 (Mon, 13 Aug 2012) - Linux i686
> on
> Ubuntu 10.04
> Linux 2.6.32-43-generic #97-Ubuntu SMP Wed Sep 5 16:43:09 UTC 2012 i686
> GNU/Linux
> 
> as well as x64 version on Fedora 14 x64.

For comment 4 and comment 5 I get the idea that it's an only linux bug, can you confirm?
If you want to try with a recent Developer Snapshot, they can be found at http://people.apache.org/~arielch/packages/r1391723
Comment 9 Zirneklitis 2012-10-08 08:13:31 UTC
At present it has become the problem for Linux distributions. I have tried a recent Developer Snapshot (http://people.apache.org/~arielch/packages/r1391723):

1. Windows 7 / 32 bit – works as expected;

2. Ubuntu 10.04 / 32 bit – CRASH! (no terminal messages)

3. Fedora 14 / 64 bit  – CRASH! The only terminal messages are as follows:

$ ./soffice

** (soffice:3679): WARNING **: Inhibit method failed

** (soffice:3679): WARNING **: Inhibit problem : The name org.gnome.SessionManager was not provided by any .service files

** (soffice:3679): WARNING **: Invalid cookie

** (soffice:3679): WARNING **: Inhibit method failed

** (soffice:3679): WARNING **: Inhibit problem : The name org.gnome.SessionManager was not provided by any .service files
$
Comment 10 Armin Le Grand 2013-07-08 11:40:59 UTC
ALG: The 2nd line uses macro 'OtraisSkats', the 3rd uses 'TreshaaSkats', both call 'KursSkats'. Tried on xubuntu64bit. The macros shall start the presenation (which is already running?).
Ah, there are many CustomSlideShows and the macros are intended to start one of these. I am not sure if this is intended to work with an already running SlideShow. Added (for test) a 'oDoc.Presentation.stop()' to see if that makes what seems intended, but does not work.

I get no crash on xubuntu64bit, but some assertions like:

'Error: DocumentEventNotifier_Impl::notifyEvent: illegal source document!'
'Error: setting state of dirty message'
Comment 11 Armin Le Grand 2013-07-08 12:55:26 UTC
ALG: Tried win version, also klicking the macro-enabled lines does nothing. Also added a 'oDoc.Presentation.end()', this does what seems intended, but gets out of sync with the presentation console and crashes when ending the presentation. This looks as if starting another custom presentation from a running presentation is a good idea for enhancement, but is not really supported currently.
Comment 12 Armin Le Grand 2013-07-08 13:05:39 UTC
ALG: Tried in OOo3.3, same behaviour as AOO4.0. Tried in OOo2.2, office hangs when klicking on a macro-enabled line. I have no 3.2.0, though. Can someone having one check if that really worked?
Comment 13 Armin Le Grand 2013-07-08 13:24:59 UTC
ALG: Have now found and installed a OOo3.2.0 version (build:9483), OOo320m12. Indeed it starts the other custom presentation, but with hard screen flicker. Thus indeed between OOo3.2.0 and OOo3.3 something must have changed with the UNO API Slideshow object; calling oDoc.Presentation.start() does not lead to starting the set 'CustomShow' anymore.
Comment 14 Regina Henschel 2013-07-08 13:39:27 UTC
I have tested it
in OpenOffice.org 3.2.1 OOO320m18 (Build:9502),
in OpenOffice.org 3.4.1 AOO341m1(Build:9593) Rev. 1372282,
in AOO400m2(Build:9701)  -  Rev. 1497734,
all on Windows 7.

There is no crash and the macro calls the custom slide show, so Ariel is likely right, that this is a Linux only bug.
Comment 15 Armin Le Grand 2013-07-08 14:49:13 UTC
ALG: @Regina: Do you mean that in your tests the custom slideshow gets started acually? In my scenarios just nothing happens.
Comment 16 Armin Le Grand 2013-07-08 15:18:03 UTC
ALG: Debugged for a while, found that indeed in SlideShow::startWithArguments in sd/source/ui/slideshow in line 848 an assertion is triggered and end() is called. The comment says 'Stop a running show before starting a new one.'.
Comment 17 Regina Henschel 2013-07-08 15:27:02 UTC
Yes, on Window7 it works. You can see that another show has started, if you right click and then use item 'Goto slide'. There are all slides listed, which belong to the actual show.

And when you finish the custom slide show regularly, it does not switch back to another custom slide show. If you want to start with the intro (=Copyright and hint to F5) you have to select the custom slide show 'Parastais' from the drop-down list 'Custom Slide show' in Slide Show > Slide Show Settings.

Hyperlink, Interaction and direct macro works as it should in Windows7.

The view goes shortly (less than 1/2 second) to the Window7 desktop and then the other custom slide show starts automatically.

In my debug build the message
Error: unknown exception occured! From File c:/AOO_2013_06_27/trunk/main/comphelper/source/misc/scopeguard.cxx at Line 51
is generated, but I don't know by which action.
Comment 18 Armin Le Grand 2013-07-08 15:38:50 UTC
ALG: Thanks Regina, I have the following happening: The end()/start() works so far, only the presenter console stays open when ending the presentation, it closes when closing the document. Checking further on linux..
Comment 19 Armin Le Grand 2013-07-08 16:56:05 UTC
ALG: getting closer, I get the crash now on linux. It crashes in ElapsedTime::releaseTimer() with a 0 == this ptr. Stack shows that a SlideshowImpl::updateSlideShow is executed with member mbDisposed == true.
Comment 20 Armin Le Grand 2013-07-08 17:35:36 UTC
Created attachment 81033 [details]
ALG: A possible solution

ALG: Okay, found problem. It's a typical shot back; originating from SlideshowImpl the action queqes are executed; this can dispose the local object, thus any usage hereafter will lead to problems. A boolean is set at 0==this; win and mac are just more stable OSes but have the same problem. Added patch will solve this.
Comment 21 jsc 2013-07-09 07:04:41 UTC
grant showstopper flag, patch available
Comment 22 Armin Le Grand 2013-07-09 09:32:51 UTC
ALG: Okay, checked again and comitted. This fixes the crash on linux systems and avoids a null-pointer access on the other systems with writing a boolean member there.
Comment 23 SVN Robot 2013-07-09 09:34:25 UTC
"alg" committed SVN revision 1501160 into trunk:
i118671 take emergency exit when local slideshow is disposed from executing m...
Comment 24 jsc 2013-07-09 13:16:24 UTC
showstopper flag got lost
Comment 25 fanyuzhen 2013-07-17 10:42:16 UTC
I do not have Linux environment for verification:
1. Ubuntu 10.04 / 32 bit
2. Fedora 14 / 64 bit