RSATom / WebChimera.js

[ABANDONED] libvlc binding for Electron
GNU Lesser General Public License v2.1
661 stars 105 forks source link

Assertion failure when calling .close() on a player instance. #122

Closed purebe closed 3 years ago

purebe commented 7 years ago

I'm using the win32 prebuilt binary for nwjs v0.21.2 with VLC v2.2.4 (WebChimera.js_v0.2.7_nw_v0.21.2_VLC_v2.2.4_ia32_win.zip), when I run the sample player and after a few seconds of it running stop and close the player it crashes with an assertion failure:

Microsoft Visual C++ Runtime Library

Assertion fialed!

Program: C:...\node.dll File: e:\build\nw21_win32\node-webkit\src\thid_par...\async.c Line: 77

Expression: !(handle->flags & UV_HANDLE_CLOSING)

Additionally, the following backtrace is printed out from chrome (not sure if this is helpful):

[12204:11624:0707/122612.314:FATAL:browser_process_impl.cc(1351)] Check failed: base::MessageLoop::current()->is_running(). Backtrace: std::vector<v8::CpuProfileDeoptFrame,std::allocator >::push_back [0x5C5A3D97+52295] v8::RetainedObjectInfo::GetGroupLabel [0x5C53EAE1+357473] RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x5C4889BF+485407] RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x5C487E98+482552] RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x5C441124+192388] RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x5C44129F+192767] v8::CpuProfile::GetSamplesCount [0x5C3E8F2B+112315] v8::RetainedObjectInfo::GetGroupLabel [0x5C50B1CF+146255] v8::RetainedObjectInfo::GetGroupLabel [0x5C4EE9EF+29551] v8::RetainedObjectInfo::GetGroupLabel [0x5C4EF396+32022] RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x5C4887E1+484929] v8::CpuProfile::GetSamplesCount [0x5C40F857+270311] std::vector<v8::CpuProfileDeoptFrame,std::allocator >::_Grow_to [0x5BF0FAEA+666282] std::vector<v8::CpuProfileDeoptFrame,std::allocator >::_Grow_to [0x5BF10CAF+670831] std::vector<v8::CpuProfileDeoptFrame,std::allocator >::_Grow_to [0x5BF0C607+652743] std::vector<v8::CpuProfileDeoptInfo,std::allocator >::at [0x5C34F2F0+1399792] std::vector<v8::CpuProfileDeoptInfo,std::allocator >::at [0x5C34F244+1399620] std::vector<v8::CpuProfileDeoptInfo,std::allocator >::at [0x5C34E988+1397384] ChromeMain [0x5B67E318+179] (No symbol) [0x00824CE1] (No symbol) [0x008244CC] IsSandboxedProcess [0x00875058+97672] BaseThreadInitThunk [0x74C18744+36] RtlGetAppContainerNamedObjectPath [0x76F7587D+253] RtlGetAppContainerNamedObjectPath [0x76F7584D+205]

This is the example code I'm using:

<html>
<body>
<canvas id="canvas"/>
<script>
var canvas = document.getElementById("canvas");
var renderContext = require("webgl-video-renderer").setupCanvas(canvas);

var player = require("webchimera.js").createPlayer();
player.onLogMessage =
    function(level, message, format) {
        console.log(message);
    }
player.onFrameReady =
    function(frame) {
        renderContext.render(frame, frame.width, frame.height, frame.uOffset, frame.vOffset);
    }

player.play("file:///C:/SampleMedia/Tammy Trailer2.mp4");

setTimeout(() => {
    player.stop();
    setTimeout(() => {
        player.close();
    }, 1000);
}, 5000);
</script>
</body>
</html>

The crash happens on .close(). If I do not directly call .close() then I get the same crash when I attempt to close the application.

RSATom commented 7 years ago

I didn't test it with latest NW.js/Electron versions due to project suspend. It's possible something was changed inside NW.js. It's a bug, but unfortunately, I don't see any reason to spend time on it, since project is suspended. Sorry... But patch still welcome.

purebe commented 7 years ago

Understood, thanks for the response.

RSATom commented 3 years ago

Closed as too old.