Bug 1699049 - tkinter causes Floating point exception
Summary: tkinter causes Floating point exception
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: tk
Version: 29
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-11 15:54 UTC by morpheusthewhite
Modified: 2019-11-27 23:21 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-27 23:21:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description morpheusthewhite 2019-04-11 15:54:16 UTC
Running even a simple python script on Fedora 29 involving tkinter.OptionMenu and tkinter.StringVar causes the application to crash with 

Floating point exception (core dumped)

instead of showing the Tk window

Sample code:
--------------------------
import tkinter
 
class App(tkinter.Tk):
    def __init__(self):
        super().__init__()
 
        self.str_var = tkinter.StringVar(self)
        self.str_var.set("foo")
        self.menu = tkinter.OptionMenu(self, self.str_var, "bar")
 
        self.menu.pack()
 
app = App()
app.mainloop()

--------------------------
Package version: python3-tkinter-3.7.2-5.fc29.x86_64

Comment 1 Miro Hrončok 2019-04-11 16:34:09 UTC
Note: I cannot reproduce with python3-tkinter-3.7.3-1.fc30.x86_64.

Can you update your Python and try again please? https://bodhi.fedoraproject.org/updates/FEDORA-2019-d04731547a

Comment 2 morpheusthewhite 2019-04-11 21:46:48 UTC
The package is said to be up-to-date on Fedora 29

