I have no idea why it crashes in the first place, but this fixes the crash and the dialog looks at it should.
Details
- Reviewers
- None
- Group Reviewers
KDE Applications - Commits
- R433:c73fd006e563: Fix a crash when opening the transfer history dialog
called "Transfer History" in the "File" menu, it shows the dialog now, before it crashed.
Diff Detail
- Repository
- R433 KGet
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
The main reason I put this up on phabricator is that I'm not sure about the real problem.
Maybe someone has an idea?
ui/history/transferhistory.cpp | ||
---|---|---|
93 | layout() returns nullptr, it should be setted before use, as in patch. |
ui/history/transferhistory.cpp | ||
---|---|---|
93 | That was my suspicion as well. |
ui/history/transferhistory.cpp | ||
---|---|---|
55 | About me this should be in class scope, now at end of constructor Ui::TransferHistory desctructior is called. |
ui/history/transferhistory.cpp | ||
---|---|---|
55 | Ok. |
ui/history/transferhistory.cpp | ||
---|---|---|
55 | Let's see the backtrace, it does not look correct. |
ui/history/transferhistory.cpp | ||
---|---|---|
55 | Here you are: That's with the original code (without the proposed fix here of course), with "widget" moved to the class, i.e. this patch: I didn't install Qt debug packages though, I can if it helps of course. |
TBH, I'd prefer to commit this for now, to have the crash fixed in the 17.12 beta.
Thank you very much for D8741, but as I mentioned there it causes a regression regarding the dialog size and I don't think it's good to push now without fixing that...
Let's target that for 18.04, I'll try to investigate myself when I have more time.
Do you agree?
Reproduce what?
The crash, or the too small dialog with D8741?
The steps to reproduce are the same though:
Select "Transfer History" in the "File" menu.
With this patch here, the dialog opens with a sane size, and remembers the size if you open it again (or run kget again).
With D8741 the height is (much) too small, and if you resize it it still will open too small the next time.
Without either patch, kget crashes.
Well, I think it did store it, because when I switched back to this patch afterwards the dialog was still too small. ;-)
Resizing helped then though, or deleting kgetrc.
PS, to be clear: the main issue I have with D8741 is not that it doesn't store the size, but that it opens much too small in the first place.
I decided to push this now as a temporary fix for the crash.
I definitely want to follow up on D8741 though.
Thank you for your input and contribution so far! I really appreciate it.