Kivy: Fallo de segmentación en Raspberry 3B +

Creado en 22 oct. 2018  ·  44Comentarios  ·  Fuente: kivy/kivy

Versiones

Descripción

Estoy intentando ejecutar la demostración app_with_kv.py pero siempre muestra un error segmentation fault . Estoy usando la pantalla TFT desde aquí .

Código y registros

[INFO   ] [Logger      ] Record log in /home/pi/.kivy/logs/kivy_18-10-22_12.txt
[INFO   ] [Kivy        ] v1.11.0.dev0, git-916b77b, 20181022
[INFO   ] [Python      ] v3.5.3 (default, Sep 27 2018, 17:25:39) 
[GCC 6.3.0 20170516]
[INFO   ] [Factory     ] 184 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [Window      ] Provider: egl_rpi
[INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
Segmentation fault
RPi High SDL2 Confirmed

Comentario más útil

Tuve un problema similar con él. Por alguna razón, se llama sdl2 lugar de gl para Backend. No sé si hay una solución permanente para esto, pero después de un tiempo tratando de encontrar una solución, la única solución que se me ocurrió es agregar 2 líneas en la parte superior de su aplicación, antes de importar Kivy. Debería verse así:

import os
os.environ['KIVY_GL_BACKEND'] = 'gl'
import kivy

Espero que te ayude. ¡Buena suerte!

Ps Si desea ejecutar su aplicación en Windows, es posible que desee comentar os.environ['KIVY_GL_BACKEND'] = 'gl' contrario, no se ejecutará.

Todos 44 comentarios

Tuve un problema similar con él. Por alguna razón, se llama sdl2 lugar de gl para Backend. No sé si hay una solución permanente para esto, pero después de un tiempo tratando de encontrar una solución, la única solución que se me ocurrió es agregar 2 líneas en la parte superior de su aplicación, antes de importar Kivy. Debería verse así:

import os
os.environ['KIVY_GL_BACKEND'] = 'gl'
import kivy

Espero que te ayude. ¡Buena suerte!

Ps Si desea ejecutar su aplicación en Windows, es posible que desee comentar os.environ['KIVY_GL_BACKEND'] = 'gl' contrario, no se ejecutará.

Recibo el mismo error en el Zero W. La sugerencia de @goadik arregló el 3B + para mí, todavía no he probado el Zero.

¡También confirmo que la solución de @goadik funciona! Y también señalo que como es un problema de variable de entorno, simplemente puede exportar la variable de la siguiente manera:

export KIVY_GL_BACKEND=gl

Y luego ejecuta el script.

SDL2 se utiliza para buscar dinámicamente el símbolo.
Sería bueno tener un seguimiento para comprender y solucionar el problema.
El cambio al backend GL para rpi podría implementarse dependiendo de la plataforma, pero prefiero solucionar el problema subyacente.

Utilice gdb --args python main.py , escriba r , luego, cuando se bloquee, haga bt all . Publica todas las cosas.

Bueno. Esta es la salida para gdb --args python main.py :

GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python3...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/python3 main.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[INFO   ] [Logger      ] Record log in /home/pi/.kivy/logs/kivy_18-10-27_0.txt
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO   ] [Kivy        ] v1.11.0.dev0, git-916b77b, 20181022
[INFO   ] [Python      ] v3.5.3 (default, Sep 27 2018, 17:25:39) 
[GCC 6.3.0 20170516]
[INFO   ] [Factory     ] 184 symbols loaded
[DEBUG  ] [App         ] Loading kv <./main.kv>
[DEBUG  ] [App         ] kv <./main.kv> not found
[INFO   ] [Window      ] Provider: egl_rpi
[New Thread 0x74758470 (LWP 973)]
[New Thread 0x73dff470 (LWP 974)]
[New Thread 0x735ff470 (LWP 975)]
[New Thread 0x72dff470 (LWP 976)]
[DEBUG  ] [Window      ] Actual display size: 800x480
[INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
[DEBUG  ] [GL          ] glActiveTexture is not available
[DEBUG  ] [GL          ] glAttachShader is not available
[DEBUG  ] [GL          ] glBindAttribLocation is not available
[DEBUG  ] [GL          ] glBindBuffer is not available
[DEBUG  ] [GL          ] glBindFramebuffer is not available
[DEBUG  ] [GL          ] glBindRenderbuffer is not available
[DEBUG  ] [GL          ] glBindTexture is not available
[DEBUG  ] [GL          ] glBlendColor is not available
[DEBUG  ] [GL          ] glBlendEquation is not available
[DEBUG  ] [GL          ] glBlendEquationSeparate is not available
[DEBUG  ] [GL          ] glBlendFunc is not available
[DEBUG  ] [GL          ] glBlendFuncSeparate is not available
[DEBUG  ] [GL          ] glBufferData is not available
[DEBUG  ] [GL          ] glBufferSubData is not available
[DEBUG  ] [GL          ] glCheckFramebufferStatus is not available
[DEBUG  ] [GL          ] glClear is not available
[DEBUG  ] [GL          ] glClearColor is not available
[DEBUG  ] [GL          ] glClearStencil is not available
[DEBUG  ] [GL          ] glColorMask is not available
[DEBUG  ] [GL          ] glCompileShader is not available
[DEBUG  ] [GL          ] glCompressedTexImage2D is not available
[DEBUG  ] [GL          ] glCompressedTexSubImage2D is not available
[DEBUG  ] [GL          ] glCopyTexImage2D is not available
[DEBUG  ] [GL          ] glCopyTexSubImage2D is not available
[DEBUG  ] [GL          ] glCreateProgram is not available
[DEBUG  ] [GL          ] glCreateShader is not available
[DEBUG  ] [GL          ] glCullFace is not available
[DEBUG  ] [GL          ] glDeleteBuffers is not available
[DEBUG  ] [GL          ] glDeleteFramebuffers is not available
[DEBUG  ] [GL          ] glDeleteProgram is not available
[DEBUG  ] [GL          ] glDeleteRenderbuffers is not available
[DEBUG  ] [GL          ] glDeleteShader is not available
[DEBUG  ] [GL          ] glDeleteTextures is not available
[DEBUG  ] [GL          ] glDepthFunc is not available
[DEBUG  ] [GL          ] glDepthMask is not available
[DEBUG  ] [GL          ] glDetachShader is not available
[DEBUG  ] [GL          ] glDisable is not available
[DEBUG  ] [GL          ] glDisableVertexAttribArray is not available
[DEBUG  ] [GL          ] glDrawArrays is not available
[DEBUG  ] [GL          ] glDrawElements is not available
[DEBUG  ] [GL          ] glEnable is not available
[DEBUG  ] [GL          ] glEnableVertexAttribArray is not available
[DEBUG  ] [GL          ] glFinish is not available
[DEBUG  ] [GL          ] glFlush is not available
[DEBUG  ] [GL          ] glFramebufferRenderbuffer is not available
[DEBUG  ] [GL          ] glFramebufferTexture2D is not available
[DEBUG  ] [GL          ] glFrontFace is not available
[DEBUG  ] [GL          ] glGenBuffers is not available
[DEBUG  ] [GL          ] glGenerateMipmap is not available
[DEBUG  ] [GL          ] glGenFramebuffers is not available
[DEBUG  ] [GL          ] glGenRenderbuffers is not available
[DEBUG  ] [GL          ] glGenTextures is not available
[DEBUG  ] [GL          ] glGetActiveAttrib is not available
[DEBUG  ] [GL          ] glGetActiveUniform is not available
[DEBUG  ] [GL          ] glGetAttachedShaders is not available
[DEBUG  ] [GL          ] glGetAttribLocation is not available
[DEBUG  ] [GL          ] glGetBooleanv is not available
[DEBUG  ] [GL          ] glGetBufferParameteriv is not available
[DEBUG  ] [GL          ] glGetError is not available
[DEBUG  ] [GL          ] glGetFloatv is not available
[DEBUG  ] [GL          ] glGetFramebufferAttachmentParameteriv is not available
[DEBUG  ] [GL          ] glGetIntegerv is not available
[DEBUG  ] [GL          ] glGetProgramInfoLog is not available
[DEBUG  ] [GL          ] glGetProgramiv is not available
[DEBUG  ] [GL          ] glGetRenderbufferParameteriv is not available
[DEBUG  ] [GL          ] glGetShaderInfoLog is not available
[DEBUG  ] [GL          ] glGetShaderiv is not available
[DEBUG  ] [GL          ] glGetShaderSource is not available
[DEBUG  ] [GL          ] glGetString is not available
[DEBUG  ] [GL          ] glGetTexParameterfv is not available
[DEBUG  ] [GL          ] glGetTexParameteriv is not available
[DEBUG  ] [GL          ] glGetUniformfv is not available
[DEBUG  ] [GL          ] glGetUniformiv is not available
[DEBUG  ] [GL          ] glGetUniformLocation is not available
[DEBUG  ] [GL          ] glGetVertexAttribfv is not available
[DEBUG  ] [GL          ] glGetVertexAttribiv is not available
[DEBUG  ] [GL          ] glHint is not available
[DEBUG  ] [GL          ] glIsBuffer is not available
[DEBUG  ] [GL          ] glIsEnabled is not available
[DEBUG  ] [GL          ] glIsFramebuffer is not available
[DEBUG  ] [GL          ] glIsProgram is not available
[DEBUG  ] [GL          ] glIsRenderbuffer is not available
[DEBUG  ] [GL          ] glIsShader is not available
[DEBUG  ] [GL          ] glIsTexture is not available
[DEBUG  ] [GL          ] glLineWidth is not available
[DEBUG  ] [GL          ] glLinkProgram is not available
[DEBUG  ] [GL          ] glPixelStorei is not available
[DEBUG  ] [GL          ] glPolygonOffset is not available
[DEBUG  ] [GL          ] glReadPixels is not available
[DEBUG  ] [GL          ] glRenderbufferStorage is not available
[DEBUG  ] [GL          ] glSampleCoverage is not available
[DEBUG  ] [GL          ] glScissor is not available
[DEBUG  ] [GL          ] glShaderBinary is not available
[DEBUG  ] [GL          ] glShaderSource is not available
[DEBUG  ] [GL          ] glStencilFunc is not available
[DEBUG  ] [GL          ] glStencilFuncSeparate is not available
[DEBUG  ] [GL          ] glStencilMask is not available
[DEBUG  ] [GL          ] glStencilMaskSeparate is not available
[DEBUG  ] [GL          ] glStencilOp is not available
[DEBUG  ] [GL          ] glStencilOpSeparate is not available
[DEBUG  ] [GL          ] glTexImage2D is not available
[DEBUG  ] [GL          ] glTexParameterf is not available
[DEBUG  ] [GL          ] glTexParameteri is not available
[DEBUG  ] [GL          ] glTexSubImage2D is not available
[DEBUG  ] [GL          ] glUniform1f is not available
[DEBUG  ] [GL          ] glUniform1fv is not available
[DEBUG  ] [GL          ] glUniform1i is not available
[DEBUG  ] [GL          ] glUniform1iv is not available
[DEBUG  ] [GL          ] glUniform2f is not available
[DEBUG  ] [GL          ] glUniform2fv is not available
[DEBUG  ] [GL          ] glUniform2i is not available
[DEBUG  ] [GL          ] glUniform2iv is not available
[DEBUG  ] [GL          ] glUniform3f is not available
[DEBUG  ] [GL          ] glUniform3fv is not available
[DEBUG  ] [GL          ] glUniform3i is not available
[DEBUG  ] [GL          ] glUniform3iv is not available
[DEBUG  ] [GL          ] glUniform4f is not available
[DEBUG  ] [GL          ] glUniform4fv is not available
[DEBUG  ] [GL          ] glUniform4i is not available
[DEBUG  ] [GL          ] glUniform4iv is not available
[DEBUG  ] [GL          ] glUniformMatrix4fv is not available
[DEBUG  ] [GL          ] glUseProgram is not available
[DEBUG  ] [GL          ] glValidateProgram is not available
[DEBUG  ] [GL          ] glVertexAttrib1f is not available
[DEBUG  ] [GL          ] glVertexAttrib2f is not available
[DEBUG  ] [GL          ] glVertexAttrib3f is not available
[DEBUG  ] [GL          ] glVertexAttrib4f is not available
[DEBUG  ] [GL          ] glVertexAttribPointer is not available
[DEBUG  ] [GL          ] glViewport is not available
[INFO   ] [GL          ] Backend used <sdl2>

Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()

Además, como bt all ha arrojado un "Sin símbolo" todo "en el contexto actual". mensaje, tengo la salida de thread apply all bt , que es la siguiente:

Thread 5 (Thread 0x72dff470 (LWP 976)):
#0  0x76f88014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, 
    expected=1, futex_word=0x748885ec <cecservice_notify_available_event+24>)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x748885ec <cecservice_notify_available_event+24>, 
    abstime=0x0) at sem_waitcommon.c:115
