Re: Crash when opening the tutorial with cursor at line with icon

2015-03-22 Thread Enrico Forestieri
On Sat, Mar 21, 2015 at 11:07:03PM +0100, Stephan Witt wrote:
 
 I found a way to reproduce it:
 1) Open a document with info inset included.
 2) Go to a line with info inset to display (some text to scroll down).
 3) Position the cursor near the inset.
 4) Quit LyX and restart.
 5) Load the previously closed document - crash on cursor positioning.
 
 To solve that issue one has to remove the offending line in section 
 [cursor positions] of the session state.
 
 After the removal I can reproduce it again with the same document and the
 same procedure. I'll attach my example document.
 
 To trigger the crash the info inset has to be visible and it must be some
 scroll down involved to show the cursor position on startup.

With your test case, the crash is always reproducible. It seems to be
related to the fact that the svg files are uncompressed before being
used. Most probably, it is not the fact of being compressed per se, but
rather the fact that the files are uncompressed to a temporary file that
gets removed afterwards. There must be something that expects to be able
to still access the file, and it is not there anymore.
Indeed, if you launch the script attached here
http://article.gmane.org/gmane.editors.lyx.devel/154441
and recompile, the crash is gone.

-- 
Enrico


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-22 Thread Enrico Forestieri
On Sun, Mar 22, 2015 at 07:46:50PM +0100, Enrico Forestieri wrote:

 On Sat, Mar 21, 2015 at 11:07:03PM +0100, Stephan Witt wrote:
  
  I found a way to reproduce it:
  1) Open a document with info inset included.
  2) Go to a line with info inset to display (some text to scroll down).
  3) Position the cursor near the inset.
  4) Quit LyX and restart.
  5) Load the previously closed document - crash on cursor positioning.
  
  To solve that issue one has to remove the offending line in section 
  [cursor positions] of the session state.
  
  After the removal I can reproduce it again with the same document and the
  same procedure. I'll attach my example document.
  
  To trigger the crash the info inset has to be visible and it must be some
  scroll down involved to show the cursor position on startup.
 
 With your test case, the crash is always reproducible. It seems to be
 related to the fact that the svg files are uncompressed before being
 used. Most probably, it is not the fact of being compressed per se, but
 rather the fact that the files are uncompressed to a temporary file that
 gets removed afterwards. There must be something that expects to be able
 to still access the file, and it is not there anymore.
 Indeed, if you launch the script attached here
 http://article.gmane.org/gmane.editors.lyx.devel/154441
 and recompile, the crash is gone.

I have pushed a change at 7da981b3 that avoids the crash. With this
change, the compressed svg icons are used as is, without first
uncompressing them. The reason of the crash is still unknown, but it
is surely related to the removal of the temporary file and some sort
of race condition that your document exploits fully, apparently.

-- 
Enrico


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-22 Thread Enrico Forestieri
On Sat, Mar 21, 2015 at 11:07:03PM +0100, Stephan Witt wrote:
> 
> I found a way to reproduce it:
> 1) Open a document with info inset included.
> 2) Go to a line with info inset to display (some text to scroll down).
> 3) Position the cursor near the inset.
> 4) Quit LyX and restart.
> 5) Load the previously closed document -> crash on cursor positioning.
> 
> To solve that issue one has to remove the offending line in section 
> [cursor positions] of the session state.
> 
> After the removal I can reproduce it again with the same document and the
> same procedure. I'll attach my example document.
> 
> To trigger the crash the info inset has to be visible and it must be some
> scroll down involved to show the cursor position on startup.

With your test case, the crash is always reproducible. It seems to be
related to the fact that the svg files are uncompressed before being
used. Most probably, it is not the fact of being compressed per se, but
rather the fact that the files are uncompressed to a temporary file that
gets removed afterwards. There must be something that expects to be able
to still access the file, and it is not there anymore.
Indeed, if you launch the script attached here
http://article.gmane.org/gmane.editors.lyx.devel/154441
and recompile, the crash is gone.

-- 
Enrico


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-22 Thread Enrico Forestieri
On Sun, Mar 22, 2015 at 07:46:50PM +0100, Enrico Forestieri wrote:

