Re: [PATCH] to avoid crash in misspelled marker painting while deleting table rows fast

2018-04-04 Thread Scott Kostyshak
On Wed, Apr 04, 2018 at 10:38:58AM +, Jean-Marc Lasgouttes wrote:

> We did not manage to have a full discussion :)  Executive summary is like

I like this phrase. Next time, I will ask for an "Executive summary".
It is better than the alternative, "summary for dummies" :)

> Stephan: I get a crash with 2.2 and master when selecting quickly and the
> following patch helps
> 
> JMarc: I see that newword (the thing that avoids adding spell checker marks
> under currently edited word) is not correct in this case. It would be better
> to understand why it is not correct
> 
> Stephan: I do not understand what you mean [probably because my explanation
> was not as good as this one]
> 
> JMarc: [rephrases the problem]
> 
> I do not know what is the status beyond that, sorry.

Thank you for the summary. That helps. I will now forget about this
thread. It is up to you and Stephan if you want to keep it alive.

Scott


signature.asc
Description: PGP signature


Re: [PATCH] to avoid crash in misspelled marker painting while deleting table rows fast

2018-04-04 Thread Jean-Marc Lasgouttes

Le 04/04/2018 à 03:54, Scott Kostyshak a écrit :

On Thu, Dec 28, 2017 at 08:40:31AM +, Scott Kostyshak wrote:

On Fri, Oct 27, 2017 at 10:52:02AM +, Jean-Marc Lasgouttes wrote:

Le 13/10/2017 à 07:24, Stephan Witt a écrit :

A question: is the 'quickly' important to get the crash? From what I see, 
Cursor::newWord() is not updated to the changes in the document structure. Why 
does this happen?


Sorry for the delay. I tried to reproduce and cannot anymore ATM. I had the 
impression 'quickly‘ was important to get the crash. It didn’t happen on the 
first or second deletion.

I don’t understand your statement regarding the change in document structure 
and the following question.


Sorry, I failed to answer this. My remark is that you have to check whether
newword does point to a correct text and I thought it was because sometimes
it is not pointing to what it should. I wonder whether this is related to
the places where these things are computed.


Stephan can you reproduce the crash on recent 2.3.x?


I didn't follow the discussion. Is the patch not necessary then?


We did not manage to have a full discussion :)  Executive summary is like

Stephan: I get a crash with 2.2 and master when selecting quickly and 
the following patch helps


JMarc: I see that newword (the thing that avoids adding spell checker 
marks under currently edited word) is not correct in this case. It would 
be better to understand why it is not correct


Stephan: I do not understand what you mean [probably because my 
explanation was not as good as this one]


JMarc: [rephrases the problem]

I do not know what is the status beyond that, sorry.

JMarc


Re: [PATCH] to avoid crash in misspelled marker painting while deleting table rows fast

2018-04-03 Thread Scott Kostyshak
On Thu, Dec 28, 2017 at 08:40:31AM +, Scott Kostyshak wrote:
> On Fri, Oct 27, 2017 at 10:52:02AM +, Jean-Marc Lasgouttes wrote:
> > Le 13/10/2017 à 07:24, Stephan Witt a écrit :
> > > > A question: is the 'quickly' important to get the crash? From what I 
> > > > see, Cursor::newWord() is not updated to the changes in the document 
> > > > structure. Why does this happen?
> > > 
> > > Sorry for the delay. I tried to reproduce and cannot anymore ATM. I had 
> > > the impression 'quickly‘ was important to get the crash. It didn’t happen 
> > > on the first or second deletion.
> > > 
> > > I don’t understand your statement regarding the change in document 
> > > structure and the following question.
> > 
> > Sorry, I failed to answer this. My remark is that you have to check whether
> > newword does point to a correct text and I thought it was because sometimes
> > it is not pointing to what it should. I wonder whether this is related to
> > the places where these things are computed.
> 
> Stephan can you reproduce the crash on recent 2.3.x?