#2  0x76f88158 in __new_sem_wait_slow (
    sem=0x748885ec <cecservice_notify_available_event+24>, abstime=0x0)
    at sem_waitcommon.c:282
#3  0x7486ec44 in cecservice_notify_func () from /opt/vc/lib/libbcm_host.so
#4  0x747d7cc4 in vcos_thread_entry (arg=0x74888600 <cecservice_notify_task>)
    at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144
#5  0x76f7efc4 in start_thread (arg=0x72dff470) at pthread_create.c:335
#6  0x76e0cbc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76
   from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 4 (Thread 0x735ff470 (LWP 975)):
#0  0x76f88014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, 
    expected=1, futex_word=0x74887864 <tvservice_notify_available_event+24>)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x74887864 <tvservice_notify_available_event+24>, 
    abstime=0x0) at sem_waitcommon.c:115
#2  0x76f88158 in __new_sem_wait_slow (
    sem=0x74887864 <tvservice_notify_available_event+24>, abstime=0x0)
---Type <return> to continue, or q <return> to quit---
    at sem_waitcommon.c:282
#3  0x7486e084 in tvservice_notify_func () from /opt/vc/lib/libbcm_host.so
#4  0x747d7cc4 in vcos_thread_entry (arg=0x74887878 <tvservice_notify_task>)
    at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144
#5  0x76f7efc4 in start_thread (arg=0x735ff470) at pthread_create.c:335
#6  0x76e0cbc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76
   from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0x73dff470 (LWP 974)):
#0  0x76f88014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, 
    expected=1, futex_word=0x748886e8 <dispmanx_notify_available_event+24>)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x748886e8 <dispmanx_notify_available_event+24>, 
    abstime=0x0) at sem_waitcommon.c:115
#2  0x76f88158 in __new_sem_wait_slow (
    sem=0x748886e8 <dispmanx_notify_available_event+24>, abstime=0x0)
    at sem_waitcommon.c:282
#3  0x74872150 in dispmanx_notify_func () from /opt/vc/lib/libbcm_host.so
#4  0x747d7cc4 in vcos_thread_entry (arg=0x74889428 <dispmanx_notify_task>)
    at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144
#5  0x76f7efc4 in start_thread (arg=0x73dff470) at pthread_create.c:335
#6  0x76e0cbc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76
   from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
---Type <return> to continue, or q <return> to quit---

Thread 2 (Thread 0x74758470 (LWP 973)):
#0  0x76e0580c in ioctl () at ../sysdeps/unix/syscall-template.S:84
#1  0x747f1010 in completion_thread () from /opt/vc/lib/libvchiq_arm.so
#2  0x747d7cc4 in vcos_thread_entry (arg=0x74804318 <vchiq_instance+16>)
    at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144
#3  0x76f7efc4 in start_thread (arg=0x74758470) at pthread_create.c:335
#4  0x76e0cbc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76
   from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x76ff7010 (LWP 967)):
#0  0x00000000 in ?? ()

#1  0x74bb28d0 in __pyx_pf_4kivy_8graphics_6opengl_138glGetString (
    __pyx_self=<optimized out>, __pyx_v_name=<optimized out>)
    at /tmp/pip-bp1kpwjd-build/kivy/graphics/opengl.c:12436
#2  __pyx_pw_4kivy_8graphics_6opengl_139glGetString (__pyx_self=<optimized out>, 
    __pyx_arg_name=<optimized out>)
    at /tmp/pip-bp1kpwjd-build/kivy/graphics/opengl.c:12415
#3  0x000b1df8 in PyEval_EvalFrameEx ()
#4  0x000b1a7c in PyEval_EvalFrameEx ()
#5  0x000b1a7c in PyEval_EvalFrameEx ()
#6  0x001985c8 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

OK, parece que SDL_GL_GetProcAddress no puede encontrar nada :( Lo entiendo ahora.
Nuestro método para detectar y cargar opengl está vinculado al proveedor de Windows utilizado.
Pero en este caso, se usa egl_rpi , no SDL2, por lo que la función SDL2 no funcionará.

Requiere una solución, ¡gracias por informar!

No estoy seguro de si es relevante agregarlo aquí, pero creo que tiene algo que ver con la nueva versión de Raspbian. Probé el más viejo (tengo una imagen) y funcionó a las mil maravillas.

El problema con la falla de segmentación al iniciar la aplicación se puede solucionar con una variable de entorno, pero también, se bloquea con la misma falla de segmentación cada vez que cargo el gráfico con muchos datos para mostrar.

El problema con GDB es que si trato de usarlo así gdb --args python main.py y replicar el bloqueo, el RPI simplemente se congela y lo único que queda por hacer en este punto es reiniciarlo. Cuando reviso los registros, están vacíos.

Quería agregarlo aquí.

Tuve el mismo problema y, como dijo @goadik , podría ser un error de la nueva versión de raspbian porque en mi imagen anterior (Raspberry3, kivy v1.11.0.dev0, python v3.4.2) la aplicación kivy está funcionando bien. Mi problema se describe aquí: https://stackoverflow.com/questions/53122908/kivy-opengl-segmentation-fault-on-raspberry

@krrrambambuli

en mi imagen anterior (Raspberry3, kivy v1.11.0.dev0, python v3.4.2) la aplicación kivy está funcionando bien

Entonces, ¿por qué no usas la imagen anterior?

Los desarrolladores de RPi son conocidos por lanzar nuevas "actualizaciones" que están rompiendo todo tipo de cosas. He tenido una experiencia tan desagradable con estos que he desactivado por completo todas las actualizaciones relacionadas con el sistema operativo que provienen de RPi org.

@ E3V3A

Entonces, ¿por qué no usas la imagen anterior?

Porque tenía un RPI que ya estaba configurado con la última actualización de raspbian. Y me preguntaba por qué kivy no se está ejecutando aunque yo estaba haciendo exactamente las mismas cosas que antes. ¡Ahora cambié a la imagen anterior y está funcionando bien!

A partir de ahora me ocuparé de las actualizaciones apresuradas;)

Quizás no tenga ninguna relación, pero a menos que me equivoque: Kivy depende de SDL2 y SDL2 depende de cffi y / o Cairo, y cffi es difícil de construir independientemente de la arquitectura. Pero me encontré con el siguiente paquete de pip, ¿quizás intentarlo?

# pip3 search cairocffi 
cairotft (0.1.2)   - UI library for small tft screens using cairocffi

@ E3V3A
Ya cambié a la imagen anterior. Tal vez sea bueno saberlo para el futuro

¿Puedo preguntarte qué imagen estás usando y dónde puedo encontrarla? Estoy usando Rpi 3 B + y kivy 1.11.0.dev0, ¿qué imagen debo usar?

@ E3V3A
Ya cambié a la imagen anterior. Tal vez sea bueno saberlo para el futuro

Estoy usando raspbian jessie, la última vez que actualicé el 11-6-18 sin actualizaciones. Rpi3, Kivy v1.10.1 y Python 3.4.2
Mi registro:

[INFO] Logger: registro de inicio de sesión /home/pi/.kivy/logs/kivy_18-11-14_11.txt
[INFORMACIÓN] Kivy: v1.10.1
[INFO] Python: v3.4.2 (predeterminado, 19 de octubre de 2014, 13:31:11)
[CGC 4.9.1]
[INFO] KivyMD: Versión de KivyMD: 0.1.2
[INFO] Fábrica: 194 símbolos cargados
[INFO] Imagen: Proveedores: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignorado)
[INFO] Ventana: Proveedor: egl_rpi
[INFO] GL: Uso del sistema de gráficos "OpenGL ES 2"
[INFO] GL: Backend usado
[INFO] GL: versión OpenGL [INFO] GL: proveedor de OpenGL [INFO] GL: renderizador OpenGL
[INFO] GL: Versión analizada de OpenGL: 2, 0
[INFO] GL: versión sombreada
[INFO] GL: Tamaño máximo de textura <2048>
[INFO] GL: Unidades máximas de textura <8>
[INFO] Ventana: teclado virtual permitido, modo multiusuario, no acoplado
[INFO] Texto: Proveedor: sdl2
[INFO] GL: El soporte de textura NPOT está disponible
[INFO] Portapapeles: Proveedor: xclip
[INFO] CutBuffer: compatibilidad con cortar búfer habilitada
[INFO] ProbeSysfs: coincidencia de dispositivo: / dev / input / event0
...

Gracias, tuve el mismo problema.
exportar KIVY_GL_BACKEND = gl
arreglado.

tiene exactamente el mismo problema en raspberry pi 3b + ... ¿es posible instalar kivy en el núcleo de Ubuntu o cualquier otro sistema operativo compatible con raspberry pi 3b +?

también qué imagen de Raspbian debería usar en raspberry pi 3b + para que kivy funcione

este problema no está solucionado
usingimport os
os.environ ['KIVY_GL_BACKEND'] = 'gl'
importar kivy
es solo una solución temporal

Aún no se ha mencionado en este hilo, pero podría ser pertinente si alguien tiene la versión Lite o PIXEL de Raspbian.

screen shot 2018-12-17 at 8 34 11 am

sdl2 incluye una dependencia de X windows y Raspbian Lite obviamente no incluye esto.

Puedo confirmar que furtivamente ...

import os
os.environ['KIVY_GL_BACKEND'] = 'gl'

... en la parte superior de mi secuencia de comandos de Python hace que la aplicación "Hello, Button" funcione. Estoy en la versión Stretch Lite.

¿Qué versión de raspbian debería usar para no tener este problema?
Traté de actualizar mi sistema operativo a Raspbian Jessie 8.0 pero tengo la misma falla seg ...

¿Qué versión de raspbian debería usar para no tener este problema?
Traté de actualizar mi sistema operativo a Raspbian Jessie 8.0 pero tengo la misma falla seg ...

El mismo problema aquí con una frambuesa pi 3b +:

Programa de inicio: / usr / bin / python3 /home/pi/sorbito/main.py
[Depuración de subprocesos con libthread_db habilitada]
Usando la biblioteca libthread_db del host "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[INFO] [Logger] Registro de inicio de sesión /home/pi/.kivy/logs/kivy_19-02-13_3.txt
[INFO] [Kivy] v1.11.0.dev0, git-233cdd1, 20190212
[INFO] [Python] v3.5.3 (predeterminado, 27 de septiembre de 2018, 17:25:39)
[CGC 6.3.0 20170516]
[INFO] [Fábrica] 184 símbolos cargados
[INFO] [Imagen] Proveedores: img_tex, img_dds, img_pil, img_gif (img_sdl2, img_ffpyplayer ignorado)
[INFO] Proveedor de [texto]: sdl2
[INFO] [Ventana] Proveedor: egl_rpi
[Nuevo hilo 0x747ff470 (LWP 2420)]
[Nuevo hilo 0x73dff470 (LWP 2421)]
[Nuevo hilo 0x735ff470 (LWP 2422)]
[Nuevo hilo 0x72dff470 (LWP 2423)]
[INFO] [GL] Uso del sistema de gráficos "OpenGL ES 2"
[INFO] [GL] Backend utilizado

El hilo 1 "python3" recibió la señal SIGSEGV, Fallo de segmentación.
0x00000000 en ?? ()

Tronco:
[INFO] Logger: registro de inicio de sesión /home/pi/.kivy/logs/kivy_19-02-13_3.txt
[INFORMACIÓN] Kivy: v1.11.0.dev0, git-233cdd1, 20190212
[INFO] Python: v3.5.3 (predeterminado, 27 de septiembre de 2018, 17:25:39)
[CGC 6.3.0 20170516]
[INFO] Fábrica: 184 símbolos cargados
[INFO] Imagen: Proveedores: img_tex, img_dds, img_pil, img_gif (img_sdl2, img_ffpyplayer ignorado)
[INFO] Texto: Proveedor: sdl2
[INFO] Ventana: Proveedor: egl_rpi
[INFO] GL: Uso del sistema de gráficos "OpenGL ES 2"
[INFO] GL: Backend usado

¿Todavía no hay solución para esto?

os.environ ['KIVY_GL_BACKEND'] = 'gl'no ayuda en absoluto con v1.11.0.dev0, git-9ebad2d, 20190516

Obteniendo: [CRÍTICO] [Aplicación] No se puede obtener una ventana, cancelar

Y con una versión anterior como 1.10.1 no obtengo ningún soporte PNG transparente ... todos los PNG transparentes están dibujados con un fondo negro ... aunque el mismo código funciona bien en Debian 9 ...

