#3153: g.gui.animation freezes when trying to add decorations
-----------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-trunk
Keywords: g.gui.animation | CPU: Unspecified
Platform: Linux |
-----------------------------+-------------------------
g.gui.animation freezes when trying to add decorations and the only
possibility is to close it, loosing all the settings.
{{{
Traceback (most recent call last):
File "/home/veroandreo/software/grass-7.3.svn/dist.x86_64-pc-linux-
gnu/gui/wxpython/animation/dialogs.py", line 1502, in OnExport
decorations=self.GetDecorations())
File "/home/veroandreo/software/grass-7.3.svn/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/signal.py", line 229, in emit
dispatcher.send(signal=self, *args, **kwargs)
File "/home/veroandreo/software/grass-7.3.svn/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/dispatcher.py", line 349, in send
**named
File "/home/veroandreo/software/grass-7.3.svn/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/robustapply.py", line 60, in robustApply
return receiver(*arguments, **named)
File "/home/veroandreo/software/grass-7.3.svn/dist.x86_64-pc-linux-
gnu/gui/wxpython/animation/controller.py", line 610, in _export
bgcolor, fgcolor).ConvertToImage()
File "/home/veroandreo/software/grass-7.3.svn/dist.x86_64-pc-linux-
gnu/gui/wxpython/animation/utils.py", line 250, in RenderText
w, h = dc.GetTextExtent(text)
File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_gdi.py", line
4127, in GetTextExtent
return _gdi_.DC_GetTextExtent(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "m_graphicContext" failed at
./src/common/dcgraph.cpp(1147) in DoGetTextExtent():
wxGCDC(cg)::DoGetTextExtent - invalid DC
}}}
It would be useful to be able to export those settings or configurations
to keep them as templates, then, or so.
#3153: g.gui.animation freezes when trying to add decorations
--------------------------+-----------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: g.gui.animation
CPU: Unspecified | Platform: Linux
--------------------------+-----------------------------
Comment (by veroandreo):
Sorry for the delay...
I just select a raster or vector time series to display, then go to
"export animation" and before actually exporting, I add some decoration,
i.e.: timestamp, image or text, and when I click over export, rather
nothing happens or "Preparing export, please wait..." sign freezes in the
screen forever, while in the output window, I get the same error as
reported before...
#3153: g.gui.animation freezes when trying to add decorations
--------------------------+-----------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: g.gui.animation
CPU: Unspecified | Platform: Linux
--------------------------+-----------------------------
Comment (by annakrat):
I still can't reproduce it, even with wxpython 3.0.2.0. First try using
different font, but I don't think that would help. Next try to apply this
change and recompile:
def RenderText(text, font, bgcolor, fgcolor):
"""Renderes text with given font to bitmap."""
- dc = wx.MemoryDC()
+ dc = wx.MemoryDC(wx.EmptyBitmap(20, 20))
dc.SetFont(font)
w, h = dc.GetTextExtent(text)
bmp = wx.EmptyBitmap(w + 2, h + 2)
#3153: g.gui.animation freezes when trying to add decorations
--------------------------+-----------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: g.gui.animation
CPU: Unspecified | Platform: Linux
--------------------------+-----------------------------
Comment (by neteler):
I applied the patch and it no longer freezes. The print patch did not have
any effect (nothing is printed).
I attach a screenshot to show that when enlarging the window black borders
come up which have a refresh issue when moving the legend around. Perhaps
related?
#3153: g.gui.animation freezes when trying to add decorations
--------------------------+-----------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: g.gui.animation
CPU: Unspecified | Platform: Linux
--------------------------+-----------------------------
Comment (by annakrat):
Replying to [comment:8 neteler]:
> I applied the patch and it no longer freezes. The print patch did not
have any effect (nothing is printed).
So do you confirm the patch solved the issue? Do the exported images/gif
and the text look correct?
> I attach a screenshot to show that when enlarging the window black
borders come up which have a refresh issue when moving the legend around.
Perhaps related?
>
Could be related, but it's a little bit different problem, please create a
new ticket.
#3153: g.gui.animation freezes when trying to add decorations
--------------------------+-----------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: g.gui.animation
CPU: Unspecified | Platform: Linux
--------------------------+-----------------------------
Comment (by veroandreo):
I applied the patch. Buttons "Cancel" and "Export" still freeze when I add
decorations (i.e.: remain completely irresponsive) if I try to click on
them. Luckily, I can reach them by <Tab> and the animation is exported
correctly with the decorations I added. However in the teminal I get the
following:
{{{
/home/veroandreo/software/grass-7.3.svn/dist.x86_64-pc-linux-
gnu/etc/python/grass/imaging/images2gif.py:344: VisibleDeprecationWarning:
converting an array with ndim > 0 to an index will result in an error in
the future
im2 = im[y0:y1, x0:x1]
}}}
If I do not add any decorations and only export the animation as-is
directly, buttons work fine. But I get the same warning in the terminal:
{{{
/home/veroandreo/software/grass-7.3.svn/dist.x86_64-pc-linux-
gnu/etc/python/grass/imaging/images2gif.py:344: VisibleDeprecationWarning:
converting an array with ndim > 0 to an index will result in an error in
the future
im2 = im[y0:y1, x0:x1]
}}}
Tested with a STRDS in NC climatic Location. Grass trunk,
revision=r69647M. If you have any ideas, I'm happy to keep testing.
#3153: g.gui.animation freezes when trying to add decorations
--------------------------+-----------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: g.gui.animation
CPU: Unspecified | Platform: Linux
--------------------------+-----------------------------
Comment (by veroandreo):
I have tested both in trunk r69822 and 72 release branch r69821 and the
issue prevails. Steps to reproduce are:
1. call g.gui.animation from terminal
2. add new animation
3. add stvds -> ok -> ok (animation works fine)
4. go to export icon
5. set a file type and name
6. go to decorations tab
7. add text
8. click export from there... No way, it does not respond. It is frozen.
The only remaining option is to close.
If you try to export directly, without touching the decoration tab, it
works fine. However you don't get any decoration.
#3153: g.gui.animation freezes when trying to add decorations
--------------------------+-----------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: g.gui.animation
CPU: Unspecified | Platform: Linux
--------------------------+-----------------------------
Comment (by neteler):
Replying to [comment:13 annakrat]:
> I understood the patch was working for Markus.
I followed the procedure of Vero: I can still switch between "Format" und
"Decorations" tab but both the "Cancel" and "Export" buttons are like
disabled.
In the terminal there is many times:
{{{
(g.gui.animation:6695): Gtk-CRITICAL **: gtk_box_gadget_distribute:
assertion 'size >= 0' failed in GtkNotebook
}}}
#3153: g.gui.animation freezes when trying to add decorations
--------------------------+-----------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: g.gui.animation
CPU: Unspecified | Platform: Linux
--------------------------+-----------------------------
Comment (by neteler):
Just to clarify: (for me) g.gui.animation is not freezing, I think the
ticket's title is a bit misleading. "Simply" the buttons get somehow
disconnected, i.e. deactivated in the decorations dialog while the tabs
etc remain working.
Closing the decorations dialog with the upper right X brings me back to
the main window of the module which remains working (except for this
decorations dialog.
#3153: g.gui.animation freezes when trying to add decorations
--------------------------+-----------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: g.gui.animation
CPU: Unspecified | Platform: Linux
--------------------------+-----------------------------
Comment (by veroandreo):
Replying to [comment:15 neteler]:
> Just to clarify: (for me) g.gui.animation is not freezing, I think the
ticket's title is a bit misleading. "Simply" the buttons get somehow
disconnected, i.e. deactivated in the decorations dialog while the tabs
etc remain working.
>
> Closing the decorations dialog with the upper right X brings me back to
the main window of the module which remains working (except for this
decorations dialog.
Yes, the same for me... Sorry if the tittle is missleading, did not find
the proper words at time