Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Device loss detected in Present() #315

Open
ttiee opened this issue Nov 19, 2023 · 20 comments
Open

[BUG] Device loss detected in Present() #315

ttiee opened this issue Nov 19, 2023 · 20 comments
Labels
bug Something isn't working help wanted Extra attention is needed present Related to the main "present" feature windows Windows related

Comments

@ttiee
Copy link

ttiee commented Nov 19, 2023

Description

The output:

(.env-3.8.10) E:\Manim\manimgl-manim-slides>manim-slides BasicExample
    failed to get textures for frame; format: 172 textureConverter null
Device loss detected in Present()
Device loss detected in Present()

And the Screeen is frozen

Version

Manim Slides v5.0.0

Platform

Win11

Screenshots

image image

Additional information

No response

@ttiee ttiee added the bug Something isn't working label Nov 19, 2023
@ttiee
Copy link
Author

ttiee commented Nov 19, 2023

here is the output, when setting QT_DEBUG_PLUGINS=1

Outputs
(.env-3.8.10) E:\Manim\manimgl-manim-slides>manim-slides NextSlideExample
qt.core.plugin.factoryloader: checking directory path "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platforms" ...
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platforms/qdirect2d.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platforms/qdirect2d.dll, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "direct2d"
        ]
    },
    "archlevel": 1,
    "className": "QWindowsDirect2DIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("direct2d")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platforms/qminimal.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platforms/qminimal.dll, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archlevel": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platforms/qoffscreen.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platforms/qoffscreen.dll, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archlevel": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platforms/qwindows.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platforms/qwindows.dll, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "windows"
        ]
    },
    "archlevel": 0,
    "className": "QWindowsIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows")
qt.core.plugin.factoryloader: checking directory path "E:/python3.8.10/platforms" ...
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platforms/qwindows.dll" loaded library
qt.core.plugin.factoryloader: checking directory path "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/platformthemes" ...
qt.core.plugin.factoryloader: checking directory path "E:/python3.8.10/platformthemes" ...
qt.core.plugin.factoryloader: checking directory path "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/styles" ...
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/styles/qwindowsvistastyle.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/styles/qwindowsvistastyle.dll, metadata=
{
    "IID": "org.qt-project.Qt.QStyleFactoryInterface",
    "MetaData": {
        "Keys": [
            "windowsvista"
        ]
    },
    "archlevel": 0,
    "className": "QWindowsVistaStylePlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windowsvista")
qt.core.plugin.factoryloader: checking directory path "E:/python3.8.10/styles" ...
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/styles/qwindowsvistastyle.dll" loaded library
qt.core.plugin.factoryloader: checking directory path "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/iconengines" ...
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/iconengines/qsvgicon.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/iconengines/qsvgicon.dll, metadata=
{
    "IID": "org.qt-project.Qt.QIconEngineFactoryInterface",
    "MetaData": {
        "Keys": [
            "svg",
            "svgz",
            "svg.gz"
        ]
    },
    "archlevel": 0,
    "className": "QSvgIconPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("svg", "svgz", "svg.gz")
qt.core.plugin.factoryloader: checking directory path "E:/python3.8.10/iconengines" ...
qt.core.plugin.factoryloader: checking directory path "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats" ...
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qgif.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qgif.dll, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "gif"
        ],
        "MimeTypes": [
            "image/gif"
        ]
    },
    "archlevel": 0,
    "className": "QGifPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("gif")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qicns.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qicns.dll, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "icns"
        ],
        "MimeTypes": [
            "image/x-icns"
        ]
    },
    "archlevel": 0,
    "className": "QICNSPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("icns")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qico.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qico.dll, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "ico",
            "cur"
        ],
        "MimeTypes": [
            "image/vnd.microsoft.icon",
            "image/vnd.microsoft.icon"
        ]
    },
    "archlevel": 0,
    "className": "QICOPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("ico", "cur")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qjpeg.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qjpeg.dll, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "jpg",
            "jpeg"
        ],
        "MimeTypes": [
            "image/jpeg",
            "image/jpeg"
        ]
    },
    "archlevel": 0,
    "className": "QJpegPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("jpg", "jpeg")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qpdf.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qpdf.dll, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "pdf"
        ],
        "MimeTypes": [
            "application/pdf"
        ]
    },
    "archlevel": 0,
    "className": "QPdfPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("pdf")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qsvg.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qsvg.dll, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "svg",
            "svgz"
        ],
        "MimeTypes": [
            "image/svg+xml",
            "image/svg+xml-compressed"
        ]
    },
    "archlevel": 0,
    "className": "QSvgPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("svg", "svgz")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qtga.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qtga.dll, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "tga"
        ],
        "MimeTypes": [
            "image/x-tga"
        ]
    },
    "archlevel": 0,
    "className": "QTgaPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("tga")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qtiff.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qtiff.dll, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "tiff",
            "tif"
        ],
        "MimeTypes": [
            "image/tiff",
            "image/tiff"
        ]
    },
    "archlevel": 0,
    "className": "QTiffPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("tiff", "tif")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qwbmp.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qwbmp.dll, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "wbmp"
        ],
        "MimeTypes": [
            "image/vnd.wap.wbmp"
        ]
    },
    "archlevel": 0,
    "className": "QWbmpPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wbmp")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qwebp.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qwebp.dll, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "webp"
        ],
        "MimeTypes": [
            "image/webp"
        ]
    },
    "archlevel": 0,
    "className": "QWebpPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("webp")
