No Audio Output on Kivy Applications Running on a Rasperry Pi Jesse - raspberry-pi

Esteemed Colleagues --
I hope you're doing well. I'm hoping you can help me figure out a weird audio issue running Kivy on Raspberry Pi. In a nutshell, I can't get Kivy to produce any audio running on Raspberry Pi. I'm not sure on other hardware as I'm only developing on RPi. My code is below. This is just a simple soundboard app. Press a button and it plays a file. It should work in theory, but it doesn't. I have read every single relevant StackOverflow and Reddit post. I've tried dozens of variations of my code. No matter what I do Kivy is still as silent as mouse.
Here is what I'm running:
Raspberry Pi 3 Model B
Rasbian -- Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
Kivy -- 1.9.2-dev0
What I've tried:
USB Audio & System Audio -- I tried using the system audio (headphone) jack as well as a USB sound card. Specifically, I'm using Plugable USB Headphone Adapter. Yes, my speakers are plugged in to the right ports. I've updated my configuration files to default to the USB adapter as I was getting too much interference from the system board output.
Formats -- I've tried both MP3, WAV, OGG format. No dice.
Playing From Terminal -- I can get the system to produce audio using other methods. I can get Rasbian to play audio as well as on the terminal using mpg321. This command "mpg321 "/home/pi/burnedpi/assets/audio/scotch.mp3" will successfully decode and play the MP3 file.
It will output sound just fine via USB. I've tested my speakers in the terminal with "speaker-test -c2 -t wav" command and they work.
I've adjusted and confirmed my audio internal audio mixer settings in alsmixer. The sound card has the volume properly turned up.
Other Commands and Programs Work -- I'm pretty sure that this issue is just related to Kivy on Pi. Other applications are able to produce sound just fine.
Example
Kivy Audio Applications Don't Work -- The official Kivy audio examples that get installed by default do not produce any audio.
Essentially, I'm just trying to get Kivy to output sound. I've got a real simple script that outputs an audio file when a mouse is clicked.
I'm really stuck and don't know what to do next. Any help would be greatly appreciated.
Cheers.
Steve.
Here is my code.
My spacing/tabs are correct, but Stack makes it hard to format
* main.py *
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import ListProperty, ObjectProperty, NumericProperty
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.core.audio import SoundLoader
class SoundBoard(Screen):
def scotch(self):
sound = SoundLoader.load('../assets/audio/scotch.wav')
if sound:
sound.play()
sound.seek(0.00)
print("Sound found at %s" % sound.source)
print("Sound is %.3f seconds" % sound.length)
print("Sound status %s" % sound.status)
class RootScreen(ScreenManager):
pass
class audio(App):
def build(self):
return SoundBoard()
if __name__ == "__main__":
audio().run()
audio.kv
<RootScreen>
SoundBoard:
<SoundBoard>
name: 'soundboard'
BoxLayout:
Button:
text: 'i love scotch scotchy scotch scotch'
on_press: root.scotch()
* Here is what I get when I run the code: *
pi#raspberrypi:~ $ python burnedpi/audio/main.py
[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_17-01-11_84.txt
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Kivy ] v1.9.2-dev0
[INFO ] [Python ] v2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2]
[INFO ] [Factory ] 193 symbols loaded
[INFO ] [Text ] Provider: sdl2
[INFO ] [AudioGstplayer] Using Gstreamer 1.4.4.0
[INFO ] [Audio ] Providers: audio_gstplayer, audio_sdl2 (audio_ffpyplayer ignored)
[INFO ] [Window ] Provider: egl_rpi
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <gl>
[INFO ] [GL ] OpenGL version <OpenGL ES 2.0>
[INFO ] [GL ] OpenGL vendor <Broadcom>
[INFO ] [GL ] OpenGL renderer <VideoCore IV HW>
[INFO ] [GL ] OpenGL parsed version: 2, 0
[INFO ] [GL ] Shading version <OpenGL ES GLSL ES 1.00>
[INFO ] [GL ] Texture max size <2048>
[INFO ] [GL ] Texture max units <8>
[INFO ] [Shader ] fragment shader: <Compiled>
[INFO ] [Shader ] vertex shader: <Compiled>
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [OSC ] using <multiprocessing> for socket
[INFO ] [ProbeSysfs ] device match: /dev/input/event0
[INFO ] [MTD ] Read event from </dev/input/event0>
[INFO ] [ProbeSysfs ] device match: /dev/input/event1
[INFO ] [MTD ] Read event from </dev/input/event1>
[INFO ] [ProbeSysfs ] device match: /dev/input/event0
[INFO ] [HIDInput ] Read event from </dev/input/event0>
[INFO ] [ProbeSysfs ] device match: /dev/input/event1
[INFO ] [HIDInput ] Read event from </dev/input/event1>
[INFO ] [Base ] Start application main loop
[INFO ] [MTD ] </dev/input/event0> range position X is 0 - 800
[INFO ] [MTD ] </dev/input/event0> range position Y is 0 - 480
[INFO ] [MTD ] </dev/input/event0> range touch major is 0 - 0
[INFO ] [MTD ] </dev/input/event0> range touch minor is 0 - 0
[INFO ] [MTD ] </dev/input/event0> range pressure is 0 - 255
[INFO ] [MTD ] </dev/input/event0> axes invertion: X is 0, Y is 0
[INFO ] [MTD ] </dev/input/event0> rotation set to 0
[INFO ] [MTD ] </dev/input/event1> range position X is 0 - 0
[INFO ] [MTD ] </dev/input/event1> range position Y is 0 - 0
[INFO ] [HIDMotionEvent] using <FT5406 memory based driver>
[INFO ] [MTD ] </dev/input/event1> range touch major is 0 - 0
[INFO ] [HIDMotionEvent] <FT5406 memory based driver> range ABS X position is 0 - 800
[INFO ] [MTD ] </dev/input/event1> range touch minor is 0 - 0
[INFO ] [HIDMotionEvent] <FT5406 memory based driver> range ABS Y position is 0 - 480
[INFO ] [MTD ] </dev/input/event1> range pressure is 0 - 255
[INFO ] [GL ] NPOT texture support is available
[INFO ] [HIDMotionEvent] <FT5406 memory based driver> range position X is 0 - 800
[INFO ] [MTD ] </dev/input/event1> axes invertion: X is 0, Y is 0
[INFO ] [HIDMotionEvent] <FT5406 memory based driver> range position Y is 0 - 480
[INFO ] [HIDMotionEvent] using <C-Media Electronics Inc. USB Audio Device>
[INFO ] [MTD ] </dev/input/event1> rotation set to 0
Sound found at /home/pi/burnedpi/assets/audio/scotch.wav
Sound is 5.486 seconds
Sound status play
Here is the information from the Kivy Log File
[INFO ] Logger: Record log in /home/pi/.kivy/logs/kivy_17-01-11_84.txt
[INFO ] Image: Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] Kivy: v1.9.2-dev0
[INFO ] Python: v2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2]
[INFO ] Factory: 193 symbols loaded
[INFO ] Text: Provider: sdl2
[INFO ] AudioGstplayer: Using Gstreamer 1.4.4.0
[INFO ] Audio: Providers: audio_gstplayer, audio_sdl2 (audio_ffpyplayer ignored)
[INFO ] Window: Provider: egl_rpi
[INFO ] GL: Using the "OpenGL ES 2" graphics system
[INFO ] GL: Backend used <gl>
[INFO ] GL: OpenGL version <OpenGL ES 2.0>
[INFO ] GL: OpenGL vendor <Broadcom>
[INFO ] GL: OpenGL renderer <VideoCore IV HW>
[INFO ] GL: OpenGL parsed version: 2, 0
[INFO ] GL: Shading version <OpenGL ES GLSL ES 1.00>
[INFO ] GL: Texture max size <2048>
[INFO ] GL: Texture max units <8>
[INFO ] Shader: fragment shader: <Compiled>
[INFO ] Shader: vertex shader: <Compiled>
[INFO ] Window: virtual keyboard not allowed, single mode, not docked
[INFO ] OSC: using <multiprocessing> for socket
[INFO ] ProbeSysfs: device match: /dev/input/event0
[INFO ] MTD: Read event from </dev/input/event0>
[INFO ] ProbeSysfs: device match: /dev/input/event1
[INFO ] MTD: Read event from </dev/input/event1>
[INFO ] ProbeSysfs: device match: /dev/input/event0
[INFO ] HIDInput: Read event from </dev/input/event0>
[INFO ] ProbeSysfs: device match: /dev/input/event1
[INFO ] HIDInput: Read event from </dev/input/event1>
[INFO ] Base: Start application main loop
[INFO ] MTD: </dev/input/event0> range position X is 0 - 800
[INFO ] MTD: </dev/input/event0> range position Y is 0 - 480
[INFO ] MTD: </dev/input/event0> range touch major is 0 - 0
[INFO ] MTD: </dev/input/event0> range touch minor is 0 - 0
[INFO ] MTD: </dev/input/event0> range pressure is 0 - 255
[INFO ] MTD: </dev/input/event0> axes invertion: X is 0, Y is 0
[INFO ] MTD: </dev/input/event0> rotation set to 0
[INFO ] MTD: </dev/input/event1> range position X is 0 - 0
[INFO ] MTD: </dev/input/event1> range position Y is 0 - 0
[INFO ] HIDMotionEvent: using <FT5406 memory based driver>
[INFO ] MTD: </dev/input/event1> range touch major is 0 - 0
[INFO ] HIDMotionEvent: <FT5406 memory based driver> range ABS X position is 0 - 800
[INFO ] MTD: </dev/input/event1> range touch minor is 0 - 0
[INFO ] HIDMotionEvent: <FT5406 memory based driver> range ABS Y position is 0 - 480
[INFO ] MTD: </dev/input/event1> range pressure is 0 - 255
[INFO ] GL: NPOT texture support is available
[INFO ] HIDMotionEvent: <FT5406 memory based driver> range position X is 0 - 800
[INFO ] MTD: </dev/input/event1> axes invertion: X is 0, Y is 0
[INFO ] HIDMotionEvent: <FT5406 memory based driver> range position Y is 0 - 480
[INFO ] HIDMotionEvent: using <C-Media Electronics Inc. USB Audio Device>
[INFO ] MTD: </dev/input/event1> rotation set to 0
[INFO ] Base: Leaving application in progress...
[WARNING] stderr: Traceback (most recent call last):
[WARNING] stderr: File "burnedpi/audio/main.py", line 27, in <module>
[WARNING] stderr: audio().run()
[WARNING] stderr: File "/usr/local/lib/python2.7/dist-packages/kivy/app.py", line 828, in run
[WARNING] stderr: runTouchApp()
[WARNING] stderr: File "/usr/local/lib/python2.7/dist-packages/kivy/base.py", line 504, in runTouchApp
[WARNING] stderr: EventLoop.window.mainloop()
[WARNING] stderr: File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_egl_rpi.py", line 90, in mainloop
[WARNING] stderr: self._mainloop()
[WARNING] stderr: File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_egl_rpi.py", line 85, in _mainloop
[WARNING] stderr: EventLoop.idle()
[WARNING] stderr: File "/usr/local/lib/python2.7/dist-packages/kivy/base.py", line 339, in idle
[WARNING] stderr: Clock.tick()
[WARNING] stderr: File "/usr/local/lib/python2.7/dist-packages/kivy/clock.py", line 553, in tick
[WARNING] stderr: current = self.idle()
[WARNING] stderr: File "/usr/local/lib/python2.7/dist-packages/kivy/clock.py", line 533, in idle
[WARNING] stderr: usleep(1000000 * sleeptime)
[WARNING] stderr: File "/usr/local/lib/python2.7/dist-packages/kivy/clock.py", line 717, in usleep
[WARNING] stderr: _usleep(microseconds, self._sleep_obj)
[WARNING] stderr: File "/usr/local/lib/python2.7/dist-packages/kivy/clock.py", line 445, in _usleep
[WARNING] stderr: _libc_usleep(int(microseconds))
[WARNING] stderr: KeyboardInterrupt

