Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-20 Thread Chris George
Good thing.

Exact same crash as before.

Chris

On Thu, Jun 20, 2019 at 6:35 AM Edward K. Ream  wrote:

>
>
> On Thursday, June 20, 2019 at 8:23:55 AM UTC-5, Edward K. Ream wrote:
>
> The second comment in #1212
>>  [defines] the
>> InteractiveInterpreter class...at the module level.
>>
>
> Rev 62dac98 does the same for the actual plugin.
>
> This is the first commit that has any chance of fixing #1212, but I am
> certainly not counting on it.
>
> Edward
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/801b8fe1-906d-43e1-a93a-036fb38ad1c2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CADWQas17e5VmprGWQzVoFcwJFbmWYiR%2B9QKGCg75_txt6eUp1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-20 Thread Edward K. Ream


On Thursday, June 20, 2019 at 8:23:55 AM UTC-5, Edward K. Ream wrote:

The second comment in #1212 
>  [defines] the 
> InteractiveInterpreter class...at the module level.
>

Rev 62dac98 does the same for the actual plugin.

This is the first commit that has any chance of fixing #1212, but I am 
certainly not counting on it.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/801b8fe1-906d-43e1-a93a-036fb38ad1c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-20 Thread Edward K. Ream
On Thursday, June 20, 2019 at 8:14:32 AM UTC-5, Edward K. Ream wrote:

I revised the second comment in #1212 
 so that the 
InteractiveInterpreter class is defined at the module level.  Now things 
are a bit more sane.

Does QTextEdit use InteractiveInterpreter??

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/16bfca56-ce83-4eba-9af6-c3df091d6e1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-20 Thread Edward K. Ream
On Thursday, June 20, 2019 at 8:02:35 AM UTC-5, Edward K. Ream wrote:

The second comment in #1212 
>   now contains a 
> test program.  Please run it with python and report your experiences.  
> Strange things happen for me on Windows.
>

Hmm.  It seems that embedding the InteractiveInterpreter class in the Test 
class is part of the problem.  When I make it a stand-alone class the call 
to super() in the Test class does indeed return.  Heh.  This is quite apart 
from rlcompleter, which the test program doesn't exercise.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/9b845512-4782-4f52-a54a-b6f205ad3b02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-20 Thread Edward K. Ream
On Thu, Jun 20, 2019 at 7:11 AM Edward K. Ream  wrote:

>> from rlcompleter import Completer

>> Well done.  I'll take a look.

Googling rlcompleter segfault produces several hits.  Some of the bugs are
supposedly fixed.

Let's see if we can nail down where the segfault actually happens.  The
second comment in #1212
  now contains a test
program.  Please run it with python and report your experiences.  Strange
things happen for me on Windows.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1x6O-T-Jmm9JtgiZ_P7j8UjNCE_W38G-51UNXwW2wftg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-20 Thread Chris George
It is definitely rlcompleter causing the problem.

Chris

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/15d4ad4d-5ad9-4f5c-9629-6ecde7d7a578%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-20 Thread Edward K. Ream
On Thu, Jun 20, 2019 at 6:47 AM Chris George  wrote:

> Bingo!
>
> from rlcompleter import Completer
>
> This is an import that is unique to the plugin.
>
> When I comment it out, Leo starts just fine and I even get a python
> console.
>

Well done.  I'll take a look.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0Wa8bFUosodu1gJ0nMP0aCQL_SRCJszErwpGOkc7e0Vw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-20 Thread Edward K. Ream
On Thu, Jun 20, 2019 at 6:31 AM Chris George  wrote:

>
> BTW, can you send a copy of Leo's log pane when you *aren't* crashing.
>> I'm guessing it's some Linux flavor, but I'd like to know the details.
>>
>>
> Leo 6.0-b2-devel, devel branch, build 0e86a7bf76
> 2019-06-19 21:25:33 -0500
> Python 3.6.8, PyQt version 5.12.3
> linux
>
Thanks.  This is now part of #1212.


>> You should be able to find the culprit pretty easily.  This is, after
>> all, a repeatable bug.  Are you game?
>>
>
> Sure.
>

Excellent.  My initial guess was wrong.  The segfault happens earlier.  How
odd!

HTH and awaiting next steps.
>

Let's see if python_console.py imports properly.

Put the g.pdb() at the start of python.console.py.  Single step (N: step
over) through the file. (You will see that the debugger steps over all
functions, and classes.)  If that works, put g.pdb at the start of the
top-level init method.

If both work, we'll do a detailed walk through of Leo's startup.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS2oE6qjnf141RMf6U1fQLDAj_eEh3zkPkoK_PHbQa9g%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-20 Thread Chris George


> BTW, can you send a copy of Leo's log pane when you *aren't* crashing.  
> I'm guessing it's some Linux flavor, but I'd like to know the details.
>
>
Leo 6.0-b2-devel, devel branch, build 0e86a7bf76
2019-06-19 21:25:33 -0500
Python 3.6.8, PyQt version 5.12.3
linux

 

> It's time to start thinking about filing a *python* bug report.
>
> Presumably, the segfault happen in the on-create function.  What I would 
> do, if I were you, would be to put a call to g.pdb() here:
>
> def onCreate (tag, keys):
> '''python_terminal.py onCreate handler.'''
> c = keys.get('c')
> if c:
> g.pdb() 
> win = MyInterpreter(None,c)
> c.frame.log.createTab('Python Console',widget=win)
>
> You will very likely take the segfault stepping over the next line.  If 
> so, you can step into that line (the next time), and keep single stepping 
> until you find the line that causes the segfault.
>

Done.
 

>
> You should be able to find the culprit pretty easily.  This is, after all, 
> a repeatable bug.  Are you game?
>

Sure.
 

>
> Once the cause of the segfault is found, we can work on creating a minimal 
> program that demonstrates it, which is what the python devs will want.
>
> Edward
>

 No luck, the process never makes it that far.

chris@technatica:~/leo-editor$ python3 ./launchLeo.py --trace=startup

setting leoID from os.getenv('USER'): 'chris'
reading settings in /home/chris/leo-editor/leo/config/leoSettings.leo
reading settings in /home/chris/.leo/myLeoSettings.leo
reading settings in /home/chris/.leo/themes/BreezeDarkThemeLocal.leo
getGitVersion commit 0e86a7bf76313885be1a75c89367f7ab68869d0e
Author: Edward K. Ream 
Date:   2019-06-19 21:25:33 -0500

Documented two completed issues

getGitVersion commit 0e86a7bf76313885be1a75c89367f7ab68869d0e
Author: Edward K. Ream 
Date:   2019-06-19 21:25:33 -0500

Documented two completed issues

Leo 6.0-b2-devel, devel branch, build 0e86a7bf76
2019-06-19 21:25:33 -0500
KCrash: crashing... crashRecursionCounter = 2

This is the exact same crash as before.

FYI, before we started this yesterday I deleted my ~/.leo directory and 
deleted and rebuilt via git my entire Leo installation.

The same behaviour occurs.

This used to trip me up whenever I reinstalled my OS because the plugin was 
enabled by default in LeoSettings.leo.

HTH and awaiting next steps.

 Chris

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/25e0c337-d107-4158-b5e0-69bc35a4974d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-19 Thread Edward K. Ream
On Wed, Jun 19, 2019 at 10:08 PM Chris George  wrote:

>
> setting leoID from os.getenv('USER'): 'chris'
> Leo 6.0-b1, master branch, build 445dfa149e
> 2019-06-18 09:45:56 -0500
> KCrash: crashing... crashRecursionCounter = 2
>
> The exact same crash on starting Leo.
>

I would have been shocked if that were not true.

BTW, can you send a copy of Leo's log pane when you *aren't* crashing.  I'm
guessing it's some Linux flavor, but I'd like to know the details.

It's time to start thinking about filing a *python* bug report.

Presumably, the segfault happen in the on-create function.  What I would
do, if I were you, would be to put a call to g.pdb() here:

def onCreate (tag, keys):
'''python_terminal.py onCreate handler.'''
c = keys.get('c')
if c:
g.pdb()
win = MyInterpreter(None,c)
c.frame.log.createTab('Python Console',widget=win)

You will very likely take the segfault stepping over the next line.  If so,
you can step into that line (the next time), and keep single stepping until
you find the line that causes the segfault.

You should be able to find the culprit pretty easily.  This is, after all,
a repeatable bug.  Are you game?

Once the cause of the segfault is found, we can work on creating a minimal
program that demonstrates it, which is what the python devs will want.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS12usS%3DngJ_f3MUsA7dzhWQ5MYxoJWsEPdwMLD_vke84Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-19 Thread Chris George

setting leoID from os.getenv('USER'): 'chris'
Leo 6.0-b1, master branch, build 445dfa149e
2019-06-18 09:45:56 -0500
KCrash: crashing... crashRecursionCounter = 2

The exact same crash on starting Leo.

Chris


On Wednesday, June 19, 2019 at 6:00:36 PM UTC-7, Edward K. Ream wrote:
>
> On Wednesday, June 19, 2019 at 7:59:10 PM UTC-5, Edward K. Ream wrote:
>
> For the first time *ever*, the doEnter code is sound...
>>
>
> Well, I forgot to mention that this post refers to the python_terminal 
> plugin.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/75d74715-71cb-463a-b798-6732ceafd79a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Rev 81a2f1e: A rewrite of PyInterp.doEnter & helpers

2019-06-19 Thread Edward K. Ream
On Wednesday, June 19, 2019 at 7:59:10 PM UTC-5, Edward K. Ream wrote:

For the first time *ever*, the doEnter code is sound...
>

Well, I forgot to mention that this post refers to the python_terminal 
plugin.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/5f487f28-aed3-4dea-8c42-3817494f7127%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.