Opened 4 years ago

Closed 3 years ago

#2741 closed defect (fixed)

d.to.rast fails

Reported by: annakrat Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: wxGUI Version: svn-trunk
Keywords: rendering, d.to.rast, d.out.file Cc:
CPU: All Platform: All

Description

When typing d.to.rast output=xxx in GUI command line, I get:

Failed to run d.to.rast:                                                        
ERROR 4: `/home/anna/grassdata/nc_spm_08_grass7_test/user1/.tmp/anna-laptop/7668.0.png' does not exist in the file system,
and is not recognised as a supported dataset name.                              
Unable to open datasource </home/anna/grassdata/nc_spm_08_grass7_test/user1/.tmp/anna-laptop/7668.0.png>

This is because rendering is now running in parallel, so the current code [1] expects the png file, but it's not yet there. I am not sure what should be the right fix. Either we must implement some callback similarly like in d.out.file toknow when the rendering is finished, or perhaps we should be able to specify if rendering should be run in parallel or not?

[1] https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/mapdisp/frame.py#L684

Change History (4)

comment:1 Changed 3 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

comment:2 Changed 3 years ago by wenzeslaus

Keywords: d.out.file added

This works before r65205 (same as #2857 and #2899). With r65205 I get this error message for G7:d.to.rast and G7:d.out.file:

Traceback (most recent call last):
  File "/...dist.../gui/wxpython/lmgr/frame.py", line 311, in <lambda>

lambda event: self.RunSpecialCmd(event.cmd))
  File "/...dist.../gui/wxpython/lmgr/frame.py", line 619, in RunSpecialCmd

self.RunDisplayCmd(command)
  File "/...dist.../gui/wxpython/lmgr/frame.py", line 673, in RunDisplayCmd

'', ''))
  File "/...dist.../gui/wxpython/gui_core/forms.py", line 2467, in ParseCommand

self.mf.OnApply(None)
  File "/...dist.../gui/wxpython/gui_core/forms.py", line 687, in OnApply

self)
  File "/...dist.../gui/wxpython/mapdisp/frame.py", line 682, in DOutFileOptData

self.DOutFile(dcmd)
  File "/...dist.../gui/wxpython/mapdisp/frame.py", line 673, in DOutFile

self.MapWindow.SaveToFile(name, bitmapType, int(width), int(height))
  File "/...dist.../gui/wxpython/mapwin/buffered.py", line 635, in SaveToFile

self.Draw(self.pdc, img, drawid = 99)
  File "/...dist.../gui/wxpython/mapwin/buffered.py", line 320, in Draw

bitmap = wx.BitmapFromImage(img)
  File "/usr/lib/python2.7/dist-
packages/wx-3.0-gtk2/wx/_gdi.py", line 884, in BitmapFromImage

val = _gdi_.new_BitmapFromImage(*args, **kwargs)
ValueError
:
invalid null reference in method 'new_BitmapFromImage',
expected argument 1 of type 'wxImage const &'

comment:3 Changed 3 years ago by neteler

I tested this on Fedora 24, current releasebranch72: no issue.

comment:4 Changed 3 years ago by annakrat

Resolution: fixed
Status: newclosed

Right, this was fixed in r69754 and backported.

Note: See TracTickets for help on using tickets.