Bug 120243 - Remove old idle workaround ...
Summary: Remove old idle workaround ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
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: 2021-03-08 10:36 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
Log file for Crash on pressing 'F' not on GTK. (148.40 KB, text/plain)
2021-03-03 10:21 UTC, Dipanshu Garg
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 !
Comment 8 Xisco Faulí 2020-07-22 15:12:28 UTC
Dear Onur Yılmaz,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.
Comment 9 Dipanshu Garg 2021-03-02 13:03:57 UTC
Hi, I would like to work on this.
Comment 10 Michael Meeks 2021-03-02 13:09:12 UTC
Hi Dipanshu, as you can see Onur has done some great work here; we need to debug the remaining problem(s) with that and get it merged. Probably it's not a terribly easy hack though - be aware it's a medium to difficult at this point.
Comment 11 Dipanshu Garg 2021-03-03 10:21:03 UTC
Created attachment 170197 [details]
Log file for Crash on pressing 'F' not on GTK.
Comment 12 Dipanshu Garg 2021-03-03 10:24:40 UTC
Hi I have added a log file for the run with valgrind. 
The spreadsheet crashes after printing:
==220872== 
pure virtual method called
terminate called without an active exception
Comment 13 Dipanshu Garg 2021-03-03 10:25:46 UTC
Also, I am not getting crash by mouse click on GTK. It seems to be working fine for me.
Comment 14 Dipanshu Garg 2021-03-08 10:36:38 UTC
Probably, I should work on some easy hacks and then come back to this. So reassigning.