> On Sat, Mar 21, 2015 at 11:07:03PM +0100, Stephan Witt wrote:
> > 
> > I found a way to reproduce it:
> > 1) Open a document with info inset included.
> > 2) Go to a line with info inset to display (some text to scroll down).
> > 3) Position the cursor near the inset.
> > 4) Quit LyX and restart.
> > 5) Load the previously closed document -> crash on cursor positioning.
> > 
> > To solve that issue one has to remove the offending line in section 
> > [cursor positions] of the session state.
> > 
> > After the removal I can reproduce it again with the same document and the
> > same procedure. I'll attach my example document.
> > 
> > To trigger the crash the info inset has to be visible and it must be some
> > scroll down involved to show the cursor position on startup.
> 
> With your test case, the crash is always reproducible. It seems to be
> related to the fact that the svg files are uncompressed before being
> used. Most probably, it is not the fact of being compressed per se, but
> rather the fact that the files are uncompressed to a temporary file that
> gets removed afterwards. There must be something that expects to be able
> to still access the file, and it is not there anymore.
> Indeed, if you launch the script attached here
> http://article.gmane.org/gmane.editors.lyx.devel/154441
> and recompile, the crash is gone.

I have pushed a change at 7da981b3 that avoids the crash. With this
change, the compressed svg icons are used as is, without first
uncompressing them. The reason of the crash is still unknown, but it
is surely related to the removal of the temporary file and some sort
of race condition that your document exploits fully, apparently.

-- 
Enrico


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-21 Thread Stephan Witt
Am 21.03.2015 um 00:19 schrieb Enrico Forestieri for...@lyx.org:

 On Fri, Mar 20, 2015 at 03:15:58PM +0100, Stephan Witt wrote:
 
 Am 20.03.2015 um 11:55 schrieb Kornel Benko kor...@lyx.org:
 
 Am Freitag, 20. März 2015 um 11:45:43, schrieb Stephan Witt 
 st.w...@gmx.net
 This is lyx-build/LyX-2.2.0dev-7416064 (git commit hash
 74160640337b63b1fb21c9690289f0ebb29c0820)
 
 After quit LyX with the cursor at a line containing an icon and restart it
 I get a crash on load of the mentioned LyX file.
 I tried to activate malloc debug but this did not help to pin point the
 problem. I cannot interpret the state of the stack trace and of the local
 variables. The ParagraphMetrics instance in TextMetrics::redoParagraph
 (stack frame 4) is corrupt. The call stack is:
 
 Could not reproduce on ubuntu. Maybe a specific icon? Which line, if yes?
 Which icon-set? (Classic, Oxygen)? Lang env?
 
 
 The debugger is running with LANG=de_DE.UTF-8
 
 I tried to create a minimal example and this does not crash. But it possibly
 answers your questions. I'll have to investigate if QtSession settings are
 the problem here.
 
 I have seen this strange behavior, although it does not seem to occur
 anymore for me. Once LyX starts crashing, one cannot effectively load that
 document anymore. I did not understand why that happens and the only
 workaround I found is editing the ~/.lyx/session file and deleting the
 line with cursor info for that particualr document. After doing that,
 LyX doesn't crash anymore, even placing the cursor at the same
 position that initially triggered the crash.

Yes, I did remember vaguely. So, there is no hope to fix it? I'm afraid I cannot
reproduce it anymore after deleting the session state.

Stephan

Re: Crash when opening the tutorial with cursor at line with icon

2015-03-21 Thread Enrico Forestieri
On Sat, Mar 21, 2015 at 09:35:32AM +0100, Stephan Witt wrote:
 Am 21.03.2015 um 00:19 schrieb Enrico Forestieri for...@lyx.org:
  
  I have seen this strange behavior, although it does not seem to occur
  anymore for me. Once LyX starts crashing, one cannot effectively load that
  document anymore. I did not understand why that happens and the only
  workaround I found is editing the ~/.lyx/session file and deleting the
  line with cursor info for that particualr document. After doing that,
  LyX doesn't crash anymore, even placing the cursor at the same
  position that initially triggered the crash.
 
 Yes, I did remember vaguely. So, there is no hope to fix it?

I could not make any sense of the backtrace and, once deleting the
session info (note that you can simply remove the entry for the
cursor position for that document, no need to remove the file), the
bug does not occur anymore. So, seemingly, there is something fishy
that triggers the crash when the following occurs:
1) You previously used pngs.
2) You close a document when the cursor was near (same paragraph, maybe?)
   an info inset.
3) You switch to svg icons.
4) You load the previously closed document.

 I'm afraid I cannot reproduce it anymore after deleting the session state.

Same here. It would be worth understanding the reason, but given that
it seems a one-shot bug, I am not motivated to spend time on this.

