Google Code-In 2014
Task Preview
RaspberryPi: Broadcom BugCopyleft Games Group
STATUS: DRAFT

We've found a rather nasty bug with Broadcom's VideoCore library which only seems to present itself in Python with libsoy loading the videocore plugin to access the videocore library.

If the same code is moved to libsoy itself, it works.

If the videocore plugin is loaded directly by Python (rather than via libsoy), it works.

If libsoy is used by an application other than Python, it works.

If Python "loads" the broadcom library via ctypes before PySoy, it works.

So import ctypes;libbcm = ctypes.cdll.LoadLibrary("/opt/vc/lib/libbcm_host.so") needs to be called before import soy as a really hackish work-around. We need a way to fix this bug for good without work-arounds.

Find a way to fix this in the C/Genie code within libsoy or the videocore plugin. This may end up being just 1-2 lines of code to replicate whatever loading libbcm_host.so using ctypes is doing.

You will need a RaspberryPi computer to work on this task. Using an SD card image for Sprout, start by building libsoy from Mercurial which will allow you to modify the RaspberryPi-specific code in platforms/videocore.

While working on this task you should join and remain in #CopyleftGames on Freenode to get help, feedback, and guidance from mentors and other developers. Code updates which may affect your work are also announced here as they happen.

When you've done, commit your work and post the resulting changeset url to this task.