Figured it out. Set the enviromental variable prior to importing Kivy. Add this to the top of the file.
import os
os.environ['KIVY_AUDIO'] = 'sdl2'
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import ListProperty, ObjectProperty, NumericProperty
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.core.audio import SoundLoader
class SoundBoard(Screen):
def scotch(self):
sound = SoundLoader.load('../assets/audio/scotch.wav')
if sound:
sound.play()
sound.seek(0.00)
print("Sound found at %s" % sound.source)
print("Sound is %.3f seconds" % sound.length)
print("Sound status %s" % sound.status)
class RootScreen(ScreenManager):
pass
class audio(App):
def build(self):
return SoundBoard()
if __name__ == "__main__":
audio().run()
Make sure you set your environmental variables prior to importing Kivy. Use this format:
import os
os.environ['KIVY_AUDIO'] = 'sdl2'
Check out https://kivy.org/docs/guide/environment.html for more information.

Related

Matlab terminate while compile caffe. Disabled - No sandbox or build area path

E0302 03:12:50.399718 23466 net.cpp:785] [Backward] All net params (data, diff): L1 norm = (13513.7, 65688.6); L2 norm = (23.9842, 295.159)
F0302 03:14:40.549015 23466 syncedmem.hpp:31] Check failed: error == cudaSuccess (29 vs. 0) driver shutting down
*** Check failure stack trace: ***
------------------------------------------------------------------------
abort() detected at Fri Mar 2 03:14:40 2018
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Current Graphics Driver: Unknown hardware
Current Visual : 0x21 (class 4, depth 24)
Default Encoding : UTF-8
Deployed : false
GNU C Library : 2.23 stable
Host Name : lly
MATLAB Architecture : glnxa64
MATLAB Entitlement ID: 6257193
MATLAB Root : /usr/local/MATLAB/R2016b
MATLAB Version : 9.1.0.441655 (R2016b)
OpenGL : hardware
Operating System : Linux 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018 x86_64
Processor ID : x86 Family 6 Model 158 Stepping 9, GenuineIntel
Virtual Machine : Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : The X.Org Foundation (11905000), display :0
Fault Count: 1
Abnormal termination:
abort()
Register State (from fault):
RAX = 0000000000000000 RBX = 00007fb35b643420
RCX = 00007fb4b71e9428 RDX = 0000000000000006
RSP = 00007fb49a94d008 RBP = 00007fb49a94d2e0
RSI = 0000000000005baa RDI = 0000000000005b76
R8 = 0000000000000081 R9 = 00007fb35b643440
R10 = 0000000000000008 R11 = 0000000000000202
R12 = 00007fb35b643480 R13 = 0000000000000072
R14 = 00007fb35b643420 R15 = 00007fb35b64ade0
RIP = 00007fb4b71e9428 EFL = 0000000000000202
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007fb4b71e9428 /lib/x86_64-linux-gnu/libc.so.6+00218152 gsignal+00000056
[ 1] 0x00007fb4b71eb02a /lib/x86_64-linux-gnu/libc.so.6+00225322 abort+00000362
[ 2] 0x00007fb35b42ee49 /usr/lib/x86_64-linux-gnu/libglog.so.0+00040521
[ 3] 0x00007fb35b4305cd /usr/lib/x86_64-linux-gnu/libglog.so.0+00046541
[ 4] 0x00007fb35b432433 /usr/lib/x86_64-linux-gnu/libglog.so.0+00054323 _ZN6google10LogMessage9SendToLogEv+00000643
[ 5] 0x00007fb35b43015b /usr/lib/x86_64-linux-gnu/libglog.so.0+00045403 _ZN6google10LogMessage5FlushEv+00000187
[ 6] 0x00007fb35b432e1e /usr/lib/x86_64-linux-gnu/libglog.so.0+00056862 _ZN6google15LogMessageFatalD2Ev+00000014
[ 7] 0x00007fb35b9fe8d0 /home/lly/work/caffe-ssd/matlab/+caffe/private/caffe_.mexa64+01329360
[ 8] 0x00007fb35b9c9512 /home/lly/work/caffe-ssd/matlab/+caffe/private/caffe_.mexa64+01111314
[ 9] 0x00007fb35b99bfca /home/lly/work/caffe-ssd/matlab/+caffe/private/caffe_.mexa64+00925642
[ 10] 0x00007fb35b99c3dd /home/lly/work/caffe-ssd/matlab/+caffe/private/caffe_.mexa64+00926685
[ 11] 0x00007fb35bbabae5 /home/lly/work/caffe-ssd/matlab/+caffe/private/caffe_.mexa64+03087077
[ 12] 0x00007fb35b91a01f /home/lly/work/caffe-ssd/matlab/+caffe/private/caffe_.mexa64+00393247
[ 13] 0x00007fb35b91a19a /home/lly/work/caffe-ssd/matlab/+caffe/private/caffe_.mexa64+00393626
[ 14] 0x00007fb4b71edff8 /lib/x86_64-linux-gnu/libc.so.6+00237560
[ 15] 0x00007fb4b71ee045 /lib/x86_64-linux-gnu/libc.so.6+00237637
[ 16] 0x00007fb4a6f047c0 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00767936
[ 17] 0x00007fb4a6f03011 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00761873
[ 18] 0x00007fb4a6bb9cfe /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00437502
[ 19] 0x00007fb4a6ba0878 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00333944 _ZN13Mfh_MATLAB_fn11dispatch_fhEiPP11mxArray_tagiS2_+00000616
[ 20] 0x00007fb499146a38 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcos_impl.so+02771512
[ 21] 0x00007fb4a6bf5bd5 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00682965
[ 22] 0x00007fb4a6bb9cfe /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00437502
[ 23] 0x00007fb4a6ba0878 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00333944 _ZN13Mfh_MATLAB_fn11dispatch_fhEiPP11mxArray_tagiS2_+00000616
[ 24] 0x00007fb4a3b2a9b4 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+12614068
[ 25] 0x00007fb4a3b2aa50 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+12614224
[ 26] 0x00007fb4a3909306 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10380038
[ 27] 0x00007fb4a3909785 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10381189
[ 28] 0x00007fb4a3989cc8 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10906824
[ 29] 0x00007fb4a398ba2a /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10914346
[ 30] 0x00007fb4a632aee0 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_interpreter.so+02445024 _Z44inCallFcnWithTrapInDesiredWSAndPublishEventsiPP11mxArray_tagiS1_PKcbP15inWorkSpace_tag+00000080
[ 31] 0x00007fb4a766a77a /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00690042 _ZN3iqm15BaseFEvalPlugin7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000522
[ 32] 0x00007fb4803cea3f /usr/local/MATLAB/R2016b/bin/glnxa64/libnativejmi.so+00862783 _ZN9nativejmi14JmiFEvalPlugin7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000319
[ 33] 0x00007fb4803f1bd5 /usr/local/MATLAB/R2016b/bin/glnxa64/libnativejmi.so+01006549 _ZN3mcr3mvm27McrSwappingIqmPluginAdapterIN9nativejmi14JmiFEvalPluginEE7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000741
[ 34] 0x00007fb4a7660a0a /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00649738
[ 35] 0x00007fb4a764ceb2 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00569010
[ 36] 0x00007fb4a5ea805a /usr/local/MATLAB/R2016b/bin/glnxa64/libmwbridge.so+00159834
[ 37] 0x00007fb4a5ea8617 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwbridge.so+00161303
[ 38] 0x00007fb4a5eaf519 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwbridge.so+00189721
[ 39] 0x00007fb4a5eaf614 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwbridge.so+00189972
[ 40] 0x00007fb4a5eaffa9 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwbridge.so+00192425 _Z8mnParserv+00000617
[ 41] 0x00007fb4a6ecc243 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00537155
[ 42] 0x00007fb4a6ece1ce /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00545230
[ 43] 0x00007fb4a6ece849 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00546889 _ZN5boost6detail17task_shared_stateINS_3_bi6bind_tIvPFvRKNS_8functionIFvvEEEENS2_5list1INS2_5valueIS6_EEEEEEvE6do_runEv+00000025
[ 44] 0x00007fb4a6ecd236 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00541238
[ 45] 0x00007fb4a7694b49 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00863049
[ 46] 0x00007fb4a768151c /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00783644 _ZN5boost6detail8function21function_obj_invoker0ISt8functionIFNS_3anyEvEES4_E6invokeERNS1_15function_bufferE+00000028
[ 47] 0x00007fb4a76811fc /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00782844 _ZN3iqm18PackagedTaskPlugin7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000428
[ 48] 0x00007fb4a7660a0a /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00649738
[ 49] 0x00007fb4a764c690 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00566928
[ 50] 0x00007fb4a764f048 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00577608
[ 51] 0x00007fb4b895340a /usr/local/MATLAB/R2016b/bin/glnxa64/libmwservices.so+02634762
[ 52] 0x00007fb4b89549af /usr/local/MATLAB/R2016b/bin/glnxa64/libmwservices.so+02640303
[ 53] 0x00007fb4b89550e6 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwservices.so+02642150 _Z25svWS_ProcessPendingEventsiib+00000102
[ 54] 0x00007fb4a6ecc8c6 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00538822
[ 55] 0x00007fb4a6eccc42 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00539714
[ 56] 0x00007fb4a6eba8d6 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00465110
[ 57] 0x00007fb4b75856ba /lib/x86_64-linux-gnu/libpthread.so.0+00030394
[ 58] 0x00007fb4b72bb41d /lib/x86_64-linux-gnu/libc.so.6+01078301 clone+00000109
[ 59] 0x0000000000000000 <unknown-module>+00000000
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.** This crash report has been saved to disk as /home/lly/matlab_crash_dump.23414-1 **
MATLAB is exiting because of fatal error
Killed
Here is my hardware information:
ubuntu 16.04
gtx1070
cdua8.0
cudnn5.1
NVIDIA Drivers: NVIDIA-Linux-x86_64-384.111.run
MATLAB2016b
Any idea on how to solve this? Thank you very much!
Here is my compile caffe process:
Because MATLAB library files and Ubuntu system library files conflict, first i backuped the MATLAB file, and then added the system files to the environment variables, so that the system will use the system's default dynamic file.
①Rename libstdc++.so.6 to libstdc++.so.6_back in the directory of /usr/local/MATLAB/R2016b/sys/os/glnxa64
②execute sudo make matcaffe -j8 which is successful.
③execute sudo make mattest -j8 get this wrong information:
Invalid MEX-file
'/home/lly/work/caffe/matlab/+caffe/private/caffe_.mexa64':
/home/lly/work/caffe/matlab/+caffe/private/caffe_.mexa64: undefined
symbol:
_ZN2cv8imencodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11_InputArrayERSt6vectorIhSaIhEERKSB_IiSaIiEE.
Error in caffe.set_mode_cpu (line 5)
caffe_('set_mode_cpu');
Error in caffe.run_tests (line 6)
caffe.set_mode_cpu();
④Then, I deleted six MATLAB files in directory /usr/local/MATLAB/R2016b/bin/glnxa64, in order to solve this problem.But finally got the matlab crash problem.
sudo mv libopencv_core.so.2.4 libopencv_core.so.2.4.bak
sudo mv libopencv_core.so.2.4.9 libopencv_core.so.2.4.9.bak
sudo mv libopencv_highgui.so.2.4 libopencv_highgui.so.2.4.bak
sudo mv libopencv_highgui.so.2.4.9 libopencv_highgui.so.2.4.9.bak
sudo mv libopencv_imgproc.so.2.4 libopencv_imgproc.so.2.4.bak
sudo mv libopencv_imgproc.so.2.4.9 libopencv_imgproc.so.2.4.9.bak
Look at the following two things in your log.
Current Graphics Driver: Unknown hardware
OpenGL : hardware
The first one needs to be populated by your graphics card driver information. That is not happening.
Perform the following test:
Put OpenGL to be Software. Check that it has been moved to software
by typing: h = opengl('info')
Check that the current graphics driver field is populated with whatever software driver you have.
Make sure to save these settings.
Restart the Matlab.
Reconfirm the settings and make sure opengl is to software.
Replicate the crash.
Share the Log.
After this you can try running the memory diagnostic on your System Memory and Graphics Card.
I had faced a similar issue and it turned out that there was a problem in my System Memory and Graphics card.
But that you will come to know after the log report is generated.

