error with pygame and compiled lib on OSX

20 views
Skip to first unread message

kra...@gmail.com

unread,
Jul 28, 2015, 4:41:13 PM7/28/15
to Kivy users support
Hi,

I have a Kivy app operating on OSX that uses c types to interact with a dynamic library.  For the most part this interaction works fine but at a point where the native lib references a NSMutableDictionary it throws an error:

  Fatal Python error: (pygame parachute) Segmentation Fault
  Abort trap: 6

I can test the python module that interacts w/ the native library in pure python (not from Kivy) and there everything works fine - it only seems to be when the same particular function is called from a Kivy app (???)

And for reference it is happening in a python function that is bound to a button's on_release event - and if i comment out the access to the native lib from the on_release method it works fine so it does not seem to be related to my basic work with Kivy.

Has anyone else run into a similar problem?  Could it be something with the way pygame and my library are interacting in memory?

any and all advice is welcome :-)

Mike

Alexander Taylor

unread,
Jul 28, 2015, 6:36:33 PM7/28/15
to Kivy users support, kra...@gmail.com, kra...@gmail.com
I don't know if it will make a difference, but could you try using kivy 1.9 with sdl2 (the new default) rather than pygame?

Michael Kramer

unread,
Jul 28, 2015, 8:28:05 PM7/28/15
to Alexander Taylor, Kivy users support
Hi Alex,

Thanks for the tip. I just checked and i do have kivy 1.9 installed (v1.9.1-dev) but it is using pygame as the Text and window provider.

I checked and libSDL2, libSDL2_ttf, libSDL2_image and libSDL2_mixer are installed but Kivy is still using pygame as the provider.

Are there any instructions on getting kivy to use sdl2 as the provider rather than pygame?  the kivy install instructions mention installing these requirements as frameworks on the system but i'm not sure how to do this.

thanks,

Mike

Michael Kramer

unread,
Jul 28, 2015, 8:56:59 PM7/28/15
to Alexander Taylor, Kivy users support
Also to note - I am running kivy within my standard python environment.

If I install the OSX Kivy application I can see that the SDL2 framework is there in /Applications/Kivy.app/Contents/Frameworks/.  Ad if i run my main.py from there I first noticed that the graphical layout is much different than w/ the standard python install, and when it gets to the point where pygame error was thrown it is now throwing a generic 'Segmentation fault: 11'

the graphical issue is a bit funny as the same app (w/ a different library) works fine on iOS and android (both using sdl2) and there the graphical layout is the same as on the OSX machine where it is using pygame.

still confused but trying....

any other suggestions to try or recommendations to get kivy running under standard python to work with sdl2?

thanks,

Mike


On Tue, Jul 28, 2015 at 5:36 PM, Alexander Taylor <alexander...@gmail.com> wrote:

Bill Janssen

unread,
Jul 30, 2015, 7:36:21 PM7/30/15
to Kivy users support, alexander...@gmail.com, kra...@gmail.com
I've done that successfully.  You really just need to follow the build instructions at http://kivy.org/docs/installation/installation-macosx.html, under "Installing the dev version".  The only thing to watch out for is to use GStreamer-1.4.5, not any of the GStreamer-1.5.x versions.

Bill
Reply all
Reply to author
Forward
0 new messages