qt.core.plugin.factoryloader: checking directory path "E:/python3.8.10/imageformats" ...
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qgif.dll" loaded library
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qicns.dll" loaded library
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qico.dll" loaded library
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qjpeg.dll" loaded library
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qpdf.dll" loaded library
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qsvg.dll" loaded library
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qtga.dll" loaded library
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qtiff.dll" loaded library
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qwbmp.dll" loaded library
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/imageformats/qwebp.dll" loaded library
qt.core.plugin.factoryloader: checking directory path "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/multimedia" ...
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/multimedia/ffmpegmediaplugin.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/multimedia/ffmpegmediaplugin.dll, metadata=
{
    "IID": "org.qt-project.Qt.QPlatformMediaPlugin",
    "MetaData": {
        "Keys": [
            "ffmpeg"
        ]
    },
    "archlevel": 0,
    "className": "QFFmpegMediaPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("ffmpeg")
qt.core.plugin.factoryloader: looking at "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/multimedia/windowsmediaplugin.dll"
qt.core.plugin.loader: Found metadata in lib E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/multimedia/windowsmediaplugin.dll, metadata=
{
    "IID": "org.qt-project.Qt.QPlatformMediaPlugin",
    "MetaData": {
        "Keys": [
            "windows"
        ]
    },
    "archlevel": 0,
    "className": "QWindowsMediaPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows")
qt.core.plugin.factoryloader: checking directory path "E:/python3.8.10/multimedia" ...
qt.core.library: "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/multimedia/ffmpegmediaplugin.dll" loaded library
qt.core.plugin.factoryloader: checking directory path "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/accessible" ...
qt.core.plugin.factoryloader: checking directory path "E:/python3.8.10/accessible" ...
qt.core.plugin.factoryloader: checking directory path "E:/manim/manimgl-manim-slides/.env-3.8.10/lib/site-packages/PySide6/plugins/accessiblebridge" ...
qt.core.plugin.factoryloader: checking directory path "E:/python3.8.10/accessiblebridge" ...
    failed to get textures for frame; format: 172 textureConverter null
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()
Device loss detected in Present()

Edit: Collapse the output

@jeertmans
Copy link
Owner

Thanks for creating a new issue @ttiee!
Can you open the individual video files in the slides folder with any video application? Like Windows Media Player or VLC?

also, does the error message occur before playing any of the slide?

@ttiee
Copy link
Author

ttiee commented Nov 19, 2023

The video can be played nomally.
image
The error message occured at the beginning. As long as run manim-slides, error occures and the screen is frozen

@jeertmans
Copy link
Owner

Can you try running this example from PySide6's documentation and play one of the video files generated by manim-slides? This is a video player that uses the same base class to play video files, so I want to check if this works.

Link: https://doc.qt.io/qtforpython-6/examples/example_multimedia_player.html.

Also, can you show me what is the version of PySide6 you are using?

You can obtain the information with pip show PySide6.

@jeertmans jeertmans added the present Related to the main "present" feature label Nov 19, 2023
@ttiee
Copy link
Author

ttiee commented Nov 19, 2023

pip show PySide6

(.env-3.8.10) E:\Manim\manimgl-manim-slides>pip show PySide6
Name: PySide6
Version: 6.5.2
Summary: Python bindings for the Qt cross-platform application and UI framework
Home-page: https://www.pyside.org
Author: Qt for Python Team
Author-email: pyside@qt-project.org
License: LGPL
Location: e:\manim\manimgl-manim-slides\.env-3.8.10\lib\site-packages
Requires: PySide6-Addons, PySide6-Essentials, shiboken6
Required-by: manim-slides

OK, I will try the example from PySide6's documentation

@ttiee
Copy link
Author

ttiee commented Nov 19, 2023

202311192211.mp4

I cut the video to make it smaller. The audio could be played, but the video can't.

@ttiee
Copy link
Author

ttiee commented Nov 19, 2023

image

I create a virtual environment python=3.11.6 PySide6=6.6.0, the example from PySide6's documentation works well, even the output alse contains the same warning

failed to get textures for frame; format: 172 textureConverter null

@ttiee
Copy link
Author

ttiee commented Nov 19, 2023

Ohhh! I runned the pip install pyside6==6.6.0 to re-installed the pyside=6.6.0. It works well

屏幕截图 2023-11-19 224835

@jeertmans
Copy link
Owner

Oh ok so this is definitely a bug from PySide6.

The issue is that version 6.6.0 seems to contain bugs (which I reported to them), but maybe this is not the case: do you have Nice transitions between slides or do you observe flashing black screen in between?

@ttiee
Copy link
Author

ttiee commented Nov 20, 2023

Yes, there are flashing black screens in between transitions.

It can pause, replay, and all the key works well. When not setting loop=True, it will show a black screen after the slide is played.
When setting loop=True, it will flash a black screen before the next slide is played.

The bug exists in the 6.5.2 version of pyside6, but in the 6.6.0 maybe pyside6 fixed some bug. So the screen isn't frozen. But the bug still exists.

@jeertmans
Copy link
Owner

Yes, there are flashing black screens in between transitions.

This is actually what I discovered with #293.

The bug exists in the 6.5.2 version of pyside6, but in the 6.6.0 maybe pyside6 fixed some bug. So the screen isn't frozen. But the bug still exists.

Do you mean that you also observe the flashing black screen in 6.5.2? Or you are referring to the other bug (see this issue)?

@jeertmans
Copy link
Owner

Anyway, you can try to install another version of PySide6, version between >=6.5.0 and <6.5.3 should all work, hopefully.

@ttiee
Copy link
Author

ttiee commented Nov 20, 2023

Yes, there are flashing black screens in between transitions.

This is actually what I discovered with #293.

The bug exists in the 6.5.2 version of pyside6, but in the 6.6.0 maybe pyside6 fixed some bug. So the screen isn't frozen. But the bug still exists.

Do you mean that you also observe the flashing black screen in 6.5.2? Or you are referring to the other bug (see this issue)?

What I mean is that in the PySide6 version 6.6.0, at least it can still play the video, but in version 6.5.2, it cannot play the video at all—upon running, it freezes.

Anyway, you can try to install another version of PySide6, version between >=6.5.0 and <6.5.3 should all work, hopefully.

On my computer, video playback functions properly only with versions >= 6.5.3; however, there is a brief black screen when switching between videos.

@jeertmans
Copy link
Owner

jeertmans commented Nov 20, 2023

Thanks for the details! What version of Windows are you using? I might try on my own Windows computer when I have time :-)