Comment 3 morpheusthewhite 2019-04-12 06:51:23 UTC
(In reply to Miro Hrončok from comment #1)
> Note: I cannot reproduce with python3-tkinter-3.7.3-1.fc30.x86_64.
> 
> Can you update your Python and try again please?
> https://bodhi.fedoraproject.org/updates/FEDORA-2019-d04731547a

I installed the test package and the problem persists (again Floating point exception (core dumped))

Comment 4 morpheusthewhite 2019-04-12 06:59:31 UTC
The (In reply to rohfan1997 from comment #3)
> (In reply to Miro Hrončok from comment #1)
> > Note: I cannot reproduce with python3-tkinter-3.7.3-1.fc30.x86_64.
> > 
> > Can you update your Python and try again please?
> > https://bodhi.fedoraproject.org/updates/FEDORA-2019-d04731547a
> 
> I installed the test package and the problem persists (again Floating point
> exception (core dumped))

The package version I installed is python3-tkinter-3.7.3-1.fc29.x86_64 (Note that is fc29 instead of yours that is fc30)

Comment 5 Miro Hrončok 2019-04-12 08:58:46 UTC
Anyone else here with Fedora 29 who could try? Harris, Tomáš?

Comment 6 Charalampos Stratakis 2019-04-12 12:19:16 UTC
(In reply to Miro Hrončok from comment #5)
> Anyone else here with Fedora 29 who could try? Harris, Tomáš?

Tested it on my home machine with python3-tkinter-3.7.2-5.fc29.x86_64 and it works fine.

No coredump and the window from running the script appears. Something else might be amiss here.

Comment 7 Miro Hrončok 2019-04-12 13:59:00 UTC
morpheusthewhite, does this also reproduce when running python3 like this?

/usr/bin/python3 -I

Comment 8 morpheusthewhite 2019-04-12 17:20:21 UTC
(In reply to Miro Hrončok from comment #7)
> morpheusthewhite, does this also reproduce when running python3 like this?
> 
> /usr/bin/python3 -I

Yes, nothing changes

Comment 9 morpheusthewhite 2019-04-12 17:25:13 UTC
I just tried to run the commands on the python3 interpreter: the floating point exception is raised on the following line

app = App()

Comment 10 Miro Hrončok 2019-04-16 14:01:13 UTC
Could you please reinstall python3 packages?

$ sudo dnf reinstall python3-libs python3-tkinter python3

Can you reproduce then?

Comment 11 Victor Stinner 2019-04-16 14:08:07 UTC
> Running even a simple python script on Fedora 29 involving tkinter.OptionMenu and tkinter.StringVar causes the application to crash with 
> Floating point exception (core dumped)

Can you try to run "python3 -X faulthandler script.py" to get the Python traceback where the fault occurred?

It would also be great if you could try to reproduce the issue in gdb:

* gdb -args script.py
(gdb) run

About the coredump: Fedora uses ABRT by default to reports bugs to Fedora bug tracker. To get coredumps in the working directory of the program, you can use:

   sudo bash -c "echo '%e.%p' > /proc/sys/kernel/core_pattern"

More info about debugging a Python crash:
https://pythondev.readthedocs.io/debug_tools.html#get-a-traceback-on-a-crash

Comment 12 morpheusthewhite 2019-04-16 17:02:24 UTC
(In reply to Miro Hrončok from comment #10)
> Could you please reinstall python3 packages?
> 
> $ sudo dnf reinstall python3-libs python3-tkinter python3
> 
> Can you reproduce then?

Nothing changes

Comment 13 morpheusthewhite 2019-04-16 18:03:12 UTC
(In reply to Victor Stinner from comment #11)
> > Running even a simple python script on Fedora 29 involving tkinter.OptionMenu and tkinter.StringVar causes the application to crash with 
> > Floating point exception (core dumped)
> 
> Can you try to run "python3 -X faulthandler script.py" to get the Python
> traceback where the fault occurred?

This is the output:
 
Fatal Python error: Floating point exception

Current thread 0x00007f5fce903740 (most recent call first):
  File "/usr/lib64/python3.7/tkinter/__init__.py", line 2299 in __init__
  File "/usr/lib64/python3.7/tkinter/__init__.py", line 3454 in __init__
  File "tk_app.py", line 9 in __init__
  File "tk_app.py", line 13 in <module>
Floating point exception (core dumped)

Line 9 is the following:
self.big_menu = tkinter.OptionMenu(self, self.str_var, "bar")

While line 13 is:
app = App()

> 
> It would also be great if you could try to reproduce the issue in gdb:
> 
> * gdb -args script.py
> (gdb) run
> 
> About the coredump: Fedora uses ABRT by default to reports bugs to Fedora
> bug tracker. To get coredumps in the working directory of the program, you
> can use:
> 
>    sudo bash -c "echo '%e.%p' > /proc/sys/kernel/core_pattern"
> 
> More info about debugging a Python crash:
> https://pythondev.readthedocs.io/debug_tools.html#get-a-traceback-on-a-crash

after running 
$ sudo bash -c "echo '%e.%p' > /proc/sys/kernel/core_pattern"
$ python3 tk_app.py
$ gdb -c coredump-python3.19640

GNU gdb (GDB) Fedora 8.2-6.fc29
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
[New LWP 19640]

warning: core file may not match specified executable file.
Reading symbols from /usr/bin/python3.7...Reading symbols from /usr/lib/debug/usr/bin/python3.7-3.7.3-1.fc29.x86_64.debug...done.
done.

warning: Ignoring non-absolute filename: <linux-vdso.so.1>
Missing separate debuginfo for linux-vdso.so.1
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/51/ad09c3d39a902c2f98515475dfe621410567d8

warning: Loadable section ".note.gnu.property" outside of ELF segments
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments
Core was generated by `python3 tk_app.py'.
Program terminated with signal SIGFPE, Arithmetic exception.
#0  0x00007f25131c44ca in TkpComputeMenuButtonGeometry (mbPtr=mbPtr@entry=0x5567d0862ce0)
    at /usr/src/debug/tk-8.6.8-1.fc29.x86_64/unix/../unix/tkUnixMenubu.c:456
456		mbPtr->indicatorHeight= (INDICATOR_HEIGHT * pixels)/(10*mm);


NOTE: As suggested in the gdb output, I also ran
$ sudo dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/51/ad09c3d39a902c2f98515475dfe621410567d8
Last metadata expiration check: 0:34:16 ago on Tue 16 Apr 2019 01:26:34 PM EDT.
No match for argument: /usr/lib/debug/.build-id/51/ad09c3d39a902c2f98515475dfe621410567d8
Error: Unable to find a match

Comment 14 Victor Stinner 2019-06-25 13:54:30 UTC
Program terminated with signal SIGFPE, Arithmetic exception.
#0  0x00007f25131c44ca in TkpComputeMenuButtonGeometry (mbPtr=mbPtr@entry=0x5567d0862ce0)
    at /usr/src/debug/tk-8.6.8-1.fc29.x86_64/unix/../unix/tkUnixMenubu.c:456

That's a crash in Tk directly, not in Python. We may change the component, but again we need more info to reproduce the crash.

Comment 15 morpheusthewhite 2019-06-25 15:25:19 UTC
I experienced this problem just by using a clear Fedora 29 virtualbox image (this one in particular https://www.osboxes.org/fedora/); after installing the latest version of tkinter for python3 I launched the code that previously posted here

Comment 16 morpheusthewhite 2019-06-25 15:27:09 UTC
(In reply to morpheusthewhite from comment #15)
> I experienced this problem just by using a clear Fedora 29 virtualbox image
> (this one in particular https://www.osboxes.org/fedora/); after installing
> the latest version of tkinter for python3 I launched the code that
> previously posted here

(I was talking about the 64 bit version)

Tell me if you need any more informations

Comment 17 Victor Stinner 2019-07-01 14:11:24 UTC
> after installing the latest version of tkinter for python3 I launched the code that previously posted here

Can you elaborate? Which commands did you type?

Comment 18 morpheusthewhite 2019-07-01 18:15:02 UTC
(In reply to Victor Stinner from comment #17)
> Can you elaborate? Which commands did you type?

just 

$ python3 tk_app.py

where tk_app.py is 
---
import tkinter

class App(tkinter.Tk):
    def __init__(self):
        super().__init__()

        self.str_var = tkinter.StringVar(self)
        self.str_var.set("foo")
        self.menu = tkinter.OptionMenu(self, self.str_var, "bar")

        self.menu.pack()

app = App()
app.mainloop()
---

Other info:

$ python3 --version
Python 3.7.3
$ sudo dnf install python3-tkinter
Last metadata expiration check: 0:05:11 ago on Mon 01 Jul 2019 02:09:23 PM EDT.
Package python3-tkinter-3.7.3-3.fc29.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Comment 19 Miro Hrončok 2019-07-01 18:50:43 UTC
To clarify, if you create a new user, log in as that new user and try to reproduce, does it also happen?

Comment 20 morpheusthewhite 2019-07-02 07:21:59 UTC
(In reply to Miro Hrončok from comment #19)
> To clarify, if you create a new user, log in as that new user and try to
> reproduce, does it also happen?

Yes

Comment 21 morpheusthewhite 2019-07-02 07:32:00 UTC
I used the Gnome reporting tool to upload the logs to the following link

https://retrace.fedoraproject.org/faf/dumpdirs/new/ccpp-2019-07-02-03:14:17.211611-29694.tar.gz

Comment 22 morpheusthewhite 2019-07-02 07:52:47 UTC
You can find the logs also at the following link 

https://srv-file4.gofile.io/download/shiOmb/ccpp-2019-07-02-031417211611-29694tar.gz

Comment 23 Victor Stinner 2019-07-02 10:55:08 UTC
>> after installing the latest version of tkinter for python3 I launched the code that previously posted here
>
> Can you elaborate? Which commands did you type?

Sorry, my question was unclear.

I would like to know how you installed "the latest version of tkinter for python3". Which commands did you type to upgrade/install tkinter?

Comment 24 morpheusthewhite 2019-07-02 11:10:48 UTC
(In reply to Victor Stinner from comment #23)
> >> after installing the latest version of tkinter for python3 I launched the code that previously posted here
> >
> > Can you elaborate? Which commands did you type?
> 
> Sorry, my question was unclear.
> 
> I would like to know how you installed "the latest version of tkinter for
> python3". Which commands did you type to upgrade/install tkinter?

Just this

$ dnf install python3-tkinter

Comment 25 Miro Hrončok 2019-08-20 13:27:10 UTC
Could you please provide the result of the env command (your shell environment variables)?

Comment 26 Victor Stinner 2019-08-20 14:40:50 UTC
Program terminated with signal SIGFPE, Arithmetic exception.
#0  0x00007f25131c44ca in TkpComputeMenuButtonGeometry (mbPtr=mbPtr@entry=0x5567d0862ce0)
    at /usr/src/debug/tk-8.6.8-1.fc29.x86_64/unix/../unix/tkUnixMenubu.c:456
456		mbPtr->indicatorHeight= (INDICATOR_HEIGHT * pixels)/(10*mm);

This error looks like a division by zero. Extract of Tk source code (I downloaded tk8.6.8-src.tar.gz):

        mm = WidthMMOfScreen(Tk_Screen(mbPtr->tkwin));
        pixels = WidthOfScreen(Tk_Screen(mbPtr->tkwin));
        mbPtr->indicatorHeight= (INDICATOR_HEIGHT * pixels)/(10*mm);
        mbPtr->indicatorWidth = (INDICATOR_WIDTH * pixels)/(10*mm)
                + 2*mbPtr->indicatorHeight;
        width += mbPtr->indicatorWidth;

I bet that mm is zero: it's the screen width in millimeters. You can get that size in Python using:
---
from tkinter import Tk
root = Tk()
height = root.winfo_screenmmheight()
width = root.winfo_screenmmwidth()
print("width x height = %d x %d (in mm)" %(width, height))
---

Comment 27 morpheusthewhite 2019-08-20 16:00:01 UTC
(In reply to Miro Hrončok from comment #25)
> Could you please provide the result of the env command (your shell
> environment variables)?

$ env

LS_COLORS=rs=0:di=38;5;33:ln=38;5;51:mh=00:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=01;05;37;41:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;40:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.zst=38;5;9:*.tzst=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.wim=38;5;9:*.swm=38;5;9:*.dwm=38;5;9:*.esd=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.mjpg=38;5;13:*.mjpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.m4a=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.oga=38;5;45:*.opus=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:
XDG_MENU_PREFIX=gnome-
MODULES_RUN_QUARANTINE=LD_LIBRARY_PATH
LANG=en_US.UTF-8
GDM_LANG=en_US.UTF-8
HISTCONTROL=ignoredups
DISPLAY=:0
HOSTNAME=localhost.localdomain
COLORTERM=truecolor
USERNAME=osboxes
XDG_VTNR=2
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
XDG_SESSION_ID=2
MODULES_CMD=/usr/share/Modules/libexec/modulecmd.tcl
USER=osboxes
ENV=/usr/share/Modules/init/profile.sh
DESKTOP_SESSION=gnome
WAYLAND_DISPLAY=wayland-0
GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/d4c6eb34_98bf_481c_876d_1823a59011c9
PWD=/home/osboxes/tmp
HOME=/home/osboxes
XDG_SESSION_TYPE=wayland
BASH_ENV=/usr/share/Modules/init/bash
XDG_DATA_DIRS=/home/osboxes/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/
XDG_SESSION_DESKTOP=gnome
GJS_DEBUG_OUTPUT=stderr
LOADEDMODULES=
MAIL=/var/spool/mail/osboxes
VTE_VERSION=5403
SHELL=/bin/bash
TERM=xterm-256color
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus
XDG_CURRENT_DESKTOP=GNOME
GNOME_TERMINAL_SERVICE=:1.67
XDG_SEAT=seat0
SHLVL=2
MANPATH=:
MODULEPATH=/etc/scl/modulefiles:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles
GDMSESSION=gnome
LOGNAME=osboxes
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
XDG_RUNTIME_DIR=/run/user/1000
MODULEPATH_modshare=/usr/share/modulefiles:1:/usr/share/Modules/modulefiles:1:/etc/modulefiles:1
PATH=/home/osboxes/.local/bin:/home/osboxes/bin:/home/osboxes/.local/bin:/home/osboxes/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
MODULESHOME=/usr/share/Modules
HISTSIZE=1000
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/1355,unix/unix:/tmp/.ICE-unix/1355
LESSOPEN=||/usr/bin/lesspipe.sh %s
BASH_FUNC_module%%=() {  _module_raw "$@" 2>&1
}
BASH_FUNC__module_raw%%=() {  unset _mlshdbg;
 if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
 case "$-" in 
 *v*x*)
 set +vx;
 _mlshdbg='vx'
 ;;
 *v*)
 set +v;
 _mlshdbg='v'
 ;;
 *x*)
 set +x;
 _mlshdbg='x'
 ;;
 *)
 _mlshdbg=''
 ;;
 esac;
 fi;
 unset _mlre _mlIFS;
 if [ -n "${IFS+x}" ]; then
 _mlIFS=$IFS;
 fi;
 IFS=' ';
 for _mlv in ${MODULES_RUN_QUARANTINE:-};
 do
 if [ "${_mlv}" = "${_mlv##*[!A-Za-z0-9_]}" -a "${_mlv}" = "${_mlv#[0-9]}" ]; then
 if [ -n "`eval 'echo ${'$_mlv'+x}'`" ]; then
 _mlre="${_mlre:-}${_mlv}_modquar='`eval 'echo ${'$_mlv'}'`' ";
 fi;
 _mlrv="MODULES_RUNENV_${_mlv}";
 _mlre="${_mlre:-}${_mlv}='`eval 'echo ${'$_mlrv':-}'`' ";
 fi;
 done;
 if [ -n "${_mlre:-}" ]; then
 eval `eval ${_mlre}/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash '"$@"'`;
 else
 eval `/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash "$@"`;
 fi;
 _mlstatus=$?;
 if [ -n "${_mlIFS+x}" ]; then
 IFS=$_mlIFS;
 else
 unset IFS;
 fi;
 unset _mlre _mlv _mlrv _mlIFS;
 if [ -n "${_mlshdbg:-}" ]; then
 set -$_mlshdbg;
 fi;
 unset _mlshdbg;
 return $_mlstatus
}
BASH_FUNC_switchml%%=() {  typeset swfound=1;
 if [ "${MODULES_USE_COMPAT_VERSION:-0}" = '1' ]; then
 typeset swname='main';
 if [ -e /usr/share/Modules/libexec/modulecmd.tcl ]; then
 typeset swfound=0;
 unset MODULES_USE_COMPAT_VERSION;
 fi;
 else
 typeset swname='compatibility';
 if [ -e /usr/share/Modules/libexec/modulecmd-compat ]; then
 typeset swfound=0;
 MODULES_USE_COMPAT_VERSION=1;
 export MODULES_USE_COMPAT_VERSION;
 fi;
 fi;
 if [ $swfound -eq 0 ]; then
 echo "Switching to Modules $swname version";
 source /usr/share/Modules/init/bash;
 else
 echo "Cannot switch to Modules $swname version, command not found";
 return 1;
 fi
}
BASH_FUNC_scl%%=() {  if [ "$1" = "load" -o "$1" = "unload" ]; then
 eval "module $@";
 else
 /usr/bin/scl "$@";
 fi
}
_=/usr/bin/env
OLDPWD=/home/osboxes

Comment 28 morpheusthewhite 2019-08-20 16:04:21 UTC
(In reply to Victor Stinner from comment #26)
> Program terminated with signal SIGFPE, Arithmetic exception.
> #0  0x00007f25131c44ca in TkpComputeMenuButtonGeometry
> (mbPtr=mbPtr@entry=0x5567d0862ce0)
>     at /usr/src/debug/tk-8.6.8-1.fc29.x86_64/unix/../unix/tkUnixMenubu.c:456
> 456		mbPtr->indicatorHeight= (INDICATOR_HEIGHT * pixels)/(10*mm);
> 
> This error looks like a division by zero. Extract of Tk source code (I
> downloaded tk8.6.8-src.tar.gz):
> 
>         mm = WidthMMOfScreen(Tk_Screen(mbPtr->tkwin));
>         pixels = WidthOfScreen(Tk_Screen(mbPtr->tkwin));
>         mbPtr->indicatorHeight= (INDICATOR_HEIGHT * pixels)/(10*mm);
>         mbPtr->indicatorWidth = (INDICATOR_WIDTH * pixels)/(10*mm)
>                 + 2*mbPtr->indicatorHeight;
>         width += mbPtr->indicatorWidth;
> 
> I bet that mm is zero: it's the screen width in millimeters. You can get
> that size in Python using:
> ---
> from tkinter import Tk
> root = Tk()
> height = root.winfo_screenmmheight()
> width = root.winfo_screenmmwidth()
> print("width x height = %d x %d (in mm)" %(width, height))
> ---

As you thought the size is zero, here it is the output 

width x height = 0 x 0 (in mm)


It might interest you to know that I'm using a virtual machine

Comment 29 Victor Stinner 2019-08-22 13:24:11 UTC
> width x height = 0 x 0 (in mm)

IMHO that's the root issue, but I cannot explain why you get such values.

Can you copy the output of the xrandr command? On my laptop (internal screen turned off, with 2 external monitors), I get:

vstinner@apu$ xrandr
Screen 0: minimum 320 x 200, current 4480 x 1440, maximum 8192 x 8192
XWAYLAND3 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 710mm x 400mm
   2560x1440     59.91*+
XWAYLAND4 connected 1920x1080+2560+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1920x1080     59.96*+

Can you also try to get the DPI resolution of your Xorg screen? On my Fedora 30 using GNOME, I get:

vstinner@apu$ xdpyinfo|grep -E '(resolution|dimensions):' -B1
screen #0:
  dimensions:    4480x1440 pixels (1190x382 millimeters)
  resolution:    96x96 dots per inch

(Maybe attach the whole xdpyinfo output into a log file and attached it to this bug.)

Note: I'm using Waylang, but it seems like tkinter is still using X11 API and so Xorg (Xwayland).

Note: xdpyinfo program comes from xorg-x11-utils package, and xrandr command comes from xorg-x11-server-utils package.

Comment 30 morpheusthewhite 2019-08-22 14:12:25 UTC
(In reply to Victor Stinner from comment #29)
> Can you copy the output of the xrandr command?

[osboxes@localhost ~]$ xrandr
Screen 0: minimum 320 x 200, current 800 x 600, maximum 8192 x 8192
XWAYLAND0 connected 800x600+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   800x600       59.86*+

> Can you also try to get the DPI resolution of your Xorg screen?

[osboxes@localhost ~]$ xdpyinfo|grep -E '(resolution|dimensions):' -B1
screen #0:
  dimensions:    800x600 pixels (0x0 millimeters)
  resolution:    -2147483648x-2147483648 dots per inch

> (Maybe attach the whole xdpyinfo output into a log file and attached it to
> this bug.)

Here it is:
https://pastebin.com/FymWYAWw

Comment 31 Victor Stinner 2019-08-22 16:25:06 UTC
>   resolution:    -2147483648x-2147483648 dots per inch

Ok, this is your root issue. You should try to identify why xdpyinfo reports negative numbers for the screen resolution (DPI). Is it an issue in GNOME? In the driver of your GPU? Can is it an issue in a fake GPU coming from the virtualization solution? Something else?

You should report an issue to Xorg, the driver of your GPU, or to Tk.

Anyway, Python is unrelated to the root issue (invalid DPI configuration) nor the bug that you saw (crash in Tk).

Comment 32 Victor Stinner 2019-08-22 16:57:18 UTC
If you use VirtualBox, you should to install guest additions.

Comment 33 morpheusthewhite 2019-08-23 10:04:11 UTC
(In reply to Victor Stinner from comment #32)
> If you use VirtualBox, you should to install guest additions.

It didn't solve the issue.

(In reply to Victor Stinner from comment #31)
> >   resolution:    -2147483648x-2147483648 dots per inch
> 
> Ok, this is your root issue. You should try to identify why xdpyinfo reports
> negative numbers for the screen resolution (DPI). 
> You should report an issue to Xorg, the driver of your GPU, or to Tk.

Ok, I'm going to move this report to tk, thank you

Comment 34 Ben Cotton 2019-10-31 18:52:49 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 35 Ben Cotton 2019-11-27 23:21:35 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.