I didn't follow the discussion. Is the patch not necessary then?

Scott


signature.asc
Description: PGP signature


Re: [PATCH] to avoid crash in misspelled marker painting while deleting table rows fast

2017-12-28 Thread Scott Kostyshak
On Fri, Oct 27, 2017 at 10:52:02AM +, Jean-Marc Lasgouttes wrote:
> Le 13/10/2017 à 07:24, Stephan Witt a écrit :
> > > A question: is the 'quickly' important to get the crash? From what I see, 
> > > Cursor::newWord() is not updated to the changes in the document 
> > > structure. Why does this happen?
> > 
> > Sorry for the delay. I tried to reproduce and cannot anymore ATM. I had the 
> > impression 'quickly‘ was important to get the crash. It didn’t happen on 
> > the first or second deletion.
> > 
> > I don’t understand your statement regarding the change in document 
> > structure and the following question.
> 
> Sorry, I failed to answer this. My remark is that you have to check whether
> newword does point to a correct text and I thought it was because sometimes
> it is not pointing to what it should. I wonder whether this is related to
> the places where these things are computed.

Stephan can you reproduce the crash on recent 2.3.x?

Scott


Re: [PATCH] to avoid crash in misspelled marker painting while deleting table rows fast

2017-10-27 Thread Jean-Marc Lasgouttes

Le 13/10/2017 à 07:24, Stephan Witt a écrit :

A question: is the 'quickly' important to get the crash? From what I see, 
Cursor::newWord() is not updated to the changes in the document structure. Why 
does this happen?


Sorry for the delay. I tried to reproduce and cannot anymore ATM. I had the 
impression 'quickly‘ was important to get the crash. It didn’t happen on the 
first or second deletion.

I don’t understand your statement regarding the change in document structure 
and the following question.


Sorry, I failed to answer this. My remark is that you have to check 
whether newword does point to a correct text and I thought it was 
because sometimes it is not pointing to what it should. I wonder whether 
this is related to the places where these things are computed.


JMarc


Re: [PATCH] to avoid crash in misspelled marker painting while deleting table rows fast

2017-10-26 Thread Scott Kostyshak
On Wed, Oct 25, 2017 at 05:26:25PM +, Scott Kostyshak wrote:

> What shall we do with this regarding rc1? If for some reason we do not
> put in Stephan's patch, can we at least put in some debug code or an
> assert or something to help us make progress on this in the future?

Bump. I'm not considering this an rc1 blocker, but if there's something
obvious we should try for rc1, please let me know.

Scott


signature.asc
Description: PGP signature


Re: [PATCH] to avoid crash in misspelled marker painting while deleting table rows fast

2017-10-25 Thread Scott Kostyshak
On Fri, Oct 13, 2017 at 05:24:50AM +, Stephan Witt wrote:
> Am 11.10.2017 um 12:10 schrieb Jean-Marc Lasgouttes :
> > 
> > Le 08/10/2017 à 18:01, Stephan Witt a écrit :
> >> Hi,
> >> these days I’ve got a crash while deleting multiple rows from a table with 
> >> bottom table toolbar quickly.
> >> This happened with LyX 2.2. - I can reproduce it with master.
> >> I’m attaching the crash report and a patch to avoid the crash. I’d like to 
> >> put it in and if possible backport it to 2.3.x at least. Ok?
> > 
> > A question: is the 'quickly' important to get the crash? From what I see, 
> > Cursor::newWord() is not updated to the changes in the document structure. 
> > Why does this happen?
> 
> Sorry for the delay. I tried to reproduce and cannot anymore ATM. I had the 
> impression 'quickly‘ was important to get the crash. It didn’t happen on the 
> first or second deletion.
> 
> I don’t understand your statement regarding the change in document structure 
> and the following question.

