Powerpoint behaving incorrectly when started from OpenLP

edited December 2012 in Troubleshooting
Hi all,

Been using OpenLP this Christmas season and it's going pretty well. However, I've come across a few bugs which are hard to reproduce and I'd like to see if it's happened to anyone else or if I'm going crazy. I'll file a proper bug report later when I'm able to consistently reproduce the problems.

First issue is that our pastor's .ppt presentations seem to behave differently if I launch them from within OpenLP or from Powerpoint itself. He has some animations where some text arrives from off-screen and slides into position. If I launch the slideshow from Powerpoint by hitting F5, the text goes to the right place, but if I double click on the presentation from the service manager, then the text appears in the corner of the slide in the wrong position. In both cases, I'm using the same file and moving through it by going left and right with the arrows, and I think I'm also using the same instance of Powerpoint. The focus is also on the Powerpoint window, so I am not moving through the slides from OpenLP (known to be buggy with the animations). But in one case the slideshow is started by Powerpoint itself (F5) and in the other it's started by OpenLP via remote control (or whatever you call it).

The second issue is that from time to time, under certain circumstances (not quite clear yet), OpenLP will raise an exception about not being able to communicate with Powerpoint. This might be if I've closed Powerpoint before closing OpenLP for instance. It's an unnecessary error because OpenLP is quite capable of restarting Powerpoint when required and it does it quite well. I was going to submit a bug report but was unable to reproduce the problem. Then it happened to me again a few days later.

I'll try to figure out the exact sequence of events that cause these things to happen, but I'd like to hear if this has happened to anyone else. This has happened to me on Windows 7 with MS Office 2007 and the official OpenLP 2.0 release.