-- 
Enrico


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-21 Thread Stephan Witt
Am 21.03.2015 um 13:18 schrieb Enrico Forestieri for...@lyx.org:

 On Sat, Mar 21, 2015 at 09:35:32AM +0100, Stephan Witt wrote:
 Am 21.03.2015 um 00:19 schrieb Enrico Forestieri for...@lyx.org:
 
 I have seen this strange behavior, although it does not seem to occur
 anymore for me. Once LyX starts crashing, one cannot effectively load that
 document anymore. I did not understand why that happens and the only
 workaround I found is editing the ~/.lyx/session file and deleting the
 line with cursor info for that particualr document. After doing that,
 LyX doesn't crash anymore, even placing the cursor at the same
 position that initially triggered the crash.
 
 Yes, I did remember vaguely. So, there is no hope to fix it?
 
 I could not make any sense of the backtrace and, once deleting the
 session info (note that you can simply remove the entry for the
 cursor position for that document, no need to remove the file), the
 bug does not occur anymore. So, seemingly, there is something fishy
 that triggers the crash when the following occurs:
 1) You previously used pngs.
 2) You close a document when the cursor was near (same paragraph, maybe?)
   an info inset.
 3) You switch to svg icons.
 4) You load the previously closed document.
 
 I'm afraid I cannot reproduce it anymore after deleting the session state.
 
 Same here. It would be worth understanding the reason, but given that
 it seems a one-shot bug, I am not motivated to spend time on this.

I found a way to reproduce it:
1) Open a document with info inset included.
2) Go to a line with info inset to display (some text to scroll down).
3) Position the cursor near the inset.
4) Quit LyX and restart.
5) Load the previously closed document - crash on cursor positioning.

To solve that issue one has to remove the offending line in section 
[cursor positions] of the session state.

After the removal I can reproduce it again with the same document and the
same procedure. I'll attach my example document.

To trigger the crash the info inset has to be visible and it must be some
scroll down involved to show the cursor position on startup.

Stephan



IconCrashTest.lyx
Description: Binary data


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-21 Thread Stephan Witt
Am 21.03.2015 um 00:19 schrieb Enrico Forestieri :

> On Fri, Mar 20, 2015 at 03:15:58PM +0100, Stephan Witt wrote:
> 
>> Am 20.03.2015 um 11:55 schrieb Kornel Benko :
>> 
>>> Am Freitag, 20. März 2015 um 11:45:43, schrieb Stephan Witt 
>>> 
 This is lyx-build/LyX-2.2.0dev-7416064 (git commit hash
 74160640337b63b1fb21c9690289f0ebb29c0820)
 
 After quit LyX with the cursor at a line containing an icon and restart it
 I get a crash on load of the mentioned LyX file.
 I tried to activate malloc debug but this did not help to pin point the
 problem. I cannot interpret the state of the stack trace and of the local
 variables. The ParagraphMetrics instance in TextMetrics::redoParagraph
 (stack frame 4) is corrupt. The call stack is:
>>> 
>>> Could not reproduce on ubuntu. Maybe a specific icon? Which line, if yes?
>>> Which icon-set? (Classic, Oxygen)? Lang env?
>> 
>> 
>> The debugger is running with LANG=de_DE.UTF-8
>> 
>> I tried to create a minimal example and this does not crash. But it possibly
>> answers your questions. I'll have to investigate if QtSession settings are
>> the problem here.
> 
> I have seen this strange behavior, although it does not seem to occur
> anymore for me. Once LyX starts crashing, one cannot effectively load that
> document anymore. I did not understand why that happens and the only
> workaround I found is editing the ~/.lyx/session file and deleting the
> line with cursor info for that particualr document. After doing that,
> LyX doesn't crash anymore, even placing the cursor at the same
> position that initially triggered the crash.

Yes, I did remember vaguely. So, there is no hope to fix it? I'm afraid I cannot
reproduce it anymore after deleting the session state.

Stephan

Re: Crash when opening the tutorial with cursor at line with icon

2015-03-21 Thread Enrico Forestieri
On Sat, Mar 21, 2015 at 09:35:32AM +0100, Stephan Witt wrote:
> Am 21.03.2015 um 00:19 schrieb Enrico Forestieri :
> > 
> > I have seen this strange behavior, although it does not seem to occur
> > anymore for me. Once LyX starts crashing, one cannot effectively load that
> > document anymore. I did not understand why that happens and the only
> > workaround I found is editing the ~/.lyx/session file and deleting the
> > line with cursor info for that particualr document. After doing that,
> > LyX doesn't crash anymore, even placing the cursor at the same
> > position that initially triggered the crash.
> 
> Yes, I did remember vaguely. So, there is no hope to fix it?

I could not make any sense of the backtrace and, once deleting the
session info (note that you can simply remove the entry for the
cursor position for that document, no need to remove the file), the
bug does not occur anymore. So, seemingly, there is something fishy
that triggers the crash when the following occurs:
1) You previously used pngs.
2) You close a document when the cursor was near (same paragraph, maybe?)
   an info inset.