What shall we do with this regarding rc1? If for some reason we do not
put in Stephan's patch, can we at least put in some debug code or an
assert or something to help us make progress on this in the future?

Scott


signature.asc
Description: PGP signature


Re: [PATCH] to avoid crash in misspelled marker painting while deleting table rows fast

2017-10-12 Thread Stephan Witt
Am 11.10.2017 um 12:10 schrieb Jean-Marc Lasgouttes :
> 
> Le 08/10/2017 à 18:01, Stephan Witt a écrit :
>> Hi,
>> these days I’ve got a crash while deleting multiple rows from a table with 
>> bottom table toolbar quickly.
>> This happened with LyX 2.2. - I can reproduce it with master.
>> I’m attaching the crash report and a patch to avoid the crash. I’d like to 
>> put it in and if possible backport it to 2.3.x at least. Ok?
> 
> A question: is the 'quickly' important to get the crash? From what I see, 
> Cursor::newWord() is not updated to the changes in the document structure. 
> Why does this happen?

Sorry for the delay. I tried to reproduce and cannot anymore ATM. I had the 
impression 'quickly‘ was important to get the crash. It didn’t happen on the 
first or second deletion.

I don’t understand your statement regarding the change in document structure 
and the following question.

Stephan

> Also, we do not use the syntax
>  NULL != nw.top().text()
> in the code base, I'd rather see just
>  nw.top().text()

Ok.
> 
> JMarc



Re: [PATCH] to avoid crash in misspelled marker painting while deleting table rows fast

2017-10-11 Thread Jean-Marc Lasgouttes

Le 08/10/2017 à 18:01, Stephan Witt a écrit :

Hi,

these days I’ve got a crash while deleting multiple rows from a table with 
bottom table toolbar quickly.
This happened with LyX 2.2. - I can reproduce it with master.

I’m attaching the crash report and a patch to avoid the crash. I’d like to put 
it in and if possible backport it to 2.3.x at least. Ok?


A question: is the 'quickly' important to get the crash? From what I 
see, Cursor::newWord() is not updated to the changes in the document 
structure. Why does this happen?

Also, we do not use the syntax
  NULL != nw.top().text()
in the code base, I'd rather see just
  nw.top().text()

JMarc


[PATCH] to avoid crash in misspelled marker painting while deleting table rows fast

2017-10-08 Thread Stephan Witt
Hi,

these days I’ve got a crash while deleting multiple rows from a table with 
bottom table toolbar quickly.
This happened with LyX 2.2. - I can reproduce it with master.

I’m attaching the crash report and a patch to avoid the crash. I’d like to put 
it in and if possible backport it to 2.3.x at least. Ok?

Stephan



crash-in-table-redraw.patch
Description: Binary data
Process:   lyx [88991]
Path:  /Applications/LyX.app/Contents/MacOS/lyx
Identifier:org.lyx.lyx
Version:   2.2.2 (???)
Code Type: X86-64 (Native)
Parent Process:??? [1]
Responsible:   lyx [88991]
User ID:   501

Date/Time: 2017-10-05 21:48:29.913 +0200
OS Version:Mac OS X 10.11.6 (15G1611)
Report Version:11
Anonymous UUID:EDBFDA39-668B-1773-9AF4-1A076C7F386B

Sleep/Wake UUID:   8B20952D-358E-46BB-A1FF-E6EBDCF13EB8

Time Awake Since Boot: 32 seconds
Time Since Wake:   3300 seconds

System Integrity Protection: enabled

Crashed Thread:0  Dispatch queue: com.apple.main-thread

Exception Type:EXC_BAD_ACCESS (SIGABRT)
Exception Codes:   KERN_INVALID_ADDRESS at 0x0020
Exception Note:EXC_CORPSE_NOTIFY

