Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails with Ubuntu 18.04 #6

Closed
quozl opened this issue Apr 9, 2018 · 3 comments · Fixed by #9
Closed

Fails with Ubuntu 18.04 #6

quozl opened this issue Apr 9, 2018 · 3 comments · Fixed by #9

Comments

@quozl
Copy link
Contributor

quozl commented Apr 9, 2018

Activity does not start. Logs contain;

(sugar-activity:1468): Gtk-WARNING **: 07:44:24.571: Locale not supported by C library.
        Using the fallback 'C' locale.
/home/olpc/Activities/Ruler.activity/RulerActivity.py:22: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
/home/olpc/Activities/Ruler.activity/util.py:32: PyGIWarning: PangoCairo was imported without specifying a version first. Use gi.require_version('PangoCairo', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import PangoCairo
/usr/bin/sugar-activity:48: Warning: g_hash_table_destroy: assertion 'hash_table != NULL' failed
  activity = constructor(handle)
python: ../../../../src/cairo-surface.c:2994: _cairo_surface_create_in_error: Assertion `status < CAIRO_STATUS_LAST_STATUS' failed.
Terminated by signal 6, pid 1468 data (<open file '<fdopen>', mode 'w' at 0x7fe038a9ef60>, '47b8e304b7cd61aef2812034187ee1f23c9e7e9c')
@quozl
Copy link
Contributor Author

quozl commented Dec 10, 2018

Occurs in the call to PangoCairo.create_layout while drawing the default ruler.

  File "/usr/bin/sugar-activity", line 219, in <module>
    main()
  File "/usr/bin/sugar-activity", line 217, in main
    instance.run_main_loop()
  File "/usr/lib/python2.7/sugar3/activity/activity.py", line 464, in run_main_loop
    Gtk.main()
  File "/usr/share/sugar/activities/Ruler.activity/RulerActivity.py", line 75, in __expose_event_cb
    self._object.draw(cr, self._dpi)
  File "/usr/share/sugar/activities/Ruler.activity/show_rulers.py", line 49, in draw
    self.draw_ruler_pair(c, dpi, mm(dpi, 20))
  File "/usr/share/sugar/activities/Ruler.activity/show_rulers.py", line 80, in draw_ruler_pair
    self.draw_cm_ruler(c, dpi)
  File "/usr/share/sugar/activities/Ruler.activity/show_rulers.py", line 160, in draw_cm_ruler
    write(c, "%d" % n, self.font_bold, mm(dpi, 2.5), centered=True)

@quozl
Copy link
Contributor Author

quozl commented Mar 29, 2020

On Ubuntu 20.04 the signal is replaced by a complete traceback;

Traceback (most recent call last):
  File "/usr/share/sugar/activities/Ruler.activity/RulerActivity.py", line 75, in __expose_event_cb
    self._object.draw(cr, self._dpi)
  File "/usr/share/sugar/activities/Ruler.activity/show_rulers.py", line 47, in draw
    self.draw_ruler_pair(c, dpi, mm(dpi, 20))
  File "/usr/share/sugar/activities/Ruler.activity/show_rulers.py", line 78, in draw_ruler_pair
    self.draw_cm_ruler(c, dpi)
  File "/usr/share/sugar/activities/Ruler.activity/show_rulers.py", line 158, in draw_cm_ruler
    write(c, "%d" % n, self.font_bold, mm(dpi, 2.5), centered=True)
  File "/usr/share/sugar/activities/Ruler.activity/util.py", line 107, in write
    lo = PangoCairo.create_layout(pc)
TypeError: Expected cairo.Context

@Saumya-Mishra9129
Copy link
Member

I suggest testing with 2d3d3c0 once.It should fix this issue as well as #4.

@quozl quozl closed this as completed in #9 May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants