Re: lyx master crashed when converting text to note

2021-03-15 Thread V K


Message: 1
Date: Mon, 15 Mar 2021 14:05:13 +0100
From: Kornel Benko 
To: lyx-devel@lists.lyx.org
Subject: Re: lyx master crashed when converting text to note
Message-ID: <20210315140513.08a8be1b@admin1-desktop>
Content-Type: text/plain; charset="utf-8"

Am Mon, 15 Mar 2021 12:14:05 +0100
schrieb Jean-Marc Lasgouttes :

> Le 15/03/2021 ? 11:56, Pavel Sanda a ?crit?:
> > On Sun, Mar 14, 2021 at 09:41:48PM +0100, Jean-Marc Lasgouttes wrote:  
> >> Le 14/03/2021 ?? 21:14, Pavel Sanda a ?crit?:  
> >>>> Thanks for tracking this. I'll have look next week.  
> >>> Should I create ticket in trac?  
> >>
> >> Yes please. I have tried to reproduced using you recipe, but it seems that 
> >> I
> >> do not understand it. I cannot yet get the crash.  
> > 
> > I see, created ticket #12204.
> > Note, that one unwritten part of recipy seems to be that the lyx window 
> > needs
> > to be small enough, that once you select from  to the end of document 
> > (via
> > ctrl+shift+end) the the intial part === is not visible anymore in the 
> > window.  
> 
> Thanks. Indeed, I may have been missing the missing part :)
> 
> JMarc
> 

I was not able to reproduce. Even with the new recipe.

    Kornel



I reported this bug. I can't reproduce it when selecting from === to the end 
either, but selecting text (without author and title lines) from beginning to 
=== (including it) crashes Lyx. There is no crash when selecting from === to 
beginning of the text.
I compiled master yesterday.

Valdemaras
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: lyx master crashed when converting text to note

2021-03-15 Thread Pavel Sanda
On Mon, Mar 15, 2021 at 05:29:27PM +, V K wrote:
> I reported this bug. I can't reproduce it when selecting from === to the end 
> either

For the record, I can still reproduce the  -> end version of the crash...
I think the window geometry (or rather particular line breaking and visible
range) is what matters here.

P
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: lyx master crashed when converting text to note

2021-03-15 Thread Kornel Benko
Am Mon, 15 Mar 2021 12:14:05 +0100
schrieb Jean-Marc Lasgouttes :

> Le 15/03/2021 à 11:56, Pavel Sanda a écrit :
> > On Sun, Mar 14, 2021 at 09:41:48PM +0100, Jean-Marc Lasgouttes wrote:  
> >> Le 14/03/2021 ?? 21:14, Pavel Sanda a écrit :  
>  Thanks for tracking this. I'll have look next week.  
> >>> Should I create ticket in trac?  
> >>
> >> Yes please. I have tried to reproduced using you recipe, but it seems that 
> >> I
> >> do not understand it. I cannot yet get the crash.  
> > 
> > I see, created ticket #12204.
> > Note, that one unwritten part of recipy seems to be that the lyx window 
> > needs
> > to be small enough, that once you select from  to the end of document 
> > (via
> > ctrl+shift+end) the the intial part === is not visible anymore in the 
> > window.  
> 
> Thanks. Indeed, I may have been missing the missing part :)
> 
> JMarc
> 

I was not able to reproduce. Even with the new recipe.

Kornel


pgpYg6P7I4gra.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: lyx master crashed when converting text to note

2021-03-15 Thread Jean-Marc Lasgouttes

Le 15/03/2021 à 11:56, Pavel Sanda a écrit :

On Sun, Mar 14, 2021 at 09:41:48PM +0100, Jean-Marc Lasgouttes wrote:

Le 14/03/2021 ?? 21:14, Pavel Sanda a écrit :

Thanks for tracking this. I'll have look next week.

Should I create ticket in trac?


Yes please. I have tried to reproduced using you recipe, but it seems that I
do not understand it. I cannot yet get the crash.


I see, created ticket #12204.
Note, that one unwritten part of recipy seems to be that the lyx window needs
to be small enough, that once you select from  to the end of document (via 
ctrl+shift+end)
the the intial part === is not visible anymore in the window.


Thanks. Indeed, I may have been missing the missing part :)

JMarc

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: lyx master crashed when converting text to note

2021-03-15 Thread Pavel Sanda
On Sun, Mar 14, 2021 at 09:41:48PM +0100, Jean-Marc Lasgouttes wrote:
> Le 14/03/2021 ?? 21:14, Pavel Sanda a écrit :
> >>Thanks for tracking this. I'll have look next week.
> >Should I create ticket in trac?
> 
> Yes please. I have tried to reproduced using you recipe, but it seems that I
> do not understand it. I cannot yet get the crash.

I see, created ticket #12204.
Note, that one unwritten part of recipy seems to be that the lyx window needs
to be small enough, that once you select from  to the end of document (via 
ctrl+shift+end)
the the intial part === is not visible anymore in the window.

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: lyx master crashed when converting text to note

2021-03-14 Thread Jean-Marc Lasgouttes

Le 14/03/2021 à 21:14, Pavel Sanda a écrit :

Thanks for tracking this. I'll have look next week.

Should I create ticket in trac?


Yes please. I have tried to reproduced using you recipe, but it seems 
that I do not understand it. I cannot yet get the crash.


JMarc

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: lyx master crashed when converting text to note

2021-03-14 Thread Pavel Sanda
On Tue, Feb 23, 2021 at 12:44:18AM +0100, Jean-Marc Lasgouttes wrote:
> Le 22 février 2021 22:45:38 GMT+01:00, Pavel Sanda  a écrit :
> >On Mon, Feb 22, 2021 at 06:31:08PM +, V K wrote:
> >> Yes, I can recreate crash with anonymized file. I marked line/paragraph 
> >> part of which should be selected before creating note to get a crash with 
> >> . Selection should be from the first line. Selection should encompass 
> >> one line more on the bottom if selecting from the second line from the 
> >> top. That is the minimal length to get a crash.
> >
> >Indeed, I can reproduce the problem, generally selecting line starting with 
> >== to the very end of the document and then insert-note is enough to 
> >trigger it.
> >
> >Bisect leads to:
> >commit 5a58ca6576a1fa2d6bea8e9e7927d5779943e593
> >Author: Jean-Marc Lasgouttes 
> >Date:   Sun Feb 14 21:34:43 2021 +0100
> >
> >Fix caret height when inserting new inset
>  
> 
> Thanks for tracking this. I'll have look next week.
> 
> JMarc

Should I create ticket in trac?
Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: lyx master crashed when converting text to note

2021-02-22 Thread Jean-Marc Lasgouttes
Le 22 février 2021 22:45:38 GMT+01:00, Pavel Sanda  a écrit :
>On Mon, Feb 22, 2021 at 06:31:08PM +, V K wrote:
>> Yes, I can recreate crash with anonymized file. I marked line/paragraph part 
>> of which should be selected before creating note to get a crash with . 
>> Selection should be from the first line. Selection should encompass one line 
>> more on the bottom if selecting from the second line from the top. That is 
>> the minimal length to get a crash.
>
>Indeed, I can reproduce the problem, generally selecting line starting with 
>== to the very end of the document and then insert-note is enough to 
>trigger it.
>
>Bisect leads to:
>commit 5a58ca6576a1fa2d6bea8e9e7927d5779943e593
>Author: Jean-Marc Lasgouttes 
>Date:   Sun Feb 14 21:34:43 2021 +0100
>
>Fix caret height when inserting new inset
 

Thanks for tracking this. I'll have look next week.

JMarc
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: lyx master crashed when converting text to note