Merry Christmas to all!


  • Just an initial disclaimer: I don't use PowerPoint. Aside from the fact that our church system runs Linux, we also just don't have that many presentations.

    I have heard of (and seen) various of these "can't communicate with PowerPoint" exceptions coming through, but I've never been able to trace where they're happening, and often the core error is some arbitrary Windows error, which makes it even more difficult to determine what is going on.

    If you're able to track down exactly what causes that, I'm sure the guys who handle the presentation stuff will only be too happy to fix that bug too.

    As for your other issue, I'm afraid I haven't a clue.
  • Your problem of losing communication with powerpoint could  be having the same problem that we discovered a couple of years ago...


    ...as you will see we were having problems and eventually we discovered it was linked to moving out of powerpoint (to a song or anything else) during a transition although it is not obvious until you need to use powerpoint again in the same session when you get some errors.  As you will see from the history I sent some files which caused the error but it was never repeatable at the developers end.  I have just checked on the latest 2.0 version and the same bug still exists and is repeatable (from my laptop) in the same way.

    I have since moved from the church I was at then (as minsiter in training) to pastor a different church which has another bit of software (boo).  For my own interest I periodically check back here to look at OpenLP.  I had hoped to look into the bug myself (I used to be a developer before training as a minister) but unfortunately have never had the time.

    Bye for now

  • Microsoft uses a mechanism called in one iteration OLE, to communicate between apps. I think they call it something else now, but it's the same mechanism.  Anyone who has ever had to work with this beast knows that it's complex and bug ridden.  It's most likely that itfclp's bug is buried in myriad of DLL's that make up OLE.  This is why sometimes such bugs are hard to track down, all you need is one of those DLL's to be different and on one machine it happens every time and on another machine it never happens.

    Systems like most Linux distributions which are based on central repositories often mean that if you have a particular distribution, what you have and what the developers have, will be nearly identical, providing you update within a few hours of each other. 
  • Hi Carl.  I've got the same problem.  If I start a presentation within powerpoint with animations it works fine.  If through OpenLP then the animations all arrive on screen on top of one another.  If animations are turned off it works fine, so must have something to do with animations and OpenLP.  Wondered if it would work if presentation was made with Impress?  Does anyone have any ideas as unfortunately our church uses a lot of powerpoint :o(  Not used Impress but will have a try today to see if it works.
  • Robert, Powerpoint animations should work, but your best to use the timing feature, so that it opens, waits a few seconds, then does the next, then waits again, then does the next, without operator intervention.  The issue is that PPT is not designed to operate the way we are asking it to, it is designed to have complete control of everything, but we are asking it to leave some control to the calling program so that when it's done, it can return complete control to the calling program. 

    This would work in a ground up Unix application, because the mechanism is much simpler, OLP would call fork() then wait().  The child process would then call exec to run PPT, PPT would be told to play a slide show and then quit when the show is done.   OLP the parent process (OLP) then waits for a signal that the child process has completed.  The OS wakes up OLP and it continues on.  Even MacOSX should work with this kind of process, as it's really is BSD Unix at heart. 

    Windows doesn't have the fork() system call, so it becomes a lot more complicated for applications that need to support Windows.   Even CreateProcess doesn't help because PPT doesn't have a command line interface either.  You need the complex OLE system, which means that instead of a simple child process you have 7 different layers of processes and 6 that don't like each other.
  • I have not done any of the presentation development, I don't use Windows, but as far as I know, OpenLP uses the COM system on Windows to communicate with PowerPoint, the same way other applications that use Microsoft Office have to do things. I don't know if OLE and COM work together, or are the same thing even.

    What I do know of how the presentations are run from within OpenLP is that OpenLP just calls the "next" method in PowerPoint, which is supposed to run through the animations. I don't know what that entails, nor how PowerPoint implements that method.
  • COM I think is a newer name for the stuff behind OLE....
  • It's weird what happens to me.  I did what wogster suggested and timed the animations to no change of problem.  Each line of animation text ends up on top of each other.  Yet run it through powerpoint and it's fine.  Will just have to play through powerpoint or have static slides.
  • Hi, thought that the latest bug fixes may have fixed this but no.  Want to send a bug report to show what happens but not sure how to do it. Could some-one point me to the correct place that tells me what to do.  Thanks
  • Further to this little niggle. I also have widows 7 and office 2007 as Carl does and have same problem.

    I have just installed OpenLP onto the church laptop that has windows7 and office 2010 on.  The problem does not exist on this laptop and all presentations work even animated ones.

    So I wonder if office 2007 Powerpoint just doesn't like OpenLP??

    Thought you'd like to know Carl.

  • I still have this problem with transitions displaying text in the wrong place with the latest OpenLP 2.1.4 and Office 2007 at church. At home with Office 2013 everything works just fine so I'll need to investigate an upgrade of Office. The bug report that gushie mentioned above seems to be something different (transitions all take place at the right speed for me).
  • Hi Carl,

    I'm working on improving the powerpoint integration at the moment, and hope to get the changes ready before the next release. Powerpoint integration is tricky due to the different versions working in different ways etc.
    If you're up for it you can test my latest changes in this build: https://dl.dropboxusercontent.com/u/3161898/OpenLP-bugfixes20-bzr2548-setup.exe
    The main window of Powerpoint is now hidden and I've done various fixes. I've also added a new option for powerpoint in the presentation settings, where you can let powerpoint control the size and position of the presentation window. I can't help think that this might fix the issue you're seeing with Powerpoint 2007 where text is positioned in the wrong place.
  • Thanks a lot. Tested with Office 2013 at home and it works nicely. Good to have hidden the main Powerpoint window as this can be confusing (especially when I have other presentations open for editing). The other error I was getting no longer appears. I'd like to test it at church with Office 2007 later this week to determine whether the two problem presentations display correctly or not but I'll have to be careful to leave myself the option of reverting back to the official release after testing.

    Minor comment: when double clicking a new presentation with the screen blanked, first the desktop shows briefly, then the presentation shows briefly, then it goes blank as it was before. After that everything works as it should. This isn't new in your build, I think Powerpoint always flashes up on the screen even when it's blanked.
  • If you already have 2.1.4 installed, my bugfix build should not change the OpenLP data. But if you are using 2.0.5 you won't be able to revert after installing the bugfix-build. For that you'll need at portable build, which doesn't touch existing data.  I'll see if we can create one...
  • I've been using 2.1.4 at church because there have been so many fixes and other improvements, and it needs testing
    :) No need to create a portable build just for me.
  • I installed the new beta 2.1.4 and now find an error message regarding Powerpoint integration which prohibits the PP presentation from running in OpenLP. We worked around this by running the presentation in Powerpoint outside of OpenLP last week but would like to have the remote work like it did in 2.1.3 before.

    Can I revert to 2.1.3 to solve issue?
  • The error message would be helpful so that we can fix the bug.
  • HI - I am getting the same integration error message.
    Also see PowerPoint going through the slides saving images when it goes live.

    If I click past the error, then click on the first slide in OpenLP it appears to work ok.

    I did see some errors which seem to indicate it is not referencing the slide numbers correctly.
    Also got this:
     --- Exception Traceback ---
    Traceback (most recent call last):
    File "D:\OpenLP_Development\OpenLP_Code\2.1\openlp\core\lib\mediamanageritem.py", line 503, in on_live_click
    File "D:\OpenLP_Development\OpenLP_Code\2.1\openlp\core\lib\mediamanageritem.py", line 530, in go_live
    File "D:\OpenLP_Development\OpenLP_Code\2.1\openlp\core\ui\slidecontroller.py", line 779, in add_service_item
    File "D:\OpenLP_Development\OpenLP_Code\2.1\openlp\core\ui\slidecontroller.py", line 890, in _process_item
    File "D:\OpenLP_Development\OpenLP_Code\2.1\openlp\core\ui\maindisplay.py", line 430, in build_html
    File "D:\OpenLP_Development\OpenLP_Code\2.1\openlp\core\ui\maindisplay.py", line 487, in _hide_mouse
    RuntimeError: wrapped C/C++ object of type MainDisplay has been deleted

  • I attempted to post a screen shot of the error message we receive. In testing this evening to get the error message for you, the power point slide show is now projecting to my second screen while the error message is displayed. That didn't happen last time. I clicked OK on the error message and the slide show is looping on the second screen. But then when I re-started the Powerpoint slide show it doesn't display on the second screen.

    The error message displayed in a blue border dialog box reads: " An error occurred in the Powerpoint integration and the presentation will be stopped. Restart the presentation if you wish to present it."

      I Hope this helps.
  • Marcusq, the error that you're seeing may well have been fixed in tgc's test release. Have you tried the release that he linked to above?
  • Thank you Carl. Indeed. tgc's test release fixed that bug. Our PP presentation now runs as it should without the error message.

    I am also perplexed with the PP slide show continuing to run even though another item in the service, such as a video or song screen set, is selected for display. If after the video has ended and we want to blank the screen to the desktop or theme, the PP slide show re-appears as if it never quit running. At that point we have to physically go to the laptop, select the PP program and stop the slide show with the esc key. I have a laser presenter remote coming to allow that control from a distance but I didn't know if y'all were aware of that bug.

    Thanks again.
  • Hi Marcusq,
    I haven't seen the issue you report about the Powerpoint window not closing. What Powerpoint version are you using?
    Could you post a debug log? See how on our wiki.
  • I've seen this happen too but not consistently, and it tends to be when I'm sitting in the congregation and someone else is at the computer. I've usually assumed that they started up PowerPoint outside of OpenLP because something wasn't working properly or because they forgot, but maybe it only happens when you do things in a very particular order and only some of our team do it.
Sign In or Register to comment.