spenap / butaca

Movie database application for the Nokia N9
GNU General Public License v3.0
7 stars 9 forks source link

segmentation fault when selecting a cinema in Showtimes View #20

Open mporsch opened 10 years ago

mporsch commented 10 years ago

steps to reproduce: 1) open Showtimes View 2) select one cinema 3) dwelve deep into the Movie Browse or Movie Views 4) return to Showtimes View 5) select a different cinema

spenap commented 10 years ago

This is the same one as issue #17 , so I would start investigating around how I created the QAbstractListModels.

mporsch commented 10 years ago

delete m_currentMovieListModel; in https://github.com/spenap/butaca/blob/master/src/theaterlistmodel.cpp#L114 seems to delete a resource that is still in use in the QML components. At least when commenting it out there are no more crashes.

spenap commented 10 years ago

Yes, I think I got to know that back then. That could be a good enough fix: a memory leak coming from there shouldn't get too big, as typically users would close the app every once in a while. And that's much better than an unexpected crash, so we can comment that delete out, and leave a comment pointing here.

mporsch commented 10 years ago

I commmented out the corresponding line in commit https://github.com/spenap/butaca/commit/1fa26f86d7927790cec07733da73139402021712

I leave this issue open until a better solution is implemented, e.g. the QML components pull a copy of their own to work with.