3) You switch to svg icons.
4) You load the previously closed document.

> I'm afraid I cannot reproduce it anymore after deleting the session state.

Same here. It would be worth understanding the reason, but given that
it seems a one-shot bug, I am not motivated to spend time on this.

-- 
Enrico


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-21 Thread Stephan Witt
Am 21.03.2015 um 13:18 schrieb Enrico Forestieri :

> On Sat, Mar 21, 2015 at 09:35:32AM +0100, Stephan Witt wrote:
>> Am 21.03.2015 um 00:19 schrieb Enrico Forestieri :
>>> 
>>> I have seen this strange behavior, although it does not seem to occur
>>> anymore for me. Once LyX starts crashing, one cannot effectively load that
>>> document anymore. I did not understand why that happens and the only
>>> workaround I found is editing the ~/.lyx/session file and deleting the
>>> line with cursor info for that particualr document. After doing that,
>>> LyX doesn't crash anymore, even placing the cursor at the same
>>> position that initially triggered the crash.
>> 
>> Yes, I did remember vaguely. So, there is no hope to fix it?
> 
> I could not make any sense of the backtrace and, once deleting the
> session info (note that you can simply remove the entry for the
> cursor position for that document, no need to remove the file), the
> bug does not occur anymore. So, seemingly, there is something fishy
> that triggers the crash when the following occurs:
> 1) You previously used pngs.
> 2) You close a document when the cursor was near (same paragraph, maybe?)
>   an info inset.
> 3) You switch to svg icons.
> 4) You load the previously closed document.
> 
>> I'm afraid I cannot reproduce it anymore after deleting the session state.
> 
> Same here. It would be worth understanding the reason, but given that
> it seems a one-shot bug, I am not motivated to spend time on this.

I found a way to reproduce it:
1) Open a document with info inset included.
2) Go to a line with info inset to display (some text to scroll down).
3) Position the cursor near the inset.
4) Quit LyX and restart.
5) Load the previously closed document -> crash on cursor positioning.

To solve that issue one has to remove the offending line in section 
[cursor positions] of the session state.

After the removal I can reproduce it again with the same document and the
same procedure. I'll attach my example document.

To trigger the crash the info inset has to be visible and it must be some
scroll down involved to show the cursor position on startup.

Stephan



IconCrashTest.lyx
Description: Binary data


Crash when opening the tutorial with cursor at line with icon

2015-03-20 Thread Stephan Witt
This is lyx-build/LyX-2.2.0dev-7416064 (git commit hash 
74160640337b63b1fb21c9690289f0ebb29c0820)

After quit LyX with the cursor at a line containing an icon and restart it I 
get a crash on load of the mentioned LyX file.
I tried to activate malloc debug but this did not help to pin point the 
problem. I cannot interpret the state of the stack trace and of the local 
variables. The ParagraphMetrics instance in TextMetrics::redoParagraph (stack 
frame 4) is corrupt. The call stack is:

(lldb) bt
* thread #1: tid = 0x6e90c1, 0x0001000ebecc LyX`std::_Rb_treelyx::Inset 
const*, std::pairlyx::Inset const* const, lyx::Dimension, 
std::_Select1ststd::pairlyx::Inset const* const, lyx::Dimension , 
std::lesslyx::Inset const*, std::allocatorstd::pairlyx::Inset const* const, 
lyx::Dimension  ::_M_begin(this=0x0003d7e79fd0) const + 12 at 
stl_tree.h:482, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS 
(code=1, address=0x3d7e79fe0)
  * frame #0: 0x0001000ebecc LyX`std::_Rb_treelyx::Inset const*, 
