Repository: kivy/kivy

Issue:
Crash when Slider is imported before forking process on Mac OS X
Consider

```
#!/usr/bin/env python2
import multiprocessing
from kivy.app import App

from kivy.uix.slider import Slider

class Test(App):
    def build(self):
        return Slider()

def run_app():
    app = Test()
    app.run()

running_app = multiprocessing.Process(target=run_app)
running_app.daemon = True
running_app.start()
running_app.join()
```

This currently crashes on Mac OS X:

> **\* multi-threaded process forked ***
> crashed on child side of fork pre-exec
> USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER

This is because the property `padding` is initialized with `NumericProperty(sp(16))`. This call to `sp` will attempt to initialize SDL. Cf. [this question on StackOverflow](http://stackoverflow.com/questions/8106002/using-the-python-multiprocessing-module-for-io-with-pygame-on-mac-os-10-7)



Discussion:
Can you explain what you are trying to do here?

Kivy does not support multiple apps. So simple question what is the intention here? To try and make kivy support multiple apps or ...?

This is basically an app launcher. The parent process acts as a network client (communicating with a remote server), and depending on server messages switches between kivy apps and submits control parameters.

It works great, but during testing the issue with Slider came up.

ok so simply use subprocess.popen. 
Do you have to use multiprocessing?

I guess using multiprocessing makes it easier for you to send messages between the processes there. 

It's just one of the use cases that I haven't seen be used till now, people usually use separate processes of service on mobiles and osc or other options for communication.

If you are submitting a pr fixing this then could you please make sure to add a test too?


Resolving patch:
diff --git a/kivy/uix/slider.py b/kivy/uix/slider.py
--- a/kivy/uix/slider.py
+++ b/kivy/uix/slider.py
@@ -23,7 +23,6 @@
 from kivy.uix.widget import Widget
 from kivy.properties import (NumericProperty, AliasProperty, OptionProperty,
                              ReferenceListProperty, BoundedNumericProperty)
-from kivy.metrics import sp
 
 
 class Slider(Widget):
@@ -50,17 +49,17 @@ class Slider(Widget):
     :attr:`max` is a :class:`~kivy.properties.NumericProperty` and defaults to
     100.'''
 
-    padding = NumericProperty(sp(16))
+    padding = NumericProperty('16sp')
     '''Padding of the slider. The padding is used for graphical representation
     and interaction. It prevents the cursor from going out of the bounds of the
     slider bounding box.
 
-    By default, padding is sp(16). The range of the slider is reduced from
-    padding \*2 on the screen. It allows drawing the default cursor of sp(32)
+    By default, padding is 16sp. The range of the slider is reduced from
+    padding \*2 on the screen. It allows drawing the default cursor of 32sp
     width without having the cursor go out of the widget.
 
     :attr:`padding` is a :class:`~kivy.properties.NumericProperty` and defaults
-    to sp(16).'''
+    to 16sp.'''
 
     orientation = OptionProperty('horizontal', options=(
         'vertical', 'horizontal'))


Test patch: