Zero division error when display size set to zero

Bug #1196926 reported by Phill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Status tracked in Trunk
2.0
Fix Released
Medium
Tim Bentley
Trunk
Fix Released
Medium
Tim Bentley

Bug Description

Orriginally reported at: http://support.openlp.org/issues/1980

However, I've been able to trigger this by a different method:

Open the "Configure OpenLP" dialog
Set hight or width to 0 for the "Override display position" option
Click ok.

This produces this traceback:

Traceback (most recent call last):
  File "D:\OpenLP_Code\release-2.0.1\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.core.ui.mainwindow", line 1155, in screenChanged
  File "D:\OpenLP_Code\release-2.0.1\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.core.lib.renderer", line 95, in update_display
  File "D:\OpenLP_Code\release-2.0.1\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.core.lib.renderer", line 355, in _calculate_default
ZeroDivisionError: float division by zero

Related branches

Phill (phill-ridout)
tags: added: display-rendering support-system
Revision history for this message
Phill (phill-ridout) wrote :

Although this fix stops the user selecting a display size smaller than 0, it does not appear prevent the bug in the support tracker issue that is attached.

Revision history for this message
Tim Bentley (trb143) wrote :

Why not ?

Revision history for this message
Phill (phill-ridout) wrote :

Reading the support issue, it sounds like the users computer lost a connection to the projector, causing OpenLP to "Auto Detect" the size of the screen as 0.

As your fix prevents the user from setting the size to 0 in the settings, then this bug could still triggered in the same way as in the support issue, and possibly if the user manually disconnected the monitor. In this case we would still get the divide by 0 error.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.