LCLVLCPlayer causes 'External SIGSEGV' exception lazarus / 31-LCL ---------------------------------------------------------------------- JohnnyDee · 2016-02-24 15:14 I'm an old Delphi user but new to Lazarus.  I'm having problems with LCLVLCPlayer and would appreciate any assistance. I did a fresh install of the Lazarus IDE v1.6 with fpc 3.0.0 (Win32) on Windows 10 and then, from the IDE,  I installed the 'lazvlc 1.0' package. Now, starting with a new application, I added a 'TLCLVLCPlayer' (from the Multimedia tab) and with this as the only component on Form1 and with no code added to Unit1, I compiled and ran the program. The compile has no error messages but, before the run-time version of the Form appears on screen I get "Project project1 rasised exception class 'External: SIGSEGV'. Any ideas or suggestions please? ---------------------------------------------------------------------- engkin · 2016-02-24 16:57 I did not install the package, but I tried to run the test program that came with it (does not require the package to be installed) and it failed. Most likely because I have an older (or newer) version. I found out that my dll(s) don't have some of the imported procedures by running: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses  ..., libvlc...  Loadlibvlc(DefaultlibPath+libname, true);  You can try to skip loading the missing procedures to see if it works (assuming they are not needed or could be replaced with something else) One more thing, I did not see where in the code it loads the libraries. Calling Loadlibvlc should solve that. ---------------------------------------------------------------------- JohnnyDee · 2016-02-24 20:43 Hi engkin, Thanks for your response. I followed your lead and bypassed the LCL component and tried compiling the test program provided (testlcl.lpi).  This program ran (slowly) and then failed because it could not load the VLC dll 'libvlccore.dll'. I found the code to load the VLC dlls in 'libvlc.pp' in the fpc\3.0.0.0\source\packages\libvlc\src folder. Obviously, that code needed changing but, sensing that I was walking on thin ice, before making any changes, I copied the test program files together with libvlc.pp, vlc.pp and lclvlc.pp into a single new folder and renamed them all.  I then changed the constant 'DefaultLibPath' (in what used to be 'libvlc.pp') to point at the correct program folder and compiled. Now, when running the compiled program from the IDE, it again seems to run very slowly but it does load the VLC dlls.  Though sluggish, it works up to the point of clicking on the 'Play' button when it seems to hang.  Task Manager shows 'gdb.exe' (which I assume is the debugger?) is taking 50% of the CPU but the program itself does nothing. At this point, I tried running the newly compiled program outside the IDE.  Hey presto, it works!  It doesn't feel sluggish and the video plays almost instantaneously. While I was typing the above, the version of the program running under the IDE (which I had left 'running' in the background) surprised me by suddenly bursting into life and playing the video.  I was curious, so I recompiled and re-ran the program under the IDE with a stopwatch in hand and found that, from clicking on the 'play' button to the video actually starting took 6 minutes 21 seconds.  All this time gdb.exe was taking around 50% of the CPU (i.e. 100% of one of the two processor cores). So, after all that, I'm not at all sure what I've proved but there's obviously something quite odd going on. ---------------------------------------------------------------------- Jurassic Pork · 2016-02-24 23:39 hello, same problem for me with PasLibVlcPlayer : if i run the program in the IDE with Option Debugger/General  Type and Path to Gnu Debugger (gdb) , the program run slowly. if i run the program in the IDE with Option Debugger/General  Type and Path to none the video plays  instantaneously. Friendly, J.P ---------------------------------------------------------------------- JD · 2016-02-27 15:18 I can't even get them (PasLibVlcPlayer or fpc's VLC example) to work on my system. But I don't have VLC installed though I have the necessary dlls. Is there a way to play video whithout having to install VLC Player? By the way, I tried the MPlayer examples & that works but I prefer to use VLC Player. JD ---------------------------------------------------------------------- Tibb · 2016-03-08 13:19 Quote from: JohnnyDee on February 24, 2016, 09:43:58 pmHi engkin, Thanks for your response. I followed your lead and bypassed the LCL component and tried compiling the test program provided (testlcl.lpi).  This program ran (slowly) and then failed because it could not load the VLC dll 'libvlccore.dll'. I found the code to load the VLC dlls in 'libvlc.pp' in the fpc\3.0.0.0\source\packages\libvlc\src folder. Obviously, that code needed changing but, sensing that I was walking on thin ice, before making any changes, I copied the test program files together with libvlc.pp, vlc.pp and lclvlc.pp into a single new folder and renamed them all.  I then changed the constant 'DefaultLibPath' (in what used to be 'libvlc.pp') to point at the correct program folder and compiled. Now, when running the compiled program from the IDE, it again seems to run very slowly but it does load the VLC dlls.  Though sluggish, it works up to the point of clicking on the 'Play' button when it seems to hang.  Task Manager shows 'gdb.exe' (which I assume is the debugger?) is taking 50% of the CPU but the program itself does nothing. At this point, I tried running the newly compiled program outside the IDE.  Hey presto, it works!  It doesn't feel sluggish and the video plays almost instantaneously. While I was typing the above, the version of the program running under the IDE (which I had left 'running' in the background) surprised me by suddenly bursting into life and playing the video.  I was curious, so I recompiled and re-ran the program under the IDE with a stopwatch in hand and found that, from clicking on the 'play' button to the video actually starting took 6 minutes 21 seconds.  All this time gdb.exe was taking around 50% of the CPU (i.e. 100% of one of the two processor cores). So, after all that, I'm not at all sure what I've proved but there's obviously something quite odd going on. Can you please share your project files so i can check what can be the problem at my side? I do exactly the same (did modify 'DefaultLibPath') yet i cannot start playing any video files because testlcl cannot load libvlccore.dll. ---------------------------------------------------------------------- Tibb · 2016-03-08 18:37 I registered libvlccore.dll with 'regsvr32.exe libvlccore.dll', now i'm getting cannot load library "libvlc.dll". Of course tried to register this one also but no luck. I'm getting frustrated. (: Maybe i need some vc redist package? Which one? Any idea? ---------------------------------------------------------------------- sadikacar60 · 2019-01-27 15:17 i am having the same problem no improvement? ---------------------------------------------------------------------- wp · 2019-01-27 16:03 I just tried the LCL demo with fpc 3.2 and fpc-trunk - it works. It does not work with fpc 3.0.4 which fails to find the dlls on my 64-bit Windows running VLC-32bit , possibly due to https://bugs.freepascal.org/view.php?id=30762. ---------------------------------------------------------------------- Mongkey · 2023-12-08 01:39 i tried to create vlcplayer by code, the pvlclayer was not showing up but it was there, but if i drag dropping manually it worked very well, any one ever encountered this kind of issue? Thank you