std::pairlyx::Inset const* const, lyx::Dimension, 
std::_Select1ststd::pairlyx::Inset const* const, lyx::Dimension , 
std::lesslyx::Inset const*, std::allocatorstd::pairlyx::Inset const* const, 
lyx::Dimension  ::_M_begin(this=0x0003d7e79fd0) const + 12 at 
stl_tree.h:482
frame #1: 0x000100297c50 LyX`std::_Rb_treelyx::Inset const*, 
std::pairlyx::Inset const* const, lyx::Dimension, 
std::_Select1ststd::pairlyx::Inset const* const, lyx::Dimension , 
std::lesslyx::Inset const*, std::allocatorstd::pairlyx::Inset const* const, 
lyx::Dimension  ::find(this=0x0003d7e79fd0, __k=0x7fff5fbfa638) 
const + 32 at stl_tree.h:1395
frame #2: 0x000100296b8d LyX`std::maplyx::Inset const*, 
lyx::Dimension, std::lesslyx::Inset const*, 
std::allocatorstd::pairlyx::Inset const* const, lyx::Dimension  
::find(this=0x0003d7e79fd0, __x=0x7fff5fbfa638) const + 29 at 
stl_map.h:557
frame #3: 0x000100295bde 
LyX`lyx::ParagraphMetrics::insetDimension(this=0x0003d7e79f98, 
inset=0x0003938fbf60) const + 46 at ParagraphMetrics.cpp:124
frame #4: 0x0001002fff11 
LyX`lyx::TextMetrics::redoParagraph(this=0x0003d7e77f48, pit=0) + 2385 at 
TextMetrics.cpp:449
frame #5: 0x0001003009ca 
LyX`lyx::TextMetrics::metrics(this=0x0003d7e77f48, mi=0x7fff5fbfb540, 
dim=0x7fff5fbfb610, min_width=0) + 250 at TextMetrics.cpp:200
frame #6: 0x0001005dafd8 
LyX`lyx::InsetText::metrics(this=0x00039365fee0, mi=0x7fff5fbfb540, 
dim=0x7fff5fbfb610) const + 232 at InsetText.cpp:206
frame #7: 0x0001004d55bf 
LyX`lyx::InsetCollapsable::metrics(this=0x00039365fee0, 
mi=0x7fff5fbfb540, dim=0x7fff5fbfb610) const + 479 at 
InsetCollapsable.cpp:199
frame #8: 0x0001002ffecf 
LyX`lyx::TextMetrics::redoParagraph(this=0x0003d5d6df48, pit=162) + 2319 at 
TextMetrics.cpp:448
frame #9: 0x0001000d4a13 
LyX`lyx::BufferView::updateMetrics(this=0x0003af232fe0) + 963 at 
BufferView.cpp:2709
frame #10: 0x00010089ab55 
LyX`lyx::frontend::GuiWorkArea::redraw(this=0x0003ae582fc0, 
update_metrics=true) + 181 at GuiWorkArea.cpp:475
frame #11: 0x00010089ae8c LyX`non-virtual thunk to 
lyx::frontend::GuiWorkArea::redraw(this=0x0003ae582ff0, 
update_metrics=true) + 44 at GuiWorkArea.cpp:501
frame #12: 0x0001005ed525 
LyX`lyx::frontend::WorkAreaManager::redrawAll(this=0x0003362aeff0, 
update_metrics=true) + 117 at WorkAreaManager.cpp:39
frame #13: 0x000100035cce 
LyX`lyx::Buffer::changed(this=0x00031f804fc0, update_metrics=true) const + 
78 at Buffer.cpp:625
frame #14: 0x0001000d61b2 
LyX`lyx::BufferView::showCursor(this=0x0003af232fe0, 
dit=0x0003af234b58, recenter=false, update=true) + 114 at BufferView.cpp:856
frame #15: 0x0001000d437c 
LyX`lyx::BufferView::showCursor(this=0x0003af232fe0) + 44 at 
BufferView.cpp:848
frame #16: 0x0001000d7155 
LyX`lyx::BufferView::moveToPosition(this=0x0003af232fe0, bottom_pit=163, 
bottom_pos=17, top_id=0, top_pos=0) + 1173 at BufferView.cpp:813
frame #17: 0x000100866eb4 
LyX`lyx::frontend::GuiView::setBuffer(this=0x000293e5dfa0, 
newBuffer=0x00031f804fc0) + 500 at GuiView.cpp:1504
frame #18: 0x00010086a066 
LyX`lyx::frontend::GuiView::loadDocument(this=0x000293e5dfa0, 
filename=0x7fff5fbfd248, tolastfiles=false) + 598 at GuiView.cpp:2011
frame #19: 0x00010062c021 
LyX`lyx::frontend::GuiApplication::dispatch(this=0x00010c3a4fd0, 
cmd=0x000317fa1a70, dr=0x7fff5fbfd3d0) + 7233 at GuiApplication.cpp:1664
frame #20: 0x00010062876c 
LyX`lyx::frontend::GuiApplication::dispatch(this=0x00010c3a4fd0, 
cmd=0x000317fa1a70) + 220 at GuiApplication.cpp:1364
frame #21: 0x000100628a6f LyX`non-virtual thunk to 
lyx::frontend::GuiApplication::dispatch(this=0x00010c3a4fe0, 
cmd=0x000317fa1a70) + 47 at GuiApplication.cpp:1370
frame #22: 

Re: Crash when opening the tutorial with cursor at line with icon

