openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #16326
[Merge] lp:~j-corwin/openlp/bug-1016843 into lp:openlp
Jonathan Corwin has proposed merging lp:~j-corwin/openlp/bug-1016843 into lp:openlp.
Requested reviews:
Andreas Preikschat (googol)
Tim Bentley (trb143)
Related bugs:
Bug #1016843 in OpenLP: "OpenLP crash when creating new theme with items in service"
https://bugs.launchpad.net/openlp/+bug/1016843
For more details, see:
https://code.launchpad.net/~j-corwin/openlp/bug-1016843/+merge/112915
Reduce the number of times a new QWebView is created, which seems to prevent OpenLP from crashing when creating a new theme and there are a lot of items in the service.
I have no idea why this stops the problem!
(It was crashing in renderer:_text_fits_on_slide() in the evaluateJavascript() call, but this would process the same song fine if it was earlier in the service)
--
https://code.launchpad.net/~j-corwin/openlp/bug-1016843/+merge/112915
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2012-06-22 14:14:53 +0000
+++ openlp/core/lib/renderer.py 2012-06-30 22:23:19 +0000
@@ -82,6 +82,9 @@
self._calculate_default()
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'theme_update_global'), self.set_global_theme)
+ self.web = QtWebKit.QWebView()
+ self.web.setVisible(False)
+ self.web_frame = self.web.page().mainFrame()
def update_display(self):
"""
@@ -404,10 +407,7 @@
if theme_data.font_main_shadow:
self.page_width -= int(theme_data.font_main_shadow_size)
self.page_height -= int(theme_data.font_main_shadow_size)
- self.web = QtWebKit.QWebView()
- self.web.setVisible(False)
self.web.resize(self.page_width, self.page_height)
- self.web_frame = self.web.page().mainFrame()
# Adjust width and height to account for shadow. outline done in css.
html = u"""<!DOCTYPE html><html><head><script>
function show_text(newtext) {
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py 2012-06-22 14:14:53 +0000
+++ openlp/core/lib/serviceitem.py 2012-06-30 22:23:19 +0000
@@ -178,7 +178,7 @@
self.renderer.set_item_theme(self.theme)
self.themedata, self.main, self.footer = self.renderer.pre_render()
if self.service_item_type == ServiceItemType.Text:
- log.debug(u'Formatting slides')
+ log.debug(u'Formatting slides: %s' % self.title)
for slide in self._raw_frames:
pages = self.renderer.format_slide(slide[u'raw_slide'], self)
for page in pages:
Follow ups