Edit: you mentioned Win11 in the original comment above

@logdog
Copy link

logdog commented Feb 26, 2024

I am having a related, but not identical issue.

When I run with Pyside6 version < 6.6.0, I get a GPU error:

(env) C:\Users\logan\OneDrive\Documents\YouTube\Private\Cart Pole>manim-slides
1: Lagrangian
2: Test

Choose number corresponding to desired scene/arguments.
(Use comma separated list for multiple entries)
Choice(s): 1
[02/26/24 13:26:55] WARNING  You are using API = 'pyside6', QT_VERSION = '6.5.0', but we __init__.py:23
                             recommend installing 'PySide6==6.5.2', mainly to avoid      
                             flashing screens between slides, see issue
                             https://github.com/jeertmans/manim-slides/issues/293. You   
                             can do so with `pip install 'manim-slides[pyside6]'`.       
    failed to get textures for frame true
    failed to get textures for frame true
    failed to get textures for frame true
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 2952033892080
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 2952033892080
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 2952033894448

In this case, the manim-slides window flashes open and then immediately closes. I have spent the morning updating/uninstalling/reinstalling every version of my graphics card I could get my hands on, with success only happening when I rolled back my graphics card to a 2006 version (which isn't a viable solution as it won't let me use dual monitors).

When I do a pip install Pyside6==6.6.2 (the latest version as of 2/26/24) and run the same manim-slides command, I am able to actually open the manim-slides window and perform the animations, however when the mp4 files are not playing, the screen flashes to black.

