Opened 10 years ago

Closed 10 years ago

#6782 closed patch (fixed)

MythWeather only allows one location/source per screen type.

Reported by: Marc Alban <marcalban@…> Owned by: paulh
Priority: minor Milestone: 0.22
Component: Plugin - MythWeather Version: head
Severity: medium Keywords: MythWeather
Cc: Ticket locked: no

Description

On the trunk MythWeather? is only allowing one location/source per screen type.

If you add two or more screens of the same type, MythWeather? works correctly until you exit MythWeather? and reenter. When you reenter all screens that have the same type contain data for the screen with the greatest draw order.

This is caused because of the way the 'ScreenListInfo?' object is created and accessed.

Using a copy constructor when loading the screen data instead of pointer assignment fixes the problem.

Attachments (2)

weather_screens.patch (1.8 KB) - added by Marc Alban <marcalban@…> 10 years ago.
Patch to fix how MythWeather? handles multiple screens of the same type.
weather_screens.2.patch (3.0 KB) - added by Marc Alban <marcalban@…> 10 years ago.
Updated patch without the memory leak.

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by Marc Alban <marcalban@…>

Attachment: weather_screens.patch added

Patch to fix how MythWeather? handles multiple screens of the same type.

comment:1 Changed 10 years ago by paulh

Owner: changed from Isaac Richards to paulh
Status: newassigned

comment:2 Changed 10 years ago by paulh

Marc, while your patch does fix the issue I haven't applied it yet because there's a small problem of it leaking memory. The copies of the ScreenListInfo?'s you are creating are never freed. Any chance you could fix that?

comment:3 Changed 10 years ago by Marc Alban <marcalban@…>

Yeah I did notice that after I submitted the patch, but got side tracked hunting down some other memory leaks in MythWeather?. I'll update the patch and create a new ticket for some other leaks I found.

Changed 10 years ago by Marc Alban <marcalban@…>

Attachment: weather_screens.2.patch added

Updated patch without the memory leak.

comment:4 Changed 10 years ago by Marc Alban <marcalban@…>

I created ticket #6856 for the broader memory leak issues with MythWeather? and attached a patch.

comment:5 Changed 10 years ago by paulh

Resolution: fixed
Status: assignedclosed

(In [21443]) Fix a problem in MythWeather? were it would only allow one location/source per screen type to be set. Fixes #6782.

Also fixes several memory leaks. Fixes #6856.

Patch by Marc Alban.

Note: See TracTickets for help on using tickets.