VM Regions Near 0x20:
--> 
__TEXT 0001082cc000-000108ef9000 [ 12.2M] r-x/rwx 
SM=COW  /Applications/LyX.app/Contents/MacOS/lyx

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib  0x7fff9438af06 __pthread_kill + 10
1   libsystem_pthread.dylib 0x7fff945714ec pthread_kill + 90
2   libsystem_c.dylib   0x7fff902716df abort + 129
3   org.lyx.lyx 0x0001083df96e 
lyx::error_handler(int) + 866
4   libsystem_platform.dylib0x7fff990cd52a _sigtramp + 26
5   ??? 0x0022 0 + 34
6   org.lyx.lyx 0x00010837a0c0 
lyx::DocIterator::paragraph() const + 166
7   org.lyx.lyx 0x00010843f9d2 
lyx::RowPainter::paintMisspelledMark(double, lyx::Row::Element const&) const + 
218
8   org.lyx.lyx 0x00010844127c 
lyx::RowPainter::paintText() + 316
9   org.lyx.lyx 0x00010848768e 
lyx::TextMetrics::drawParagraph(lyx::PainterInfo&, long, int, int) const + 2382
10  org.lyx.lyx 0x000108486d05 
lyx::TextMetrics::draw(lyx::PainterInfo&, int, int) const + 121
11  org.lyx.lyx 0x00010861dc54 
lyx::InsetText::draw(lyx::PainterInfo&, int, int) const + 326
12  org.lyx.lyx 0x00010860d21b 
lyx::InsetTabular::draw(lyx::PainterInfo&, int, int) const + 567
13  org.lyx.lyx 0x00010843f745 
lyx::RowPainter::paintInset(lyx::Inset const*, lyx::Font const&, lyx::Change 
const&, long) + 541
14  org.lyx.lyx 0x0001084412dd 
lyx::RowPainter::paintText() + 413
15  org.lyx.lyx 0x00010848768e 
lyx::TextMetrics::drawParagraph(lyx::PainterInfo&, long, int, int) const + 2382
16  org.lyx.lyx 0x000108486d05 
lyx::TextMetrics::draw(lyx::PainterInfo&, int, int) const + 121
17  org.lyx.lyx 0x0001083483be 
lyx::BufferView::draw(lyx::frontend::Painter&) + 678
18  org.lyx.lyx 0x00010880afd6 
lyx::frontend::GuiWorkArea::Private::updateScreen() + 76
19  org.lyx.lyx 0x00010880aed9 
lyx::frontend::GuiWorkArea::redraw(bool) + 275
20  org.lyx.lyx 0x000108629933 
lyx::frontend::WorkAreaManager::redrawAll(bool) + 39
21  org.lyx.lyx 0x00010833af41 
lyx::BufferView::processUpdateFlags(lyx::Update::flags) + 385
22  org.lyx.lyx 0x00010864ede9 
lyx::frontend::GuiApplication::updateCurrentView(lyx::FuncRequest const&, 
lyx::DispatchResult&) + 147
23  org.lyx.lyx 0x00010864ecc2 
lyx::frontend::GuiApplication::dispatch(lyx::FuncRequest const&) + 198
24  org.lyx.lyx 0x00010864f463 non-virtual thunk to 
lyx::frontend::GuiApplication::dispatch(lyx::FuncRequest const&) + 13
25  org.lyx.lyx 0x0001083df393 
lyx::dispatch(lyx::FuncRequest const&) + 86
26  org.lyx.lyx 0x00010862c692 
lyx::frontend::Action::qt_static_metacall(QObject*, QMetaObject::Call, int, 
void**) + 154
27  org.qt-project.QtCore   0x000109838b4c 
QMetaObject::activate(QObject*, int, int, void**) + 3020
28  org.qt-project.QtWidgets0x000109ccc3d7 
QAction::activate(QAction::ActionEvent) + 263
29  org.qt-project.QtWidgets0x000109dc3d29 
QAbstractButtonPrivate::click() + 137
30  org.qt-project.QtWidgets0x000109dc