wxPython on Ubuntu18.04 grid scroll gives error

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

wxPython on Ubuntu18.04 grid scroll gives error

akshath Singhal-2
Using grid scroll on wxPython causes following error:
(wxglade_out.py:3029): Gtk-CRITICAL **: 23:59:48.646: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed

The code is as follows:

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.8.0 on Wed Jul  3 19:57:39 2019
#

import wx
import wx.grid

# begin wxGlade: dependencies
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.panel_2 = wx.Panel(self, wx.ID_ANY)
        self.display_list = wx.grid.Grid(self, wx.ID_ANY, size=(1600,1100))
        self.__set_properties()
        self.__do_layout()
        for i in range(24):
            for j in range(24):
                self.display_list.SetCellValue(i,j,str(i))
        self.Refresh()
        self.Update()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("frame")
        self.display_list.CreateGrid(25, 25)       
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyFrame.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        sizer_2.Add(self.display_list, 0, wx.EXPAND, 0)
        sizer_2.Add(self.panel_2, 0, wx.EXPAND, 0)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        # end wxGlade

# end of class MyFrame

class MyApp(wx.App):
    def OnInit(self):
        self.frame = MyFrame(None, wx.ID_ANY, "")
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True

# end of class MyApp

if __name__ == "__main__":
    app = MyApp(0)
    app.MainLoop()

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/64a6fed9-975b-4155-bfa8-8e85f4b2b293%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

wxglade_out.py (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: wxPython on Ubuntu18.04 grid scroll gives error

akshath Singhal-2
I tried the same on Ubuntu 16 and no warning was generated. I am trying to build this open source application and require it to support most of the commonly used OS.
I believe the problem doesnt exist in libgtk3.18.9 but does in libgtk3.22.

On Thursday, July 4, 2019 at 12:12:21 AM UTC+5:30, akshath Singhal wrote:
Using grid scroll on wxPython causes following error:
(wxglade_out.py:3029): Gtk-CRITICAL **: 23:59:48.646: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed

The code is as follows:

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.8.0 on Wed Jul  3 19:57:39 2019
#

import wx
import wx.grid

# begin wxGlade: dependencies
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.panel_2 = wx.Panel(self, wx.ID_ANY)
        self.display_list = wx.grid.Grid(self, wx.ID_ANY, size=(1600,1100))
        self.__set_properties()
        self.__do_layout()
        for i in range(24):
            for j in range(24):
                self.display_list.SetCellValue(i,j,str(i))
        self.Refresh()
        self.Update()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("frame")
        self.display_list.CreateGrid(25, 25)       
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyFrame.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        sizer_2.Add(self.display_list, 0, wx.EXPAND, 0)
        sizer_2.Add(self.panel_2, 0, wx.EXPAND, 0)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        # end wxGlade

# end of class MyFrame

class MyApp(wx.App):
    def OnInit(self):
        self.frame = MyFrame(None, wx.ID_ANY, "")
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True

# end of class MyApp

if __name__ == "__main__":
    app = MyApp(0)
    app.MainLoop()

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/64c8896e-f2da-4b4b-b0b7-79acc6656106%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython on Ubuntu18.04 grid scroll gives error

akshath Singhal-2
Also, the problem occurs only after editing the cell value. Once the editor has been closed. That should narrow down the search for the error.

On Thursday, July 4, 2019 at 12:21:47 AM UTC+5:30, akshath Singhal wrote:
I tried the same on Ubuntu 16 and no warning was generated. I am trying to build this open source application and require it to support most of the commonly used OS.
I believe the problem doesnt exist in libgtk3.18.9 but does in libgtk3.22.

On Thursday, July 4, 2019 at 12:12:21 AM UTC+5:30, akshath Singhal wrote:
Using grid scroll on wxPython causes following error:
(wxglade_out.py:3029): Gtk-CRITICAL **: 23:59:48.646: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed

The code is as follows:

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.8.0 on Wed Jul  3 19:57:39 2019
#

import wx
import wx.grid

# begin wxGlade: dependencies
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.panel_2 = wx.Panel(self, wx.ID_ANY)
        self.display_list = wx.grid.Grid(self, wx.ID_ANY, size=(1600,1100))
        self.__set_properties()
        self.__do_layout()
        for i in range(24):
            for j in range(24):
                self.display_list.SetCellValue(i,j,str(i))
        self.Refresh()
        self.Update()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("frame")
        self.display_list.CreateGrid(25, 25)       
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyFrame.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        sizer_2.Add(self.display_list, 0, wx.EXPAND, 0)
        sizer_2.Add(self.panel_2, 0, wx.EXPAND, 0)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        # end wxGlade

# end of class MyFrame

class MyApp(wx.App):
    def OnInit(self):
        self.frame = MyFrame(None, wx.ID_ANY, "")
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True

# end of class MyApp

if __name__ == "__main__":
    app = MyApp(0)
    app.MainLoop()

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/8a734374-87d2-4a2b-8bd6-0848142648c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython on Ubuntu18.04 grid scroll gives error

Robin Dunn
In reply to this post by akshath Singhal-2
On Wednesday, July 3, 2019 at 11:42:21 AM UTC-7, akshath Singhal wrote:
Using grid scroll on wxPython causes following error:
(wxglade_out.py:3029): Gtk-CRITICAL **: 23:59:48.646: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed


 
--
Robin

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/0878c696-9691-44af-abe8-8dc5e49a02fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython on Ubuntu18.04 grid scroll gives error

akshath Singhal-2
Thanks for the answer. Can you provide some guidance as to how these warnings can be redirected?

On Monday, July 8, 2019 at 11:54:18 PM UTC+5:30, Robin Dunn wrote:
On Wednesday, July 3, 2019 at 11:42:21 AM UTC-7, akshath Singhal wrote:
Using grid scroll on wxPython causes following error:
(wxglade_out.py:3029): Gtk-CRITICAL **: 23:59:48.646: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed


See response at <a href="https://github.com/wxWidgets/Phoenix/issues/1297" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fissues%2F1297\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFEtbdkQ6v5E6CNRlpzZjjqrAT9-Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fissues%2F1297\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFEtbdkQ6v5E6CNRlpzZjjqrAT9-Q&#39;;return true;">https://github.com/wxWidgets/Phoenix/issues/1297
 
--
Robin

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/38efea85-db81-4e73-9515-3229c19aec0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython on Ubuntu18.04 grid scroll gives error

Robin Dunn
On Monday, July 8, 2019 at 6:05:19 PM UTC-7, akshath Singhal wrote:
Thanks for the answer. Can you provide some guidance as to how these warnings can be redirected?



--
Robin

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/e38b8289-b136-4562-91ec-2bb2d1b8abf2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.