Why does MATLAB crash with "MATLAB has encountered an internal error and needs to close"?

"Matlab has encountered an internal problem and needs to close"
MATLAB crash file:C:\Users\MJ\AppData\Local\Temp\matlab_crash_dump.7584-1:
------------------------------------------------------------------------
abort() detected at Thu Jan 4 15:30:18 2018
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Current Graphics Driver: Unknown hardware
Default Encoding : KSC_5601
Deployed : false
Graphics card 1 : NVIDIA ( 0x10de ) NVIDIA GeForce GTX 1070 Version 23.21.13.8871 (2017-12-15)
Host Name : DESKTOP-EGKG0V7
MATLAB Architecture : win64
MATLAB Entitlement ID: 2385114
MATLAB Root : C:\Program Files\MATLAB\R2017b
MATLAB Version : 9.3.0.713579 (R2017b)
OpenGL : hardware
Operating System : Microsoft Windows 10 Education
Processor ID : x86 Family 6 Model 158 Stepping 9, GenuineIntel
Virtual Machine : Java 1.8.0_121-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : Version 10.0 (Build 16299)
Fault Count: 1
Stack Trace (captured):
[ 0] 0x0000000012795e83 bin\win64\libmwfl.dll+00155267 foundation::core::diag::thread_context::unspecified_bool+00000051
[ 1] 0x0000000012794478 bin\win64\libmwfl.dll+00148600 foundation::core::diag::stacktrace_base::capture+00000024
[ 2] 0x00000000127979ce bin\win64\libmwfl.dll+00162254 foundation::core::diag::symbols::getSymbolAddress+00006494
[ 3] 0x000000001279a807 bin\win64\libmwfl.dll+00174087 foundation::core::diag::disable_terminate_dialog+00000887
[ 4] 0x00000000174df615 bin\win64\mcr.dll+00652821 mnShutdownMCR+00023605
[ 5] 0x00000000174df2a1 bin\win64\mcr.dll+00651937 mnShutdownMCR+00022721
[ 6] 0x00000000174df378 bin\win64\mcr.dll+00652152 mnShutdownMCR+00022936
[ 7] 0x00000000174dc5e9 bin\win64\mcr.dll+00640489 mnShutdownMCR+00011273
[ 8] 0x00000000174ddc59 bin\win64\mcr.dll+00646233 mnShutdownMCR+00017017
[ 9] 0x00007ffa0fd4a9ff C:\Windows\System32\ucrtbase.dll+00436735 raise+00000463
[ 10] 0x00007ffa0fd4b6f1 C:\Windows\System32\ucrtbase.dll+00440049 abort+00000049
[ 11] 0x00007ffa003b469a D:\T_caffe\caffe\caffe-windows\matlab\+caffe\private\glog.dll+00018074 google::Demangle+00008410
[ 12] 0x00007ffa003b9de2 D:\T_caffe\caffe\caffe-windows\matlab\+caffe\private\glog.dll+00040418 google::LogMessage::SendToLog+00000738
[ 13] 0x00007ffa003b7a25 D:\T_caffe\caffe\caffe-windows\matlab\+caffe\private\glog.dll+00031269 google::LogMessage::Flush+00000213
[ 14] 0x00007ffa003b61e2 D:\T_caffe\caffe\caffe-windows\matlab\+caffe\private\glog.dll+00025058 google::LogMessageFatal::~LogMessageFatal+00000018
[ 15] 0x00007ff9c9f5db3a D:\T_caffe\caffe\caffe-windows\matlab\+caffe\private\caffe_.mexw64+00842554 mexFunction+00770010
[ 16] 0x00007ff9c9ea1dba D:\T_caffe\caffe\caffe-windows\matlab\+caffe\private\caffe_.mexw64+00073146 mexFunction+00000602
[ 17] 0x00000000fc60234a bin\win64\libmex.dll+00140106 mexRunMexFile+00000314
[ 18] 0x00000000fc600d22 bin\win64\libmex.dll+00134434 mexFeature_mexver+00002146
[ 19] 0x00000000fc5ffab7 bin\win64\libmex.dll+00129719 mexUnlock+00028455
[ 20] 0x00000000175aca93 bin\win64\pgo\m_dispatcher.dll+00117395 Mfh_file::dispatch_fh_impl+00000835
[ 21] 0x00000000175ac73e bin\win64\pgo\m_dispatcher.dll+00116542 Mfh_file::dispatch_fh+00000062
[ 22] 0x000000001759a8d8 bin\win64\pgo\m_dispatcher.dll+00043224 Mfunction_handle::dispatch+00001032
[ 23] 0x000000001849794e bin\win64\pgo\m_lxe.dll+00227662
[ 24] 0x0000000018494571 bin\win64\pgo\m_lxe.dll+00214385
[ 25] 0x000000001849b3a6 bin\win64\pgo\m_lxe.dll+00242598
[ 26] 0x000000001849bfb3 bin\win64\pgo\m_lxe.dll+00245683
[ 27] 0x000000001849dff5 bin\win64\pgo\m_lxe.dll+00253941
[ 28] 0x000000001849d44f bin\win64\pgo\m_lxe.dll+00250959
[ 29] 0x000000001849d822 bin\win64\pgo\m_lxe.dll+00251938
[ 30] 0x000000001856331b bin\win64\pgo\m_lxe.dll+01061659 boost::serialization::singleton<boost::archive::detail::pointer_oserializer<boost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree> >::get_instance+00604503
[ 31] 0x000000001856ad46 bin\win64\pgo\m_lxe.dll+01092934 boost::serialization::singleton<boost::archive::detail::pointer_oserializer<boost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree> >::get_instance+00635778
[ 32] 0x000000001856a570 bin\win64\pgo\m_lxe.dll+01090928 boost::serialization::singleton<boost::archive::detail::pointer_oserializer<boost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree> >::get_instance+00633772
[ 33] 0x00000000184fa4d6 bin\win64\pgo\m_lxe.dll+00632022 boost::serialization::singleton<boost::archive::detail::pointer_oserializer<boost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree> >::get_instance+00174866
[ 34] 0x00000000184f9ccd bin\win64\pgo\m_lxe.dll+00629965 boost::serialization::singleton<boost::archive::detail::pointer_oserializer<boost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree> >::get_instance+00172809
[ 35] 0x00000000184f9be6 bin\win64\pgo\m_lxe.dll+00629734 boost::serialization::singleton<boost::archive::detail::pointer_oserializer<boost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree> >::get_instance+00172578
[ 36] 0x00000000184f35a5 bin\win64\pgo\m_lxe.dll+00603557 boost::serialization::singleton<boost::archive::detail::pointer_oserializer<boost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree> >::get_instance+00146401
[ 37] 0x00000000184f3532 bin\win64\pgo\m_lxe.dll+00603442 boost::serialization::singleton<boost::archive::detail::pointer_oserializer<boost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree> >::get_instance+00146286
[ 38] 0x00000000184f71d5 bin\win64\pgo\m_lxe.dll+00618965 boost::serialization::singleton<boost::archive::detail::pointer_oserializer<boost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree> >::get_instance+00161809
[ 39] 0x00000000177b5b63 bin\win64\pgo\m_interpreter.dll+00416611 inEvalCmdWithLocalReturn+00000063
[ 40] 0x00000000fb60de26 bin\win64\libmwbridge.dll+00122406 mnParser+00001254
[ 41] 0x000000001747bdb1 bin\win64\mcr.dll+00245169 mcr::runtime::setInterpreterThreadSingletonToCurrent+00029793
[ 42] 0x000000001747ace5
bin\win64\mcr.dll+00240869 mcr::runtime::setInterpreterThreadSingletonToCurrent+00025493
[ 43] 0x000000001747ad53 bin\win64\mcr.dll+00240979 mcr::runtime::setInterpreterThreadSingletonToCurrent+00025603
[ 44] 0x000000001747b6e1 bin\win64\mcr.dll+00243425 mcr::runtime::setInterpreterThreadSingletonToCurrent+00028049
[ 45] 0x00000000fd02cc77 bin\win64\iqm.dll+00642167 iqm::UserEvalPlugin::pre+00028951
[ 46] 0x00000000fd039cfc bin\win64\iqm.dll+00695548 iqm::UserEvalPlugin::pre+00082332
[ 47] 0x00000000fd02737f bin\win64\iqm.dll+00619391 iqm::UserEvalPlugin::pre+00006175
[ 48] 0x00000000fd02cc16 bin\win64\iqm.dll+00642070 iqm::UserEvalPlugin::pre+00028854
[ 49] 0x00000000fd027863 bin\win64\iqm.dll+00620643 iqm::UserEvalPlugin::pre+00007427
[ 50] 0x00000000fd03c8b6 bin\win64\iqm.dll+00706742 iqm::UserEvalPlugin::pre+00093526
[ 51] 0x00000000fd0080f7 bin\win64\iqm.dll+00491767 iqm::PackagedTaskPlugin::PackagedTaskPlugin+00000759
[ 52] 0x00000000fd0088bf bin\win64\iqm.dll+00493759 iqm::PackagedTaskPlugin::execute+00000879
[ 53] 0x00000000fd00817d bin\win64\iqm.dll+00491901 iqm::PackagedTaskPlugin::PackagedTaskPlugin+00000893
[ 54] 0x00000000fd008708 bin\win64\iqm.dll+00493320 iqm::PackagedTaskPlugin::execute+00000440
[ 55] 0x00000000fcfdbd3a bin\win64\iqm.dll+00310586 iqm::Iqm::setupIqmFcnPtrs+00079802
[ 56] 0x00000000fcfdbc06 bin\win64\iqm.dll+00310278 iqm::Iqm::setupIqmFcnPtrs+00079494
[ 57] 0x00000000fcfbf5be bin\win64\iqm.dll+00193982 iqm::Iqm::deliver+00004046
[ 58] 0x00000000fcfc0545 bin\win64\iqm.dll+00197957 iqm::Iqm::deliver+00008021
[ 59] 0x00000001001237c1 bin\win64\libmwservices.dll+01259457
services::system_events::PpeDispatchHook::dispatchOne+00021505
[ 60] 0x0000000100128663
bin\win64\libmwservices.dll+01279587 sysq::addProcessPendingEventsUnitTestHook+00002211
[ 61] 0x0000000100128850 bin\win64\libmwservices.dll+01280080 sysq::addProcessPendingEventsUnitTestHook+00002704
[ 62] 0x0000000100129c26 bin\win64\libmwservices.dll+01285158 sysq::getCondition+00003462
[ 63] 0x000000010012ac66 bin\win64\libmwservices.dll+01289318 svWS_ProcessPendingEvents+00000230
[ 64] 0x000000001747c244 bin\win64\mcr.dll+00246340 mcr::runtime::setInterpreterThreadSingletonToCurrent+00030964
[ 65] 0x000000001747c964 bin\win64\mcr.dll+00248164 mcr::runtime::setInterpreterThreadSingletonToCurrent+00032788
[ 66] 0x0000000017472762 bin\win64\mcr.dll+00206690 mcr_process_events+00008818
[ 67] 0x00000000172e23c5 bin\win64\MVMLocal.dll+00271301 mvm_server::inproc::LocalFactory::terminate+00088005
[ 68] 0x00000000fa957669 bin\win64\mvm.dll+01209961 mvm::detail::initLocalMvmHack+00000569
[ 69] 0x00000000fa957e2b bin\win64\mvm.dll+01211947 mvm::detail::SessionImpl::privateSession+00000555
[ 70] 0x00000000fa958051 bin\win64\mvm.dll+01212497 mvm::detail::SessionImpl::privateSession+00001105
[ 71] 0x0000000140007833 bin\win64\MATLAB.exe+00030771
[ 72] 0x000000014000863f bin\win64\MATLAB.exe+00034367
[ 73] 0x00007ffa10ad1fe4 C:\Windows\System32\KERNEL32.DLL+00073700 BaseThreadInitThunk+00000020
[ 74] 0x00007ffa1348ef91 C:\Windows\SYSTEM32\ntdll.dll+00454545 RtlUserThreadStart+00000033
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
MATLAB crashes due to an unhandled exception in a mex file or compiled code called by a mex file
The error message tells you where the error happened:
This error was detected while a MEX-file was running.
That is, this is not a MATLAB error but a uncaught exception in a mex function (or code called by that mex function, which is usually the case). This is why MATLAB crashes rather than just outputs an error, as it would do for any caught exception. The error trace can help you find the culprit. Look for mexFunction in the stack trace and you will find which mex file is to blame:
[ 16] 0x00007ff9c9ea1dba D:\T_caffe\caffe\caffe-windows\matlab+caffe\private\caffe_.mexw64+00073146 mexFunction+00000602
So the error originates in Caffe's MATLAB interface. Look above this line to find where the exception actually happened. At this point you might be stumped as large traces of unknown libraries are usually impossible to decipher. Your options are now the options of anyone trying to debug a crash. My recommendation:
Find the call to Caffe in MATLAB that is causing the crash. Save your workspace right before the call so you can easily restore it when MATLAB crashes.
See that the crash is reproduced.
Look closely at your inputs and see if you can find something fishy.
If not, find some basic example for running the same function, then gradually work your way from that to your own inputs and see when crashes start happening.
This should help you narrow down what is causing the crash. A different option is to get the source code, build it with debug symbols and debug it by attaching to MATLAB. Depending on your setup, this could be overkill or else lead you into code you don't understand.
You might, on an off-chance, find an actual bug in the software you are using. I don't know how stable Caffe and its MATLAB interface are. However it is best to assume that widely used libraries are more stable than your own code and start your debugging process from there. Good luck!

