Code Monkey home page Code Monkey logo

Comments (12)

oomek avatar oomek commented on June 12, 2024

I've managed somehow to get it working by wrapping renderVideo() in the following setActive() calls:

window.setActive(false);
texture.setActive(true);
player.renderVideo();
texture.display();
texture.setActive(false);
window.setActive(true);

from mdk-sdk.

wang-bin avatar wang-bin commented on June 12, 2024

remove window.setActive(false); and window.setActive(true); around renderVideo() works for me

from mdk-sdk.

oomek avatar oomek commented on June 12, 2024

I added it because it was segfaulting on PI4 when I pressed left or right and first video is renderered as 1 pixel in top left corner.

from mdk-sdk.

wang-bin avatar wang-bin commented on June 12, 2024

can you show me crash stack using gdb?

from mdk-sdk.

oomek avatar oomek commented on June 12, 2024

There is really not much here:

Thread 1 "mdktest" received signal SIGSEGV, Segmentation fault.
0xb5653e60 in ?? () from /usr/lib/arm-linux-gnueabihf/dri/vc4_dri.so
(gdb) bt
#0  0xb5653e60 in ?? () from /usr/lib/arm-linux-gnueabihf/dri/vc4_dri.so
#1  0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

from mdk-sdk.

wang-bin avatar wang-bin commented on June 12, 2024

I need your log

from mdk-sdk.

oomek avatar oomek commented on June 12, 2024

Sorry, I'm not experienced enough with gdb. Could you give me instructions how do I dump the stack? I just do gdb ./mdktest and then run

from mdk-sdk.

wang-bin avatar wang-bin commented on June 12, 2024

Sorry, I'm not experienced enough with gdb. Could you give me instructions how do I dump the stack? I just do gdb ./mdktest and then run

That's enough.

I guess because you call texture.display() in load(const char*). display() will make texture's context active and window's context becomes inactive. So if you don't call window.setActvie() before drawing on window, it may crash. So you can try to remove texture.display() in load, and remove window.setActive(false/true) around renderVideo(). To ensure window's context is correct, call window.setActive() before https://github.com/oomek/mdktest/blob/master/mdktest.cpp#L178

It's strange that window.setActive(false) in your example code results in black display on my Mac even if I call window.setActive() later.

from mdk-sdk.

oomek avatar oomek commented on June 12, 2024

I've removed texture.display() and window.setActive(false/true) but I still got black screen. the text shows for a brief moment and when I swam media it segfaults.

from mdk-sdk.

oomek avatar oomek commented on June 12, 2024

this is all I have in the gdb session

pi@retropie4:~/dev/mdk $ gdb ./mdktest
GNU gdb (Raspbian 8.2.1-2) 8.2.1
Copyright (C) 2018 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 ./mdktest...done.
(gdb) run
Starting program: /home/pi/dev/mdk/mdktest
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
MDK 0.10.0 (git 7a075da) - Multimedia Development Kit. Copyright (c) 2016-2020 WangBin(QtAV author) <wbsecg1 at gmail.com>
Build for: Raspberry Pi ARMv6; Clang8.0.1 (branches/release_80)GCC4.2.1; libc++9000; 12:06:44 Oct  4 2020
[New Thread 0xb0e97430 (LWP 23492)]
[New Thread 0xaf3ff430 (LWP 23493)]
[New Thread 0xae9ff430 (LWP 23494)]
[New Thread 0xadfff430 (LWP 23495)]
[New Thread 0xad7fe430 (LWP 23496)]
[New Thread 0xacffd430 (LWP 23497)]
[New Thread 0xac7fc430 (LWP 23498)]
[New Thread 0xabffb430 (LWP 23499)]
[New Thread 0xaaeff430 (LWP 23500)]
[New Thread 0xaa4ff430 (LWP 23501)]
[New Thread 0xa9cfe430 (LWP 23502)]
[New Thread 0xa94fd430 (LWP 23503)]
get Context 0x142ff8/0xde9b8 has no local data for key 0xf67a0, create 1(0x223c18)
get Context 0x142ff8/0xde9b8 has no local data for key 0x13b7e8, create 1(0x223da0)
[Thread 0xaf3ff430 (LWP 23493) exited]
[Thread 0xadfff430 (LWP 23495) exited]
[Thread 0xad7fe430 (LWP 23496) exited]
[Thread 0xac7fc430 (LWP 23498) exited]
[Thread 0xacffd430 (LWP 23497) exited]
[Thread 0xae9ff430 (LWP 23494) exited]
[Thread 0xb0e97430 (LWP 23492) exited]
[Thread 0xabffb430 (LWP 23499) exited]
[New Thread 0xb0e97430 (LWP 23505)]
[New Thread 0xaf3ff430 (LWP 23506)]
[New Thread 0xae9ff430 (LWP 23507)]
[New Thread 0xabffb430 (LWP 23508)]
[New Thread 0xadfff430 (LWP 23509)]
[New Thread 0xad7fe430 (LWP 23510)]
[New Thread 0xacffd430 (LWP 23511)]
[New Thread 0xac7fc430 (LWP 23512)]

Thread 1 "mdktest" received signal SIGSEGV, Segmentation fault.
0xb5653e60 in ?? () from /usr/lib/arm-linux-gnueabihf/dri/vc4_dri.so
(gdb)

from mdk-sdk.

wang-bin avatar wang-bin commented on June 12, 2024

Please enable log via MDK_LOG=1

from mdk-sdk.

oomek avatar oomek commented on June 12, 2024

gdb_mdk_log.txt

from mdk-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.