2015-03-20 Thread Kornel Benko
Am Freitag, 20. März 2015 um 11:45:43, schrieb Stephan Witt st.w...@gmx.net
 This is lyx-build/LyX-2.2.0dev-7416064 (git commit hash 
 74160640337b63b1fb21c9690289f0ebb29c0820)
 
 After quit LyX with the cursor at a line containing an icon and restart it I 
 get a crash on load of the mentioned LyX file.
 I tried to activate malloc debug but this did not help to pin point the 
 problem. I cannot interpret the state of the stack trace and of the local 
 variables. The ParagraphMetrics instance in TextMetrics::redoParagraph (stack 
 frame 4) is corrupt. The call stack is:

Could not reproduce on ubuntu. Maybe a specific icon? Which line, if yes?
Which icon-set? (Classic, Oxygen)? Lang env?

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-20 Thread Enrico Forestieri
On Fri, Mar 20, 2015 at 03:15:58PM +0100, Stephan Witt wrote:

 Am 20.03.2015 um 11:55 schrieb Kornel Benko kor...@lyx.org:
 
  Am Freitag, 20. März 2015 um 11:45:43, schrieb Stephan Witt 
  st.w...@gmx.net
  This is lyx-build/LyX-2.2.0dev-7416064 (git commit hash
  74160640337b63b1fb21c9690289f0ebb29c0820)
  
  After quit LyX with the cursor at a line containing an icon and restart it
  I get a crash on load of the mentioned LyX file.
  I tried to activate malloc debug but this did not help to pin point the
  problem. I cannot interpret the state of the stack trace and of the local
  variables. The ParagraphMetrics instance in TextMetrics::redoParagraph
  (stack frame 4) is corrupt. The call stack is:
  
  Could not reproduce on ubuntu. Maybe a specific icon? Which line, if yes?
  Which icon-set? (Classic, Oxygen)? Lang env?
 
 
 The debugger is running with LANG=de_DE.UTF-8
 
 I tried to create a minimal example and this does not crash. But it possibly
 answers your questions. I'll have to investigate if QtSession settings are
 the problem here.

I have seen this strange behavior, although it does not seem to occur
anymore for me. Once LyX starts crashing, one cannot effectively load that
document anymore. I did not understand why that happens and the only
workaround I found is editing the ~/.lyx/session file and deleting the
line with cursor info for that particualr document. After doing that,
LyX doesn't crash anymore, even placing the cursor at the same
position that initially triggered the crash.

-- 
Enrico


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-20 Thread Stephan Witt
Am 20.03.2015 um 11:55 schrieb Kornel Benko kor...@lyx.org:

 Am Freitag, 20. März 2015 um 11:45:43, schrieb Stephan Witt st.w...@gmx.net
 This is lyx-build/LyX-2.2.0dev-7416064 (git commit hash 
 74160640337b63b1fb21c9690289f0ebb29c0820)
 
 After quit LyX with the cursor at a line containing an icon and restart it I 
 get a crash on load of the mentioned LyX file.
 I tried to activate malloc debug but this did not help to pin point the 
 problem. I cannot interpret the state of the stack trace and of the local 
 variables. The ParagraphMetrics instance in TextMetrics::redoParagraph 
 (stack frame 4) is corrupt. The call stack is:
 
 Could not reproduce on ubuntu. Maybe a specific icon? Which line, if yes?
 Which icon-set? (Classic, Oxygen)? Lang env?


The debugger is running with LANG=de_DE.UTF-8

I tried to create a minimal example and this does not crash. But it possibly 
answers your questions. I'll have to investigate if QtSession settings are the 
problem here.

Stephan



IconCrashTest.lyx
Description: Binary data


Crash when opening the tutorial with cursor at line with icon

2015-03-20 Thread Stephan Witt
This is lyx-build/LyX-2.2.0dev-7416064 (git commit hash 
74160640337b63b1fb21c9690289f0ebb29c0820)

After quit LyX with the cursor at a line containing an icon and restart it I 
get a crash on load of the mentioned LyX file.
I tried to activate malloc debug but this did not help to pin point the 
problem. I cannot interpret the state of the stack trace and of the local 
variables. The ParagraphMetrics instance in TextMetrics::redoParagraph (stack 
frame 4) is corrupt. The call stack is:

(lldb) bt
* thread #1: tid = 0x6e90c1, 0x0001000ebecc LyX`std::_Rb_tree, 
std::_Select1st, 
std::less, std::allocator >::_M_begin(this=0x0003d7e79fd0) const + 12 at 
stl_tree.h:482, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS 
(code=1, address=0x3d7e79fe0)
  * frame #0: 0x0001000ebecc LyX`std::_Rb_tree, 