NetLogo: Issue with Chooser

I'm trying to do a disease simulation where you can choose which disease to simulate. To achieve this, I've added a chooser to the Interface, which is named "disease", with options like smallpox, measles and mumps. It is also accompanied by the following code in the setup:
if disease = smallpox
[
set infection-rate 90
set infectivity 6
set lethality 30
set recovery recovery-rate
set immunity (1 - (1 / infectivity)) * 100
]
if disease = measles
[
set infection-rate 90
set infectivity 15
set lethality 1
set recovery recovery-rate
set immunity (1 - (1 / infectivity)) * 100
]
if disease = mumps
[
set infection-rate 80
set infectivity 6
set lethality 1
set recovery recovery-rate
set immunity (1 - (1 / infectivity)) * 100
]
And the following:
ask turtles with [sick? != true and immune? != true]
[if any? (turtles-on patch-ahead 1) with [sick? = true]
[if (random 100) < infection-rate
[
set sick? true
]
]
]
In the Interface, I've also set up a tracker to track the "infection-rate". However, when I run the program, the infection-rate sits at zero; furthermore, the turtles aren't infecting others. (This isn't an issue, as I've tried my "infection" code with manually set values and it worked.)
Is there something wrong with how I'm coding the "ifs", or rather how I'm trying to work with the variables? Thanks in advance for the help.