2021-02-22 Thread Pavel Sanda
On Mon, Feb 22, 2021 at 06:31:08PM +, V K wrote:
> Yes, I can recreate crash with anonymized file. I marked line/paragraph part 
> of which should be selected before creating note to get a crash with . 
> Selection should be from the first line. Selection should encompass one line 
> more on the bottom if selecting from the second line from the top. That is 
> the minimal length to get a crash.

Indeed, I can reproduce the problem, generally selecting line starting with 
== to the very end of the document and then insert-note is enough to 
trigger it.

Bisect leads to:
commit 5a58ca6576a1fa2d6bea8e9e7927d5779943e593
Author: Jean-Marc Lasgouttes 
Date:   Sun Feb 14 21:34:43 2021 +0100

Fix caret height when inserting new inset

For now, the simplest thing to do it to compute metrics in all cases
before calling setCurrentFont().

In 2.5, a better approach will be to add a new virtual function
InsetText::setFont that will set correctly TextMetrics::font_ (a cache
of the reference font).

Fixes bug #12126.


Backtrace:
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x76558535 in __GI_abort () at abort.c:79
#2  0x769247bd in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x562d6fef in 
std::__debug::vector<__gnu_debug::_Safe_iterator,
 std::__debug::list > >, 
std::allocator<__gnu_debug::_Safe_iterator,
 std::__debug::list > > > 
>::operator[] (this=0x7fffec009690, __n=37) at 
/usr/include/c++/8/debug/vector:417
#4  0x562d4acd in lyx::RandomAccessList::operator[] 
(this=0x7fffec009660, pos=37)
at ./support/RandomAccessList.h:161
#5  0x566295a8 in lyx::TextMetrics::checkInsetHit (this=0x581bdef8, 
pit=37, x=179, y=6)
at TextMetrics.cpp:1491
#6  0x566299ef in lyx::TextMetrics::checkInsetHit (this=0x581bdef8, 
x=179, y=6)
at TextMetrics.cpp:1515
#7  0x5668518a in lyx::BufferView::getCoveringInset 
(this=0x582f8430, text=..., x=179, y=6)
at BufferView.cpp:2303
#8  0x566852b1 in lyx::BufferView::updateHoveredInset 
(this=0x582f8430) at BufferView.cpp:2334
#9  0x5667ab85 in lyx::BufferView::processUpdateFlags 
(this=0x582f8430, 
flags=lyx::Update::SinglePar) at BufferView.cpp:574
#10 0x565ee806 in lyx::Text::dispatch (this=0x7fffec009658, cur=..., 
cmd=...) at Text3.cpp:2090
#11 0x569958a6 in lyx::InsetText::doDispatch (this=0x7fffec009640, 
cur=..., cmd=...)
at insets/InsetText.cpp:343
#12 0x568260b8 in lyx::Inset::dispatch (this=0x7fffec009640, cur=..., 
cmd=...) at insets/Inset.cpp:328
#13 0x56407754 in lyx::Cursor::dispatch (this=0x5836a088, cmd0=...) 
at Cursor.cpp:823
#14 0x56a2e35f in lyx::frontend::GuiView::dispatchToBufferView 
(this=0x57e02c30, cmd=..., dr=...)
at GuiView.cpp:3943
#15 0x56a3307b in lyx::frontend::GuiView::dispatch 
(this=0x57e02c30, cmd=..., dr=...)
at GuiView.cpp:4661
#16 0x569da4be in lyx::frontend::GuiApplication::dispatch 
(this=0x57424ff0, cmd=..., dr=...)
at GuiApplication.cpp:2211
#17 0x569d5dc8 in lyx::frontend::GuiApplication::dispatch 
(this=0x57424ff0, cmd=...)
at GuiApplication.cpp:1500
#18 0x564e9b1f in lyx::dispatch (action=...) at LyX.cpp:1477
#19 0x56a98a82 in lyx::frontend::Action::action (this=0x581cdf90) 
at Action.cpp:91
#20 0x56a98af8 in lyx::frontend::Action::qt_static_metacall 
(_o=0x581cdf90, 


Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel