Summary: | Timers use g_timeout_add instead of gdk_threads_add_timeout | ||
---|---|---|---|
Product: | [Plasma] Oxygen | Reporter: | Yehouda Harpaz <yeh> |
Component: | gtk2-engine | Assignee: | Hugo Pereira Da Costa <hugo.pereira.da.costa> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | b7.10110111, hugo.pereira.da.costa, mati86dl, web |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Other | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Suggested patch, to replace g_timeout_add by gdk_threads_add_timeout |
Description
Yehouda Harpaz
2012-09-12 12:39:28 UTC
Will affect gtk3-engine too Thanks (alot) for reporting this. I was not aware of the existence of the gdk_thread_add_timeout method, nor of the limitations of g_timeout_add. Early test after replacing the latter by the former causes no issue. I'll push to master and gtk3 first, will test further for a couple of days, then backport to the stable branches Hugo Git commit 850dfa7663d778e728afa1bd506b5f8cd7a3018f by Hugo Pereira Da Costa. Committed on 12/09/2012 at 14:50. Pushed by hpereiradacosta into branch 'master'. Replaced g_timeout_add by thread-safe gdk_threads_add_timeout function. M +2 -1 demo/oxygentimer.cpp M +2 -1 src/animations/oxygentimelineserver.cpp M +2 -1 src/animations/oxygentimer.cpp http://commits.kde.org/oxygen-gtk/850dfa7663d778e728afa1bd506b5f8cd7a3018f Hi people, Comment on blog of Hugo, but this is the right place: Sorry. =) Well. The dilemma is that gdk_thread will be deprecated after the upcoming release. Here some info: https://mail.gnome.org/archives/gtk-devel-list/2012-July/msg00066.html This does not have any replacement, but according http://developer.gnome.org/gtk-faq/stable/x499.html , if not initiate gdk_thread (Oxygen-gtk not start it), any function call from g_timeout/idle, is executed in the main thread, and therefore does not need to worry about the lock. Therefore i suggest reverse the change. Probably the crash is due to something else. Could you upload a backtrace with full debug activated in oxygen-gtk? Regards. P.s. I'm any professional, but these are the conclusions we draw when updating Pragha. Thanks Mattias ! Indeed, I'll likely revert the change, and post a patch here instead, to be applied to both oxygen-gtk2 and gtk3, so that people can check whether it fixes the issue or not ... Will keep you both posted Hugo Git commit ab1e6e634ce85130125d8589adfba75150cb2652 by Hugo Pereira Da Costa. Committed on 13/09/2012 at 00:12. Pushed by hpereiradacosta into branch 'gtk3'. Revert "Replaced g_timeout_add by thread-safe gdk_threads_add_timeout function." Reason: gdk_threads_add_timeout is being obsoleted This reverts commit 850dfa7663d778e728afa1bd506b5f8cd7a3018f. M +1 -2 demo/oxygentimer.cpp M +1 -2 src/animations/oxygentimelineserver.cpp M +1 -2 src/animations/oxygentimer.cpp http://commits.kde.org/oxygen-gtk/ab1e6e634ce85130125d8589adfba75150cb2652 Ok. So revert done, as per comment #4 and #5 Attaching patch for reporter to test directly in next comment. In case the patch does fix the problem, then we'll need to think about something else. Created attachment 73875 [details] Suggested patch, to replace g_timeout_add by gdk_threads_add_timeout I verified that the patch applies both to the master (gtk2) and the gtk3 branch. Please give it a shot and report whether this does indeed fix the reported issue. Also, see comment #4 about posting here full BackTrace with debug symbols. Thanks for the help, Hugo I have asked for clarification about the deprecation, and a "core developer" has answered here https://mail.gnome.org/archives/gtk-list/2012-September/msg00013.html You should revert the reversion. opensuse themselves are patches version, we are going to try to test their patch. @Yehouda thanks ! @Matias (counter) comments ? If none, I'll re-revert. Still, Yehouda, I'd rather the patch to be tested before it goes in the stable branches ... Uff.. A very interesting discussion in the list. According ebassi the GDK threading API is available in GTK+ 2.x and 3.x.. will only be obsolete/romoved only in Gtk 4. When I wrote, was worried about it. So you can Re-Revert it. Still I have my doubts if it is absolutely necessary use gdk_theads, but it will work. mm.. Adding another question .. No need to start everything with gdk_threads_init () @Matias, ok, will re-revert. Thanks to you two for the inputs Git commit ef9460a27f0508f6702f33d5ce055146041ade9c by Hugo Pereira Da Costa. Committed on 12/09/2012 at 14:50. Pushed by hpereiradacosta into branch '1.3'. Replaced g_timeout_add by thread-safe gdk_threads_add_timeout function. M +2 -1 demo/oxygentimer.cpp M +2 -1 src/animations/oxygentimelineserver.cpp M +2 -1 src/animations/oxygentimer.cpp http://commits.kde.org/oxygen-gtk/ef9460a27f0508f6702f33d5ce055146041ade9c Git commit 0c9b47affae3006bc6f759c47a50efe06e3a228b by Hugo Pereira Da Costa. Committed on 12/09/2012 at 14:50. Pushed by hpereiradacosta into branch 'gtk3-1.1'. Replaced g_timeout_add by thread-safe gdk_threads_add_timeout function. M +2 -1 demo/oxygentimer.cpp M +2 -1 src/animations/oxygentimelineserver.cpp M +2 -1 src/animations/oxygentimer.cpp http://commits.kde.org/oxygen-gtk/0c9b47affae3006bc6f759c47a50efe06e3a228b re-reverted, so change is in. Also backported to 1.3 and gtk3-1.1 So closing ... @Yehouda Feel free to re-open if problem still persists. Git commit 87e66e6c85ca2f19fc60cfebadb476e8e6425c4d by Hugo Pereira Da Costa. Committed on 13/09/2012 at 00:12. Pushed by hpereiradacosta into branch 'master'. Revert "Replaced g_timeout_add by thread-safe gdk_threads_add_timeout function." Reason: gdk_threads_add_timeout is being obsoleted This reverts commit 850dfa7663d778e728afa1bd506b5f8cd7a3018f. M +1 -2 demo/oxygentimer.cpp M +1 -2 src/animations/oxygentimelineserver.cpp M +1 -2 src/animations/oxygentimer.cpp http://commits.kde.org/oxygen-gtk/87e66e6c85ca2f19fc60cfebadb476e8e6425c4d |