Kivy on RaspberryPi (Raspbian) - unable to load any valuable window provider

on my RaspberryPi I am using Python v3.4.3 .
Recently, I (kind of successfully) managed to install Kivy v1.9.1-dev on it by the following shell commands:
sudo echo "deb http://vontaene.de/raspbian-updates/ . main" > /etc/apt/sources.list.d/gstreamer.list
sudo apt-get install pkg-config libgl1-mesa-dev libgles2-mesa-dev python-pygame python-setuptools libgstreamer1.0-dev git-core gstreamer1.0-plugins-{bad,base,good,ugly} gstreamer1.0-{omx,alsa} python-dev
sudo pip3.4 install cython
...
cd ~
git clone https://github.com/kivy/kivy
cd kivy
python3.4 setup.py build
sudo python3.4 setup.py install
The installation took quite some hours, but in the end, I had the impression that it went well.
I change the Pi to desktop mode (startx), open a shell and when I try to start the example "shader", I get the following output:
pi#RaspberryPi-02 ~/tools/language__python/FRM__kivy/examples/shader $ python3.4 plasma.py
[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_15-06-08_4.txt
[INFO ] [Kivy ] v1.9.1-dev
[INFO ] [Python ] v3.4.3 (default, Mar 6 2015, 11:48:01)
[GCC 4.6.3]
[INFO ] [Factory ] 175 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_gif (img_pygame, img_pil, img_ffpyplayer ignored)
[INFO ] [Window ] Provider: egl_rpi
[INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0'>
[INFO ] [GL ] OpenGL vendor <b'Broadcom'>
[INFO ] [GL ] OpenGL renderer <b'VideoCore IV HW'>
[INFO ] [GL ] OpenGL parsed version: 2, 0
[INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'>
[INFO ] [GL ] Texture max size <2048>
[INFO ] [GL ] Texture max units <8>
[INFO ] [Shader ] fragment shader: <b'Compiled'>
[INFO ] [Shader ] vertex shader: <b'Compiled'>
[CRITICAL] [Window ] Unable to find any valuable Window provider at all!
egl_rpi - Exception: Unknown <png> type, no loader found.
File "/usr/local/lib/python3.4/site-packages/kivy/core/__init__.py", line 65, in core_select_lib
cls = cls()
File "/usr/local/lib/python3.4/site-packages/kivy/core/window/__init__.py", line 625, in __init__
self.create_window()
File "/usr/local/lib/python3.4/site-packages/kivy/core/window/window_egl_rpi.py", line 26, in create_window
super(WindowEglRpi, self).create_window()
File "/usr/local/lib/python3.4/site-packages/kivy/core/window/__init__.py", line 783, in create_window
self.render_context = RenderContext()
File "kivy/graphics/instructions.pyx", line 756, in kivy.graphics.instructions.RenderContext.__init__ (kivy/graphics/instructions.c:10394)
File "/usr/local/lib/python3.4/site-packages/kivy/core/image/__init__.py", line 511, in __init__
self.filename = arg
File "/usr/local/lib/python3.4/site-packages/kivy/core/image/__init__.py", line 699, in _set_filename
mipmap=self._mipmap, nocache=self._nocache)
File "/usr/local/lib/python3.4/site-packages/kivy/core/image/__init__.py", line 432, in load
raise Exception('Unknown <%s> type, no loader found.' % ext)
pygame - ImportError: No module named 'pygame'
File "/usr/local/lib/python3.4/site-packages/kivy/core/__init__.py", line 57, in core_select_lib
fromlist=[modulename], level=0)
File "/usr/local/lib/python3.4/site-packages/kivy/core/window/window_pygame.py", line 8, in <module>
import pygame
x11 - ImportError: No module named 'kivy.core.window.window_x11'
File "/usr/local/lib/python3.4/site-packages/kivy/core/__init__.py", line 57, in core_select_lib
fromlist=[modulename], level=0)
Traceback (most recent call last):
File "plasma.py", line 92, in <module>
PlasmaApp().run()
File "/usr/local/lib/python3.4/site-packages/kivy/app.py", line 798, in run
root = self.build()
File "plasma.py", line 89, in build
return ShaderWidget(fs=plasma_shader)
File "plasma.py", line 62, in __init__
self.canvas = RenderContext()
File "kivy/graphics/instructions.pyx", line 756, in kivy.graphics.instructions.RenderContext.__init__ (kivy/graphics/instructions.c:10394)
File "/usr/local/lib/python3.4/site-packages/kivy/core/image/__init__.py", line 511, in __init__
self.filename = arg
File "/usr/local/lib/python3.4/site-packages/kivy/core/image/__init__.py", line 699, in _set_filename
mipmap=self._mipmap, nocache=self._nocache)
File "/usr/local/lib/python3.4/site-packages/kivy/core/image/__init__.py", line 432, in load
raise Exception('Unknown <%s> type, no loader found.' % ext)
Exception: Unknown <png> type, no loader found.
Does anybody see what I did wrong or could anybody help me find ways to get Kivy running on my Pi?
Thanks.
nnako
Kivy needs a library to load png files.
The line [INFO ] [Image ] Providers: img_tex, img_dds, img_gif (img_pygame, img_pil, img_ffpyplayer ignored) tells you what it can load (tex, dds, gif), and what was ignored.
In python, the 'official' library to load, save and manipulate images is PIL.
You need to install PIL, or a more recent fork of it : pillow.
Then restart your example, and it should be fine.

