Bug 11875 - pydevshell raises exception from poky/scripts/oepydevshell-internal.py when maximize the python shell window
Summary: pydevshell raises exception from poky/scripts/oepydevshell-internal.py when m...
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.3.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.7
Assignee: Changqing Li
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-07-31 01:33 UTC by Ben Guan
Modified: 2018-11-30 01:53 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
python development shell exit with exception (80.98 KB, image/png)
2017-07-31 01:33 UTC, Ben Guan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Guan 2017-07-31 01:33:44 UTC
Created attachment 3904 [details]
python development shell exit with exception

Host PC: Ubuntu 16.04 64 bit

1. run "bitbake busybox -c devpyshell"
2. maximize the popup python shell window

Then then the error in attachment shows up
Comment 1 Richard Purdie 2017-07-31 14:54:41 UTC
This looks like the code needs to read into a variable and then only attempt to decode if its not None. The select call is probably woken by the window size change and mistakenly thinks there is data in the pipe.
Comment 2 Leonardo Sandoval Gonzalez 2017-08-16 20:13:36 UTC
Ben, which terminal are you using?

I tried  on OE_TERMINAL (from the snapshot, I believe you are using the latter) and maximize it without errors.

One other thing: can you rebase your code with master and see the results? there was a change recently related to terminal spawning which may have fixed this problem indirectly.
Comment 3 Ben Guan 2017-08-18 03:35:22 UTC
(In reply to comment #2)
> Ben, which terminal are you using?
> 
> I tried  on OE_TERMINAL (from the snapshot, I believe you are using the
> latter) and maximize it without errors.
> 
> One other thing: can you rebase your code with master and see the results?
> there was a change recently related to terminal spawning which may have
> fixed this problem indirectly.

The terminal with error in the OE_TERMINAL created by Yocto.

I make a try with poky-master and poky-2.4_M2, I still can reproduce this issue.
Comment 4 Stephen K Jolley 2017-08-18 16:43:38 UTC
It appears the question has been answered.  If this is still NEEDINFO please restate the question.
Comment 5 Ross Burton 2017-11-30 16:27:39 UTC
I can't reproduce it with master.  Maybe it depends on the terminal that was used.  Ben, what terminal emulator does the devpyshell run in for you?
Comment 6 Rebecca Chang 2017-12-27 06:57:23 UTC
(In reply to comment #5)
> I can't reproduce it with master.  Maybe it depends on the terminal that was
> used.  Ben, what terminal emulator does the devpyshell run in for you?

Issue reproducible with Ubuntu gnome terminal.
The devpyshell will terminates itself after the error message pop up (due to terminal resize).
Comment 7 Rebecca Chang 2017-12-27 08:31:13 UTC
We try to reproduce using crops/poky container, and it is not seen on container based process. How do we know what types of emulator is used in container? 

$ bitbake -e | grep OE_TERMINAL
# $OE_TERMINAL [4 operations]
OE_TERMINAL="auto"
# $OE_TERMINAL_EXPORTS [2 operations]
OE_TERMINAL_EXPORTS=" EXTRA_OEMAKE CACHED_CONFIGUREVARS CONFIGUREOPTS EXTRA_OECONF"
            d.appendVar("OE_TERMINAL_EXPORTS", " " + k[0])
    for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d):
    terminal = oe.data.typed_value('OE_TERMINAL', d).lower()
        bb.fatal('Devshell usage disabled with OE_TERMINAL')

So OE_TERMINAL was set to "auto" by default. When we run on Ubuntu host with gnome dekstop, devpyshell will open in a new terminal window.
Comment 8 Changqing Li 2018-11-30 01:53:49 UTC
fix by oe commit d598f8d48e9b094af99effa7471d613b16ffa817