Entonces, ¿RPi Stretch-Lite nunca volverá a ser compatible?

Vuelve atrás mi último comentario sobre este hilo. Me funciona en Raspbian Stretch Lite (noviembre de 2018) y mi 1.10.1 _siste_ admite los aproximadamente cien gráficos PNG que estoy usando con fondos transparentes.

Confirmar una compilación con el último estable (1.11.0) en una instalación stretch-lite completamente actualizada en cualquier RPI provoca esta falla de segmentación. Debe compilar stable-1.10.1 para ejecutarse en un RPI. No estoy seguro de por qué lanzaría un establo que ha tenido este problema en una plataforma importante durante más de 6 meses.

También estoy experimentando este problema en raspberry 3 B +, en raspbian lite

Una buena solución ahora es asegurarse de que Pillow esté instalado y luego ejecutar kivy con KIVY_WINDOW=sdl2 . No es necesario configurar el backend gl en este caso, ya que se usará sdl2. Si desea utilizar el proveedor de ventana egl_rpi , debe configurar el backend gl.

Esto definitivamente califica como un error de regresión. Instalación en RPI 3B + como

pip install git+https://github.com/kivy/[email protected]

rinde en falla de segmentación mientras que

pip install git+https://github.com/kivy/[email protected]

Funciona de maravilla.

Estoy planeando arreglarlo en el lanzamiento posterior.

El miércoles, 12 de junio de 2019, 1:11 p.m. RafalSkolasinski [email protected]
escribió:

Esto definitivamente califica como error de regresión. Instalación en RPI 3B + como

pip install git + https://github.com/kivy/[email protected]

rinde en falla de segmentación mientras que

pip install git + https://github.com/kivy/[email protected]

Funciona de maravilla.

-
Estás recibiendo esto porque hiciste un comentario.
Responda a este correo electrónico directamente, véalo en GitHub
https://github.com/kivy/kivy/issues/6007?email_source=notifications&email_token=AAMRN7T3A2SZJ5OE4QQ63NDP2EU2XA5CNFSM4F6QJQM2YY3PNVWWK3TUL52HS4DFVREXWG43L
o silenciar el hilo
https://github.com/notifications/unsubscribe-auth/AAMRN7XWDPCYLGW5QREDN3DP2EU2XANCNFSM4F6QJQMQ
.

¿Puedes probar https://github.com/kivy/kivy/pull/6384 ? Esto debería solucionarlo y también permitirle usar cualquiera de los tres backends cuando se selecciona manualmente (egl_rpi, sdl2 y x11 si está compilado).

Puedo probarlo más tarde hoy o mañana.

El jueves 13 de junio de 2019 a las 22:52 matham, [email protected] escribió:

¿Puedes probar # 6384 https://github.com/kivy/kivy/pull/6384 ? Esto debería
arreglarlo y también permitirle usar cualquiera de los tres backends cuando se selecciona
manualmente (egl_rpi, sdl2 y x11 si está compilado).

-
Estás recibiendo esto porque hiciste un comentario.
Responda a este correo electrónico directamente, véalo en GitHub
https://github.com/kivy/kivy/issues/6007?email_source=notifications&email_token=ACTL75LVT74IBQJQ4W5QARTP2K6RXA5CNFSM4F6QJQM2YY3PNVWWK3TUL52HS4DFVREXG63JSMVBW5 ,
o silenciar el hilo
https://github.com/notifications/unsubscribe-auth/ACTL75OGYIBPXEVW33B57KLP2K6RXANCNFSM4F6QJQMQ
.

6384 Me lo corrige usando egl_rpi en raspbian-lite, no se necesitan exportaciones.

[INFO] Logger: registro de inicio de sesión /home/pi/.kivy/logs/kivy_19-06-14_1.txt
[INFO] Imagen: Proveedores: img_tex, img_dds, img_pil, img_gif (img_sdl2, img_ffpyplayer ignorado)
[INFORMACIÓN] Kivy: v2.0.0.dev0, git-dccba95, 20190614
[INFO] Kivy: instalado en "/home/pi/Stuff/kivy-fix/kivy/__init__.py"
[INFO] Python: v3.5.3 (predeterminado, 27 de septiembre de 2018, 17:25:39)
[CGC 6.3.0 20170516]
[INFO] Python: intérprete en "/ usr / bin / python3"
[INFO] Fábrica: 184 símbolos cargados
[INFO] Texto: Proveedor: sdl2
[INFO] Ventana: Proveedor: egl_rpi
[INFO] GL: Uso del sistema de gráficos "OpenGL ES 2"
[INFO] GL: Backend usado
[INFO] GL: versión OpenGL [INFO] GL: proveedor de OpenGL [INFO] GL: renderizador OpenGL
[INFO] GL: Versión analizada de OpenGL: 2, 0
[INFO] GL: Sombreado v

Si, funciona.
Inicialmente tuve un problema y obtuve algunos errores.

[CRITICAL] [Window      ] Unable to find any valuable Window provider.

pero después de agregar pillow comenzó a funcionar.
¿Supongo que pillow son nuevas dependencias agregadas en 1.11 ?

editar:
¿Esta solución se lanzará en 1.11.1 ? veo