I love using manim-slides, but this is a major issue, as I can't use it to produce youtube videos. Is there a known workaround as of this writing?

@jeertmans
Copy link
Owner

Hello @logdog,
I am sorry to hear that you are facing issues using this tool!

Regarding the first part of your message, you can see that you are using PySide6.5.0, but version 6.5.1 or 6.5.2 should probably fix your issue.

If not, then did you Google your graphics card issue? I am not aware of such issue..

Starting 6.5.3, Qt has a bug (flashing black screens) and they have not patched it yet :/
I did not try the new 6.6.2, but I doubt they fixed it because my issue is still open on their big tracker…

@logdog
Copy link

logdog commented Feb 26, 2024

Update: I resolved my problem by rolling back manim-slides=5.0.0 and using pyside6==6.5.2

Let me try some other version of manim-slides and see which ones work.

Edit: version 5.1.0 - 5.1.3 all fail on my computer. Version 5.0.0 is the only one that works for me (I did not try any of the version 5.1 pre-releases)

@jeertmans
Copy link
Owner

Update: I resolved my problem by rolling back manim-slides=5.0.0 and using pyside6==6.5.2

Let me try some other version of manim-slides and see which ones work.

Edit: version 5.1.0 - 5.1.3 all fail on my computer. Version 5.0.0 is the only one that works for me (I did not try any of the version 5.1 pre-releases)

Interesting! I looked at the quite large diff between the two versions but could not find an obvious reason why it would not fail. Did you have a different error message?

For reference: v5.0.0...v5.1.3

@logdog
Copy link

logdog commented Feb 26, 2024

Yes, similar error message when running with manim-slides==5.1.3. Here is the output. I googled this error message and it is definitely a problem related to the GPU. Many people on the internet got this message when playing resource-intensive games on their computers. I wonder if manim-slides is trying to use a feature that my GPU cannot support (see below for my GPU/driver info)

image

My device specs:

Processor	13th Gen Intel(R) Core(TM) i7-13700H   2.40 GHz
Installed RAM	32.0 GB (31.7 GB usable)
System type	64-bit operating system, x64-based processor

And finally the error message I get when I try to run manim-slides on version 5.1.3

(env) C:\Users\logan\OneDrive\Documents\YouTube\Private\Cart Pole>manim-slides              
1: Lagrangian
2: Test

Choose number corresponding to desired scene/arguments.
(Use comma separated list for multiple entries)
Choice(s): 2
    failed to get textures for frame; format: 172 textureConverter null
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975354632368
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975354632368
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975372485488
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975372485488
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975372488688
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975372488688
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975372489456
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975372489456
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975372480688
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975372480688
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405395056
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405395056
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405402288
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405402288
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405391856
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405391856
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405387056
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405387056
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405388656
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405388656
Device loss detected in Present()
Failed to create srv: COM error 0x887a0005: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Failed to initialize QRhiTexture wrapper for native texture object 1975405387888

@jeertmans
Copy link
Owner

Thanks, I really need to open Windows back to check this issue 🥲

jeertmans added a commit that referenced this issue Feb 27, 2024
Apparently, the "recommended* versions of Qt (i.e., Qt 6.5.1 and 6.5.2) produces errors.

I could not exactly re-produce #315, but I also have `failed to get textures for frame; format: 172 textureConverter null` in the output, as #315 (comment) mentioned.

After searching a bit, this feels like the faulty lines are (at least related to) https://github.com/jeertmans/manim-slides/blob/1dbd2fdde58030867f15d7bf0ecede11d59d6903/manim_slides/present/player.py#L245-L247.

I could not yet find a fix for that, but I created this PR for testing purposes... I also added quite a few debug prints, for the future.

When upgrading  Qt to 6.5.3 and above, the error message disappear, but we then have the same visual issue as described in #293.
@jeertmans jeertmans added help wanted Extra attention is needed windows Windows related labels Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed present Related to the main "present" feature windows Windows related
Projects
None yet
Development

No branches or pull requests

3 participants