Recent

Author Topic: LCLVLCPlayer causes 'External SIGSEGV' exception  (Read 7153 times)

JohnnyDee

  • Newbie
  • Posts: 2
LCLVLCPlayer causes 'External SIGSEGV' exception
« on: February 24, 2016, 04:14:40 pm »
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?

« Last Edit: February 24, 2016, 04:33:14 pm by JohnnyDee »

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: LCLVLCPlayer causes 'External SIGSEGV' exception
« Reply #1 on: February 24, 2016, 05:57:31 pm »
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][+][-]
  1. uses
  2.   ..., libvlc
  3. ...
  4.   Loadlibvlc(DefaultlibPath+libname, true);
  5.  

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.
« Last Edit: February 24, 2016, 06:03:11 pm by engkin »

JohnnyDee

  • Newbie
  • Posts: 2
Re: LCLVLCPlayer causes 'External SIGSEGV' exception
« Reply #2 on: February 24, 2016, 09:43:58 pm »
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

  • Hero Member
  • *****
  • Posts: 1228
Re: LCLVLCPlayer causes 'External SIGSEGV' exception
« Reply #3 on: February 25, 2016, 12:39:24 am »
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


 
« Last Edit: February 25, 2016, 12:41:33 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: LCLVLCPlayer causes 'External SIGSEGV' exception
« Reply #4 on: February 27, 2016, 04:18:36 pm »
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
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

Tibb

  • New Member
  • *
  • Posts: 26
Re: LCLVLCPlayer causes 'External SIGSEGV' exception
« Reply #5 on: March 08, 2016, 02:19:36 pm »
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.

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

  • New Member
  • *
  • Posts: 26
Re: LCLVLCPlayer causes 'External SIGSEGV' exception
« Reply #6 on: March 08, 2016, 07:37:13 pm »
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

  • Guest
Re: LCLVLCPlayer causes 'External SIGSEGV' exception
« Reply #7 on: January 27, 2019, 04:17:35 pm »
i am having the same problem
no improvement?

wp

  • Hero Member
  • *****
  • Posts: 11769
Re: LCLVLCPlayer causes 'External SIGSEGV' exception
« Reply #8 on: January 27, 2019, 05:03:05 pm »
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

  • Sr. Member
  • ****
  • Posts: 430
Re: LCLVLCPlayer causes 'External SIGSEGV' exception
« Reply #9 on: December 08, 2023, 02:39:13 am »
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

 

TinyPortal © 2005-2018