Matlab R2012a crashes when trying 3D-graphics on Ubuntu 12.10

I'm having problems with my 3D-plotting on Ubuntu 12.10. The crash occurs immeadiately after I try to plot data in 3D. I have Crash dump and other error report here:
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/nouveau_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so
libGL error: dlopen /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so failed (/home/jonne/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so))
libGL: OpenDriver: trying ${ORIGIN}/dri/tls/nouveau_dri.so
libGL: OpenDriver: trying ${ORIGIN}/dri/nouveau_dri.so
libGL error: dlopen ${ORIGIN}/dri/nouveau_dri.so failed (${ORIGIN}/dri/nouveau_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/lib/dri/tls/nouveau_dri.so
libGL: OpenDriver: trying /usr/lib/dri/nouveau_dri.so
libGL error: dlopen /usr/lib/dri/nouveau_dri.so failed (/usr/lib/dri/nouveau_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL error: dlopen /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so failed (/home/jonne/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/lib/x86_64-linux-gnu/libLLVM-3.1.so.1))
libGL: OpenDriver: trying ${ORIGIN}/dri/tls/swrast_dri.so
libGL: OpenDriver: trying ${ORIGIN}/dri/swrast_dri.so
libGL error: dlopen ${ORIGIN}/dri/swrast_dri.so failed (${ORIGIN}/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/lib/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
libGL error: dlopen /usr/lib/dri/swrast_dri.so failed (/usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
CRASH DUMP:
------------------------------------------------------------------------
Segmentation violation detected at Wed Dec 19 02:17:00 2012
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled
Current Visual : 0x21 (class 4, depth 24)
Default Encoding: UTF-8
GNU C Library : 2.15 stable
MATLAB Root : /home/jonne/MATLAB/R2012a
MATLAB Version : 7.14.0.739 (R2012a)
Operating System: Linux 3.5.0-19-generic #30-Ubuntu SMP Tue Nov 13 17:48:01 UTC 2012 x86_64
Processor ID : x86 Family 31 Model 6 Stepping 2, AuthenticAMD
Virtual Machine : Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : The X.Org Foundation (11300000), display :0.0
Fault Count: 1
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 0000000000000000 RBX = 0000000000000000
RCX = 0000000000000000 RDX = 00007fb9ac068658
RSP = 00007fb9bb8e38e8 RBP = 00000000009a0005
RSI = 0000000000000000 RDI = 0000000000000000
R8 = 00007fb9ac068680 R9 = 0000000000000000
R10 = 0000000000000000 R11 = 0000000000000000
R12 = 0000000000001f02 R13 = 0000000000000000
R14 = 00007fb9c6b797d0 R15 = 0000000000000000
RIP = 00007fb973df6d00 EFL = 0000000000010206
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007fb9d09f592e /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwfl.so+00370990 _ZN2fl4diag15stacktrace_base7captureERKNS0_14thread_contextEm+000158
[ 1] 0x00007fb9d09f87d0 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwfl.so+00382928
[ 2] 0x00007fb9d09f8b3b /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwfl.so+00383803 _ZN2fl4diag13terminate_logEPKcRKNS0_14thread_contextE+000171
[ 3] 0x00007fb9cf8dc203 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01253891 _ZN2fl4diag13terminate_logEPKcPK8ucontext+000067
[ 4] 0x00007fb9cf8d90fd /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01241341
[ 5] 0x00007fb9cf8da79d /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01247133
[ 6] 0x00007fb9cf8da925 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01247525
[ 7] 0x00007fb9cf8daf01 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01249025
[ 8] 0x00007fb9cf8db3f5 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01250293
[ 9] 0x00007fb9cdfa2cb0 /lib/x86_64-linux-gnu/libpthread.so.0+00064688
[ 10] 0x00007fb973df6d00 /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0+00056576 xcb_glx_get_string_string_length+000000
[ 11] 0x00007fb97c98a6b4 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1+00272052 __glXGetString+000068
[ 12] 0x00007fb97c98812e /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1+00262446
[ 13] 0x00007fb97cbbf379 /home/jonne/MATLAB/R2012a/bin/glnxa64/glren.so+00078713
[ 14] 0x00007fb97cbb6b40 /home/jonne/MATLAB/R2012a/bin/glnxa64/glren.so+00043840
[ 15] 0x00007fb97cbb6cc6 /home/jonne/MATLAB/R2012a/bin/glnxa64/glren.so+00044230
[ 16] 0x00007fb9c68d30a8 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwhg.so+09408680 _Z22OpenGLSetupEnumstrOnceb+000296
[ 17] 0x00007fb9c6827ac7 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwhg.so+08706759 gf_DetermineBestRenderMode+000183
[ 18] 0x00007fb9c6827c0b /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwhg.so+08707083 _Z22gf_DetermineRenderModeP11GObject_tagi+000107
[ 19] 0x00007fb9c6827d0a /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwhg.so+08707338 InitializeFigureRenderEngine+000074
[ 20] 0x00007fb9c6828114 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwhg.so+08708372
[ 21] 0x00007fb9c689418c /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwhg.so+09150860
[ 22] 0x00007fb9c684a89b /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwhg.so+08849563 _Z24commitHG1DatabaseUpdatesb+000235
[ 23] 0x00007fb9d0157e16 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwservices.so+01359382 _Z26svWS_CommitDatabaseUpdates28svCommitDatabaseUpdatesType_+000390
[ 24] 0x00007fb9c5030387 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwuix.so+00525191
[ 25] 0x00007fb9c5030691 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwuix.so+00525969
[ 26] 0x00007fb9cfb476eb /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwbridge.so+00124651
[ 27] 0x00007fb9cfb47cde /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwbridge.so+00126174 _Z10ioReadLinebP8_IO_FILEPcS1_iPbRKN5boost8optionalIKP15inWorkSpace_tagEEb+000990
[ 28] 0x00007fb9cfb48165 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwbridge.so+00127333
[ 29] 0x00007fb9cfb4cd0a /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwbridge.so+00146698
[ 30] 0x00007fb9cfb4d165 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwbridge.so+00147813
[ 31] 0x00007fb9cfb4d9ce /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwbridge.so+00149966 mnParser+000702
[ 32] 0x00007fb9cf8c0de2 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01142242 _ZN11mcrInstance30mnParser_on_interpreter_threadEv+000034
[ 33] 0x00007fb9cf8a351a /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01021210
[ 34] 0x00007fb9cf8a3598 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01021336
[ 35] 0x00007fb9c5021376 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwuix.so+00463734
[ 36] 0x00007fb9c502b862 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwuix.so+00505954
[ 37] 0x00007fb9d01599a1 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwservices.so+01366433 _ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPN5boost8weak_ptrIN4sysq10ws_ppeHookEEESt6vectorIS6_SaIS6_EEEENS4_8during_FIS6_NS2_10shared_ptrIS5_EEEEET0_T_SH_SG_+000081
[ 38] 0x00007fb9d015aaab /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwservices.so+01370795
[ 39] 0x00007fb9d01585f9 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwservices.so+01361401 _Z25svWS_ProcessPendingEventsiib+000665
[ 40] 0x00007fb9cf8a276f /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01017711
[ 41] 0x00007fb9cf8a2c3b /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01018939
[ 42] 0x00007fb9cf8a2d97 /home/jonne/MATLAB/R2012a/bin/glnxa64/libmwmcr.so+01019287
[ 43] 0x00007fb9cdf9ae9a /lib/x86_64-linux-gnu/libpthread.so.0+00032410
[ 44] 0x00007fb9cdcc7cbd /lib/x86_64-linux-gnu/libc.so.6+00998589 clone+000109
Does anyone have any idea what should I do to get this work? 2D-plotting works, but 3D-does not...
Thank you!
What renderer are you using? Could you post a code snippet of your script?
Try creating the figure first, a specifying the renderer. For example,
figure('renderer','zbuffer')
I've had more luck with the zbuffer renderer than opengl or painters for example. In fact, in my startup script I've ensured every figure window that I open uses zbuffer - I've found it is much quicker to render, and has less problems with random crashes.
See: http://www.mathworks.com.au/help/matlab/ref/figure_props.html
Renderer
painters | zbuffer | OpenGL
Rendering method used for screen and printing. Selects the method used to render MATLAB graphics. The choices are:
painters — The original rendering method used by MATLAB is faster when the figure contains only simple or small graphics objects.
zbuffer — MATLAB draws graphics objects faster and more accurately because it colors objects on a per-pixel basis and MATLAB renders only those pixels that are visible in the scene (thus eliminating front-to-back sorting errors). Note that this method can consume a lot of system memory if MATLAB is displaying a complex scene.
OpenGL — OpenGL is a renderer that is available on many computer systems. This renderer is generally faster than painters or zbuffer and in some cases enables MATLAB to access graphics hardware that is available on some systems.
This helped me:
https://bbs.archlinux.org/viewtopic.php?id=154775
(...which got help from How to tell mex to link with the libstdc++.so.6 in /usr/lib instead of the one in the MATLAB directory?)
basically I just did this:
sudo mv /usr/local/MATLAB/R2012a/sys/os/glnx86/libstdc++.so.6 /usr/local/MATLAB/R2012a/sys/os/glnx86/libstdc++.so.6__bck
and
sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17 /usr/local/MATLAB/R2012a/sys/os/glnx86/libstdc++.so.6