std::_Select1st, 
std::less, std::allocator >::_M_begin(this=0x0003d7e79fd0) const + 12 at 
stl_tree.h:482
frame #1: 0x000100297c50 LyX`std::_Rb_tree, 
std::_Select1st, 
std::less, std::allocator >::find(this=0x0003d7e79fd0, __k=0x7fff5fbfa638) 
const + 32 at stl_tree.h:1395
frame #2: 0x000100296b8d LyX`std::map, 
std::allocator 
>::find(this=0x0003d7e79fd0, __x=0x7fff5fbfa638) const + 29 at 
stl_map.h:557
frame #3: 0x000100295bde 
LyX`lyx::ParagraphMetrics::insetDimension(this=0x0003d7e79f98, 
inset=0x0003938fbf60) const + 46 at ParagraphMetrics.cpp:124
frame #4: 0x0001002fff11 
LyX`lyx::TextMetrics::redoParagraph(this=0x0003d7e77f48, pit=0) + 2385 at 
TextMetrics.cpp:449
frame #5: 0x0001003009ca 
LyX`lyx::TextMetrics::metrics(this=0x0003d7e77f48, mi=0x7fff5fbfb540, 
dim=0x7fff5fbfb610, min_width=0) + 250 at TextMetrics.cpp:200
frame #6: 0x0001005dafd8 
LyX`lyx::InsetText::metrics(this=0x00039365fee0, mi=0x7fff5fbfb540, 
dim=0x7fff5fbfb610) const + 232 at InsetText.cpp:206
frame #7: 0x0001004d55bf 
LyX`lyx::InsetCollapsable::metrics(this=0x00039365fee0, 
mi=0x7fff5fbfb540, dim=0x7fff5fbfb610) const + 479 at 
InsetCollapsable.cpp:199
frame #8: 0x0001002ffecf 
LyX`lyx::TextMetrics::redoParagraph(this=0x0003d5d6df48, pit=162) + 2319 at 
TextMetrics.cpp:448
frame #9: 0x0001000d4a13 
LyX`lyx::BufferView::updateMetrics(this=0x0003af232fe0) + 963 at 
BufferView.cpp:2709
frame #10: 0x00010089ab55 
LyX`lyx::frontend::GuiWorkArea::redraw(this=0x0003ae582fc0, 
update_metrics=true) + 181 at GuiWorkArea.cpp:475
frame #11: 0x00010089ae8c LyX`non-virtual thunk to 
lyx::frontend::GuiWorkArea::redraw(this=0x0003ae582ff0, 
update_metrics=true) + 44 at GuiWorkArea.cpp:501
frame #12: 0x0001005ed525 
LyX`lyx::frontend::WorkAreaManager::redrawAll(this=0x0003362aeff0, 
update_metrics=true) + 117 at WorkAreaManager.cpp:39
frame #13: 0x000100035cce 
LyX`lyx::Buffer::changed(this=0x00031f804fc0, update_metrics=true) const + 
78 at Buffer.cpp:625
frame #14: 0x0001000d61b2 
LyX`lyx::BufferView::showCursor(this=0x0003af232fe0, 
dit=0x0003af234b58, recenter=false, update=true) + 114 at BufferView.cpp:856
frame #15: 0x0001000d437c 
LyX`lyx::BufferView::showCursor(this=0x0003af232fe0) + 44 at 
BufferView.cpp:848
frame #16: 0x0001000d7155 
LyX`lyx::BufferView::moveToPosition(this=0x0003af232fe0, bottom_pit=163, 
bottom_pos=17, top_id=0, top_pos=0) + 1173 at BufferView.cpp:813
frame #17: 0x000100866eb4 
LyX`lyx::frontend::GuiView::setBuffer(this=0x000293e5dfa0, 
newBuffer=0x00031f804fc0) + 500 at GuiView.cpp:1504
frame #18: 0x00010086a066 
LyX`lyx::frontend::GuiView::loadDocument(this=0x000293e5dfa0, 
filename=0x7fff5fbfd248, tolastfiles=false) + 598 at GuiView.cpp:2011
frame #19: 0x00010062c021 
LyX`lyx::frontend::GuiApplication::dispatch(this=0x00010c3a4fd0, 
cmd=0x000317fa1a70, dr=0x7fff5fbfd3d0) + 7233 at GuiApplication.cpp:1664
frame #20: 0x00010062876c 
LyX`lyx::frontend::GuiApplication::dispatch(this=0x00010c3a4fd0, 
cmd=0x000317fa1a70) + 220 at GuiApplication.cpp:1364
frame #21: 0x000100628a6f LyX`non-virtual thunk to 
lyx::frontend::GuiApplication::dispatch(this=0x00010c3a4fe0, 
cmd=0x000317fa1a70) + 47 at GuiApplication.cpp:1370
frame #22: 0x0001002361d4 LyX`lyx::dispatch(action=0x000317fa1a70) 
+ 84 at LyX.cpp:1360
frame #23: 0x0001005edfd0 
LyX`lyx::frontend::Action::action(this=0x0003181a9fe0) + 32 at Action.cpp:65
frame #24: 0x0001005ee0d6 
LyX`lyx::frontend::Action::qt_static_metacall(_o=0x0003181a9fe0, 
_c=InvokeMetaMethod, _id=1, _a=0x7fff5fbfd8b0) + 118 at moc_Action.cpp:77
frame #25: 0x000101f30f3b 
QtCore_debug`QMetaObject::activate(sender=0x0003181a9fe0, signalOffset=3, 
local_signal_index=1, argv=0x7fff5fbfd8b0) + 2939 at qobject.cpp:3681
frame 

Re: Crash when opening the tutorial with cursor at line with icon

2015-03-20 Thread Kornel Benko
Am Freitag, 20. März 2015 um 11:45:43, schrieb Stephan Witt 
> This is lyx-build/LyX-2.2.0dev-7416064 (git commit hash 
> 74160640337b63b1fb21c9690289f0ebb29c0820)
> 
> After quit LyX with the cursor at a line containing an icon and restart it I 
> get a crash on load of the mentioned LyX file.
> I tried to activate malloc debug but this did not help to pin point the 
> problem. I cannot interpret the state of the stack trace and of the local 
> variables. The ParagraphMetrics instance in TextMetrics::redoParagraph (stack 
> frame 4) is corrupt. The call stack is:

Could not reproduce on ubuntu. Maybe a specific icon? Which line, if yes?
Which icon-set? (Classic, Oxygen)? Lang env?

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-20 Thread Stephan Witt
Am 20.03.2015 um 11:55 schrieb Kornel Benko :

> Am Freitag, 20. März 2015 um 11:45:43, schrieb Stephan Witt 
>> This is lyx-build/LyX-2.2.0dev-7416064 (git commit hash 
>> 74160640337b63b1fb21c9690289f0ebb29c0820)
>> 
>> After quit LyX with the cursor at a line containing an icon and restart it I 
>> get a crash on load of the mentioned LyX file.
>> I tried to activate malloc debug but this did not help to pin point the 
>> problem. I cannot interpret the state of the stack trace and of the local 
>> variables. The ParagraphMetrics instance in TextMetrics::redoParagraph 
>> (stack frame 4) is corrupt. The call stack is:
> 
> Could not reproduce on ubuntu. Maybe a specific icon? Which line, if yes?
> Which icon-set? (Classic, Oxygen)? Lang env?


The debugger is running with LANG=de_DE.UTF-8

I tried to create a minimal example and this does not crash. But it possibly 
answers your questions. I'll have to investigate if QtSession settings are the 
problem here.

Stephan



IconCrashTest.lyx
Description: Binary data


Re: Crash when opening the tutorial with cursor at line with icon

2015-03-20 Thread Enrico Forestieri
On Fri, Mar 20, 2015 at 03:15:58PM +0100, Stephan Witt wrote:

> Am 20.03.2015 um 11:55 schrieb Kornel Benko :
> 
> > Am Freitag, 20. März 2015 um 11:45:43, schrieb Stephan Witt 
> > 
> >> This is lyx-build/LyX-2.2.0dev-7416064 (git commit hash
> >> 74160640337b63b1fb21c9690289f0ebb29c0820)
> >> 
> >> After quit LyX with the cursor at a line containing an icon and restart it
> >> I get a crash on load of the mentioned LyX file.
> >> I tried to activate malloc debug but this did not help to pin point the
> >> problem. I cannot interpret the state of the stack trace and of the local
> >> variables. The ParagraphMetrics instance in TextMetrics::redoParagraph
> >> (stack frame 4) is corrupt. The call stack is:
> > 
> > Could not reproduce on ubuntu. Maybe a specific icon? Which line, if yes?
> > Which icon-set? (Classic, Oxygen)? Lang env?
> 
> 
> The debugger is running with LANG=de_DE.UTF-8
> 
> I tried to create a minimal example and this does not crash. But it possibly
> answers your questions. I'll have to investigate if QtSession settings are
> the problem here.

I have seen this strange behavior, although it does not seem to occur
anymore for me. Once LyX starts crashing, one cannot effectively load that
document anymore. I did not understand why that happens and the only
workaround I found is editing the ~/.lyx/session file and deleting the
line with cursor info for that particualr document. After doing that,
LyX doesn't crash anymore, even placing the cursor at the same
position that initially triggered the crash.

-- 
Enrico