[INFO ] Kivy: v2.0.0.dev0, git-dccba95, 20190614

en registros.

Esto se seleccionará en un lanzamiento posterior de 1.11.0.post0 (https://github.com/kivy/kivy/pull/6357). De esta manera, las personas que apunten a 1.11.0 al instalar obtendrán automáticamente la versión fija (suponiendo que pip haga lo correcto aquí e instale 1.11.0.post0 cuando se solicite 1.11.0 ).

Normalmente, iría a 1.11.1, pero esto no funciona muy bien con nuestro flujo de trabajo, dado nuestro salto a 2.0.0 y la próxima versión que rompe cosas como el soporte de Python 2. Este lanzamiento debería ocurrir muy pronto.

En cuanto a la almohada, no estoy seguro de qué pasa. sdl2_image debería haber funcionado (¿creo que funcionó en el pasado?), Pero por alguna razón no puede cargar la imagen. Supongo que debería solucionarse más el problema (las relaciones públicas son bienvenidas). En cualquier caso, actualicé los documentos para enumerar la almohada como dependencia.

Yo optaría por la versión 1.11.1, ya que está claro que se incluye una corrección de errores. Vamos
Espero que pip estemos haciendo lo correcto.

El viernes 14 de junio de 2019 a las 17:11 matham, [email protected] escribió:

Esto se seleccionará en una versión posterior de 1.11.0.post0 (# 6357
https://github.com/kivy/kivy/pull/6357 ). De esta manera, las personas que se dirigen
1.11.0 al instalar obtendrá automáticamente la versión fija (asumiendo
pip hace lo correcto aquí e instala 1.11.0.post0 cuando 1.11.0 es
solicitado).

Normalmente, iría a 1.11.1, pero esto no funciona muy bien con nuestro
flujo de trabajo, dado nuestro salto a 2.0.0 y la próxima versión que rompe cosas como
como soporte de Python 2. Este lanzamiento debería ocurrir muy pronto.

En cuanto a la almohada, no estoy seguro de qué pasa. sdl2_image debería haber funcionado
(¿Creo que funcionó en el pasado?), Pero por alguna razón no puede cargar
la imagen. Supongo que debería solucionarse más el problema (las relaciones públicas son bienvenidas). En
en cualquier caso, actualicé los documentos para enumerar la almohada como dependencia.

-
Estás recibiendo esto porque estás suscrito a este hilo.
Responda a este correo electrónico directamente, véalo en GitHub
https://github.com/kivy/kivy/issues/6007?email_source=notifications&email_token=ACTL75LMHH3Q2FDKYW4HTUTP2O7LDA5CNFSM4F6QJQM2YY3PNVWWK3TUL52HS4DFVDVREXWJWK3TUL52HS4DFVDVREXWJWKNM2HS4DFVDVDXWJ4WM2
o silenciar el hilo
https://github.com/notifications/unsubscribe-auth/ACTL75NBY6O6KBPR4QT3LPDP2O7LDANCNFSM4F6QJQMQ
.

Si solicita 1.11.0 , es probable que pip no instale 1.11.1 , sino exactamente 1.11.0. No estoy seguro de qué haría si le pedimos 1.11 ,

Oh, quise decir que se instalará parcheado ".post0" cuando le pidamos "1.11.0" :)

El viernes 14 de junio de 2019 a las 19:29 matham, [email protected] escribió:

Si solicita 1.11.0, es probable que pip no instale 1.11.1, sino 1.11.0
exactamente. No estoy seguro de qué haría si pedimos 1.11,

-
Estás recibiendo esto porque estás suscrito a este hilo.
Responda a este correo electrónico directamente, véalo en GitHub
https://github.com/kivy/kivy/issues/6007?email_source=notifications&email_token=ACTL75JZDOPPHORTC3LEVZTP2PPPNA5CNFSM4F6QJQM2YY3PNVWWK3TUL52HS4DFVREXG43VMDVBW63 ,
o silenciar el hilo
https://github.com/notifications/unsubscribe-auth/ACTL75KC3BTJGUQTTBMAHLDP2PPPNANCNFSM4F6QJQMQ
.

como se discutió anteriormente, agregué export KIVY_GL_BACKEND=gl a la ruta y ahora recibo otro problema que dice ...
create_window() takes 1 positional argument but 2 were given

por favor ayúdame a salir de este error.
cuando ejecuto mi código en raspberry pi

sudo python3 main.py
[ADVERTENCIA] [Config] Se detectó una versión de configuración anterior (0 en lugar de 14)
[ADVERTENCIA] [Config] Actualizando la configuración en curso.
[INFO] [Logger] Registro de registro en /root/.kivy/logs/kivy_19-06-17_0.txt
[INFO] [Kivy] v1.9.1
[INFO] [Python] v3.5.3 (predeterminado, 27 de septiembre de 2018, 17:25:39)
[CGC 6.3.0 20170516]
[INFO] [Fábrica] 179 símbolos cargados
[INFO] [Imagen] Proveedores: img_tex, img_dds, img_gif, img_sdl2, img_pil (img_ffpyplayer ignorado)
[INFO] Proveedor de [texto]: sdl2
[INFO] [OSC] usandopara enchufe
[INFO] Proveedor de [ventana]: sdl2 (['window_egl_rpi'] ignorado)
error: XDG_RUNTIME_DIR no configurado en el entorno.
[CRÍTICO] [Ventana] ¡No se puede encontrar ningún proveedor de Windows valioso!
egl_rpi - ImportError: no se puede importar el nombre 'bcm'
Archivo "/usr/lib/python3/dist-packages/kivy/core/__init__.py", línea 59, en core_select_lib
fromlist = [nombre del módulo], nivel = 0)
Archivo "/usr/lib/python3/dist-packages/kivy/core/window/window_egl_rpi.py", línea 12, en
de kivy.lib.vidcore_lite importar bcm, egl

