Bug 120243 - Remove old idle workaround ...
Summary: Remove old idle workaround ...
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Onur Yılmaz
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillCpp, topicCleanup
Depends on:
Blocks: Conditional-Formatting-Editing
  Show dependency treegraph
 
Reported: 2018-10-01 15:21 UTC by Michael Meeks
Modified: 2020-03-14 19:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Crash by mouse click on GTK (5.98 KB, text/plain)
2020-01-11 14:39 UTC, Onur Yılmaz
Details
Crash by press 'F' not on GTK (6.55 KB, text/plain)
2020-01-11 15:11 UTC, Onur Yılmaz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2018-10-01 15:21:52 UTC
This code:

sc/source/ui/condformat/condformatdlg.cxx
IMPL_LINK(ScCondFormatList, TypeListHdl, ListBox&, rBox, void)

Has a comment referring to bug#79021 - since the advent of VclPtr and sensible references on VCL Widgets we should no longer need this workaround. It would be good to simplify this code by doing the AfterTypeListHdl inside this code location rather than deferring it.

Thanks !
Comment 1 Michael Meeks 2018-10-01 15:22:54 UTC
Making an easy-hack of this.
Comment 2 Advait Ranade 2019-12-09 06:37:32 UTC
Hello, I'm new to open source. I want to solve this bug. I went through condformatdlg.cxx, I also read few articles related and I think making changes in class ScCondFormatList will do the work and this is because the name of the class is intuitive. But I don’t know what to do from here. Please guide me for the same. 

Thank you.
Comment 3 Michael Meeks 2019-12-10 22:56:30 UTC
Do the work of the AfterTypeListHdl inside the callback instead of inside a (now un-necessary) PostMessage - merge the two methods, compile, test it heavily and submit a patch =) That is what the bug description tried to say.
Comment 4 Onur Yılmaz 2019-12-31 17:27:01 UTC
Hi i am Onur Yılmaz. I work this bug.
My commit link:
https://gerrit.libreoffice.org/c/core/+/86047

I merged AfterTypeListHdl with TypeListHdl. My local test(make, make check) My local testimonial was successful but the result fails when I run a manual test. Same error "Bug 79021". I need review.
Comment 5 Onur Yılmaz 2020-01-11 14:39:57 UTC
Created attachment 157080 [details]
Crash by mouse click on GTK

Patchset-2 passed test successfully in below link but it crushed on manual test.
https://gerrit.libreoffice.org/c/core/+/86047

Steps (I used to crash LibreOffice):
1) Open a new Spreadsheet document
2) Select a cell and Format > Conditional Formatting > Condition...
3) Open the drop-down menu where "Cell value is" is listed
4) Another select by mouse click
like bug#79021: comment 1

Output of "make dubugrun > run > bt" in "Crash by mouse click on GTK.txt"
Comment 6 Onur Yılmaz 2020-01-11 15:11:31 UTC
Created attachment 157081 [details]
Crash by press 'F' not on GTK

Patchset-2 passed test successfully in below link but it crushed on manual test.
https://gerrit.libreoffice.org/c/core/+/86047

And this without GTK:
export SAL_USE_VCLPLUGIN=gen

Steps (I used to crash LibreOffice):

1) Open a new Spreadsheet document
2) Select a cell and Format > Conditional Formatting > Condition...
3) Open the drop-down menu where "Cell value is" is listed
4) Press F
Same bug#79021:comment 1
Comment 7 Michael Meeks 2020-01-13 12:43:47 UTC
The not-on-gtk crash looks interesting; please do go up the frames looking at the Window sub-classes to see if they have mbDisposed (IIRC) set or not - if so, we shouldn't be propagating events on them.

Then again to crash gtk+ I assume we have a memory corruption somewhere; possibly valgrind would show you that: use:

soffice --valgrind 2>&1 | tee /tmp/log.txt

And attach the log.txt =)

Thanks !