Summary: | Doesn't start with Qt 5.6 | ||
---|---|---|---|
Product: | [Applications] kcalc | Reporter: | Antonio Rojas <arojas> |
Component: | general | Assignee: | Evan Teran <evan.teran> |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | bob.mt.wya, cfeck, cpigat242, demm, elvis.angelaccio, heiko.becker, niels_ole, rdieter, robin.mthawanji+kde, stupor_scurvy343, tittiatcoke, vltg0903 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kcalc/2678cb9c7a07381e3ffb8a2107946cec53bf5909 | Version Fixed In: | 16.04.1 |
Sentry Crash Report: | |||
Attachments: | Rex Dieter's patch : kcalc don't set a zero minimum size |
Description
Antonio Rojas
2016-03-05 07:57:36 UTC
I see exactly the same behavior on my system with Qt 5.6 and git master for Plasma, Frameworks and Apps. marking confirmed (here too) Confirming here too QT 5.6, Plasma 5.5.5, Frameworks 5.18 Same behaviour for all users (including a newly created user) - no discernible errors in in output or logs Fwiw, while apparently hung, here's a backtrace , While apparently hung, gdb reports: Thread 3 (Thread 0x7f8118e42700 (LWP 28639)): #0 0x00007f81316f0fdd in poll () at ../sysdeps/unix/syscall-template.S:84 #1 0x00007f812f651272 in _xcb_conn_wait (__timeout=-1, __nfds=1, __fds=0x7f8118e41b80) at /usr/include/bits/poll2.h:46 #2 0x00007f812f651272 in _xcb_conn_wait (c=c@entry=0x5569a8b12b20, cond=cond@entry=0x5569a8b12b60, vector=vector@entry=0x0, count=count@entry=0x0) at xcb_conn.c:459 #3 0x00007f812f652ee7 in xcb_wait_for_event (c=0x5569a8b12b20) at xcb_in.c:693 #4 0x00007f811b2a3349 in QXcbEventReader::run() (this=0x5569a8b1d2f0) at qxcbconnection.cpp:1313 #5 0x00007f813257ae18 in QThreadPrivate::start(void*) (arg=0x5569a8b1d2f0) at thread/qthread_unix.cpp:340 #6 0x00007f812f43160a in start_thread (arg=0x7f8118e42700) at pthread_create.c:334 #7 0x00007f81316fca4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 2 (Thread 0x7f8112870700 (LWP 28640)): #0 0x00007f81316f0fdd in poll () at ../sysdeps/unix/syscall-template.S:84 #1 0x00007f812eee916c in g_main_context_iterate (priority=2147483647, n_fds=3, fds=0x7f810c003020, timeout=<optimized out>, context=0x7f810c000990) at gmain.c:4135 #2 0x00007f812eee916c in g_main_context_iterate (context=context@entry=0x7f810c000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3835 #3 0x00007f812eee927c in g_main_context_iteration (context=0x7f810c000990, may_block=may_block@entry=1) at gmain.c:3901 #4 0x00007f81327a3cef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f810c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:417 #5 0x00007f813274c6ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f811286fc50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204 #6 0x00007f8132576004 in QThread::exec() (this=this@entry=0x7f813550b040 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:503 #7 0x00007f8135497445 in QDBusConnectionManager::run() (this=0x7f813550b040 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:181 #8 0x00007f813257ae18 in QThreadPrivate::start(void*) (arg=0x7f813550b040 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:340 #9 0x00007f812f43160a in start_thread (arg=0x7f8112870700) at pthread_create.c:334 #10 0x00007f81316fca4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 1 (Thread 0x7f812274e940 (LWP 28635)): #0 0x00007f81316f0fdd in poll () at ../sysdeps/unix/syscall-template.S:84 #1 0x00007f812eee916c in g_main_context_iterate (priority=2147483647, n_fds=2, fds=0x5569a8f48200, timeout=<optimized out>, context=0x7f81140016f0) at gmain.c:4135 #2 0x00007f812eee916c in g_main_context_iterate (context=context@entry=0x7f81140016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3835 #3 0x00007f812eee927c in g_main_context_iteration (context=0x7f81140016f0, may_block=may_block@entry=1) at gmain.c:3901 #4 0x00007f81327a3cef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5569a8b3db60, flags=...) at kernel/qeventdispatcher_glib.cpp:417 #5 0x00007f813274c6ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffdb31f6a10, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204 #6 0x00007f8132754ddc in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1285 #7 0x00007f8132f950dc in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1598 #8 0x00007f813357ec35 in QApplication::exec() () at kernel/qapplication.cpp:2973 #9 0x00007f81350f4871 in kdemain(int, char**) (argc=1, argv=<optimized out>) at /usr/src/debug/kcalc-15.12.1/kcalc.cpp:2324 #10 0x00007f813161a580 in __libc_start_main (main= 0x5569a768a9a0 <main(int, char**)>, argc=1, argv=0x7ffdb31f6d68, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffdb31f6d58) at libc-start.c:289 #11 0x00005569a768a9d9 in _start () hrm, to rule out glib event loop, here's when running with QT_NO_GLIB=1 Thread 3 (Thread 0x7fd75967f700 (LWP 28730)): #0 0x00007fd771f31fdd in poll () at ../sysdeps/unix/syscall-template.S:84 #1 0x00007fd76fe92272 in _xcb_conn_wait (__timeout=-1, __nfds=1, __fds=0x7fd75967eb80) at /usr/include/bits/poll2.h:46 #2 0x00007fd76fe92272 in _xcb_conn_wait (c=c@entry=0x563176076b20, cond=cond@entry=0x563176076b60, vector=vector@entry=0x0, count=count@entry=0x0) at xcb_conn.c:459 #3 0x00007fd76fe93ee7 in xcb_wait_for_event (c=0x563176076b20) at xcb_in.c:693 #4 0x00007fd75bae0349 in QXcbEventReader::run() (this=0x5631760812f0) at qxcbconnection.cpp:1313 #5 0x00007fd772dbbe18 in QThreadPrivate::start(void*) (arg=0x5631760812f0) at thread/qthread_unix.cpp:340 #6 0x00007fd76fc7260a in start_thread (arg=0x7fd75967f700) at pthread_create.c:334 #7 0x00007fd771f3da4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 2 (Thread 0x7fd75320c700 (LWP 28731)): #0 0x00007fd771f33d63 in select () at ../sysdeps/unix/syscall-template.S:84 #1 0x00007fd772fe055f in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) (nfds=10, fdread=fdread@entry=0x7fd74c000a78, fdwrite=fdwrite@entry=0x7fd74c000d08, fdexcept=fdexcept@entry=0x7fd74c000f98, orig_timeout=orig_timeout@entry=0x0) at kernel/qcore_unix.cpp:75 #2 0x00007fd772fe1f9e in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) (timeout=0x0, exceptfds=0x7fd74c000f98, writefds=0x7fd74c000d08, readfds=0x7fd74c000a78, nfds=<optimized out>, this=0x7fd74c0008c0) at kernel/qeventdispatcher_unix.cpp:320 #3 0x00007fd772fe1f9e in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) (this=this@entry=0x7fd74c0008e0, flags=..., flags@entry=..., timeout=timeout@entry=0x0) at kernel/qeventdispatcher_unix.cpp:196 #4 0x00007fd772fe24b2 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fd74c0008c0, flags=...) at kernel/qeventdispatcher_unix.cpp:607 #5 0x00007fd772f8d6ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fd75320bc50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204 #6 0x00007fd772db7004 in QThread::exec() (this=this@entry=0x7fd775d48040 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:503 #7 0x00007fd775cd4445 in QDBusConnectionManager::run() (this=0x7fd775d48040 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:181 #8 0x00007fd772dbbe18 in QThreadPrivate::start(void*) (arg=0x7fd775d48040 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:340 #9 0x00007fd76fc7260a in start_thread (arg=0x7fd75320c700) at pthread_create.c:334 #10 0x00007fd771f3da4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 1 (Thread 0x7fd762f8b940 (LWP 28726)): #0 0x00007fd771f33d63 in select () at ../sysdeps/unix/syscall-template.S:84 #1 0x00007fd772fe055f in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) (nfds=7, fdread=fdread@entry=0x5631760bc988, fdwrite=fdwrite@entry=0x5631760bcc18, fdexcept=fdexcept@entry=0x5631760bcea8, orig_timeout=orig_timeout@entry=0x0) at kernel/qcore_unix.cpp:75 #2 0x00007fd772fe1f9e in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) (timeout=0x0, exceptfds=0x5631760bcea8, writefds=0x5631760bcc18, readfds=0x5631760bc988, nfds=<optimized out>, this=0x5631760af5b0) at kernel/qeventdispatcher_unix.cpp:320 #3 0x00007fd772fe1f9e in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) (this=this@entry=0x5631760bc7f0, flags=..., flags@entry=..., timeout=timeout@entry=0x0) at kernel/qeventdispatcher_unix.cpp:196 #4 0x00007fd772fe24b2 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5631760af5b0, flags=flags@entry=...) at kernel/qeventdispatcher_unix.cpp:607 #5 0x00007fd75bb5260d in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at eventdispatchers/qunixeventdispatcher.cpp:62 #6 0x00007fd772f8d6ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffc58ff92f0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204 #7 0x00007fd772f95ddc in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1285 ---Type <return> to continue, or q <return> to quit--- #8 0x00007fd7737d60dc in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1598 #9 0x00007fd773dbfc35 in QApplication::exec() () at kernel/qapplication.cpp:2973 #10 0x00007fd775935871 in kdemain(int, char**) (argc=1, argv=<optimized out>) at /usr/src/debug/kcalc-15.12.1/kcalc.cpp:2324 #11 0x00007fd771e5b580 in __libc_start_main (main= 0x56317486b9a0 <main(int, char**)>, argc=1, argv=0x7ffc58ff9648, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc58ff9638) at libc-start.c:289 #12 0x000056317486b9d9 in _start () It seems that kcalc polls on a socket in "/tmp/.ICE-unix/". The relevant output from strace is: [...] socket(PF_LOCAL, SOCK_STREAM, 0) = 6 getsockopt(6, SOL_SOCKET, SO_SNDBUF, [212992], [4]) = 0 uname({sysname="Linux", nodename="OleDesktop", ...}) = 0 connect(6, {sa_family=AF_LOCAL, sun_path=@"/tmp/.ICE-unix/1317"}, 22) = 0 fcntl(6, F_SETFD, FD_CLOEXEC) = 0 [...] poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}], 2, -1) = 1 ([{fd=5, revents=POLLIN}]) read(5, "\1\0\0\0\0\0\0\0", 16) = 8 And then the last two lines are repeated. Please ignore what I said. The real problem is that the window is not visible because of setFixedSize(minimumSize()); where minimumSize() returns (0, 0). Here's a hack/workaround to use in the meantime (until Qt's minimumSize behaves itself): diff -up kcalc-15.12.3/kcalc.cpp.qt56 kcalc-15.12.3/kcalc.cpp --- kcalc-15.12.3/kcalc.cpp.qt56 2016-03-09 17:12:50.000000000 -0600 +++ kcalc-15.12.3/kcalc.cpp 2016-03-16 08:18:05.635713639 -0500 @@ -123,7 +123,7 @@ KCalculator::KCalculator(QWidget *parent updateGeometry(); - setFixedSize(minimumSize()); + if ( ! minimumSize().isEmpty() ) setFixedSize(minimumSize()); updateDisplay(UPDATE_FROM_CORE); (In reply to Rex Dieter from comment #8) > Here's a hack/workaround to use in the meantime (until Qt's minimumSize > behaves itself): Is there a Qt bug report to track this? None that I'm aware of (yet) Created attachment 97973 [details]
Rex Dieter's patch : kcalc don't set a zero minimum size
Thanks Rex.
The Attachment button (cough) it's a thing... :-)
*** Bug 361594 has been marked as a duplicate of this bug. *** Fix works for me (coming from bug #361594), thanks! Fix in https://git.reviewboard.kde.org/r/127847/ Please test it as soon as possible (deadline for 16.04.1 bugfixes is 23:59 UTC of today). Patch works fine here. It seems to create some excessive margin to the left of the buttons, but no big deal. (In reply to Antonio Rojas from comment #15) > Patch works fine here. It seems to create some excessive margin to the left > of the buttons, but no big deal. Yeah, there was an unnecessary horizontal spacer in the layout. I updated the patch, should be fixed now. Git commit 2678cb9c7a07381e3ffb8a2107946cec53bf5909 by Elvis Angelaccio. Committed on 05/05/2016 at 21:47. Pushed by elvisangelaccio into branch 'Applications/16.04'. Fix invisible main window with Qt 5.6 Since Qt 5.6, the minimum size property seems to default to an empty size, so it can't be used to set a fixed size for the main window. A better approach is to tell the layout() to use a fixed size. This change also exposed a redundant horizontal spacer in the .ui code, which is now removed. FIXED-IN: 16.04.1 REVIEW: 127847 M +1 -1 kcalc.cpp M +0 -13 kcalc.ui http://commits.kde.org/kcalc/2678cb9c7a07381e3ffb8a2107946cec53bf5909 |