sdl2 - RuntimeError: b'No hay dispositivo de video disponible '
Archivo "/usr/lib/python3/dist-packages/kivy/core/__init__.py", línea 67, en core_select_lib
cls = cls ()
Archivo "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", línea 138, en __init__
super (WindowSDL, self) .__ init __ ()
Archivo "/usr/lib/python3/dist-packages/kivy/core/window/__init__.py", línea 722, en __init__
self.create_window ()
Archivo "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", línea 237, en create_window
self.fullscreen, redimensionable, estado)
Archivo "kivy / core / window / _window_sdl2.pyx", línea 80, en kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (kivy / core / window / _window_sdl2.c: 1893)
Archivo "kivy / core / window / _window_sdl2.pyx", línea 55, en kivy.core.window._window_sdl2._WindowSDL2Storage.die (kivy / core / window / _window_sdl2.c: 1479)

x11 - ImportError: ningún módulo llamado 'kivy.core.window.window_x11'
Archivo "/usr/lib/python3/dist-packages/kivy/core/__init__.py", línea 59, en core_select_lib
fromlist = [nombre del módulo], nivel = 0)

[CRÍTICO] [Aplicación] No se puede obtener una ventana, abortar.
Excepción ignorada en: 'kivy.properties.dpi2px'
Rastreo (llamadas recientes más última):
Archivo "/usr/lib/python3/dist-packages/kivy/utils.py", línea 513, en __get__
retval = self.func (inst)
Archivo "/usr/lib/python3/dist-packages/kivy/metrics.py", línea 175, en dpi
EventLoop.ensure_window ()
Archivo "/usr/lib/python3/dist-packages/kivy/base.py", línea 126, en secure_window
sys.exit (1)
Salida del sistema: 1
[CRÍTICO] [Aplicación] No se puede obtener una ventana, abortar.

Cualquiera, por favor dígame qué debo hacer.

@ jayeshsingh9767 ¿has probado con master o la última versión? Esto se ha corregido en la versión maestra, pero aún no hemos realizado una nueva versión que incluya la corrección.

@ harshp1301 este error no está relacionado con este problema. Esto también parece un problema con su sistema y no kivy. Para soporte, pregunte en discordia.

@matham Gracias, pero el problema se solucionó cuando Window.size() de mi código.
Creo que no podemos administrar la aplicación kivy Window en Raspberry pi ... ¿Pero alguien podría explicarme por qué?
Nota: Wimdow.size() estaba ejecutando perfectamente en Ubuntu ...

Esto no está relacionado con este problema, por lo que tal vez abra un nuevo problema para esto (si no existe uno). Pero tal vez eso no sea posible con el backend de la ventana egl_rpi. Intentaría con el backend sdl2 o el backend de la ventana x11 (creo que ambos son redimensionables incluso en el pi).

Tuve problemas similares con el sistema operativo raspbian lite real (2020-05-27) -> después de la primera carga, obtuve una falla de segmentación. Luego probé el cambio a 'gl'. Después de eso, obtuve una pantalla y un cursor negro sin ningún problema de mi GUI.
Si cambié de nuevo a un raspbian lite anterior, funciona con Kivy 1.11.1. De hecho, no sé cuál es exactamente la diferencia. Parece que hay algunas actualizaciones que causan este problema (libs, firmware ...?). Afortunadamente, hice una copia de seguridad de la tarjeta SD antigua y la restauré para mi GUI realmente utilizada.
Decidí usar Kivy porque no necesito instalar X11. Mi GUI se está ejecutando en la consola ...

@AndreasPantle Me encuentro con la misma experiencia con 1.11.1 y Raspberry PI OS (rebautizado como Raspbian). Voy a darle un giro a 1.10.1 y ver qué pasa. kivy es una dependencia del controlador de medios Mission Pinball, por lo que es posible que no tenga la opción de cambiar la versión.

¿Fue útil esta página
0 / 5 - 0 calificaciones
bleepcoder.com utiliza la información de GitHub con licencia pública para proporcionar a los desarrolladores de todo el mundo soluciones a sus problemas. No estamos afiliados a GitHub, Inc. o a ningún desarrollador que use GitHub para sus proyectos. No alojamos ninguno de los vídeos o imágenes en nuestros servidores. Todos los derechos pertenecen a sus respectivos propietarios.
Fuente de esta página: Fuente

Lenguajes de programación populares
Proyectos populares de GitHub
Más proyectos de GitHub

© 2024 bleepcoder.com - Contact
Made with in the Dominican Republic.
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.