View Issue Details

IDProjectCategoryView StatusLast Update
0030838FPCPackagespublic2017-12-29 09:55
ReporterRafael PicancoAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSBunsenLabs (Debian8)OS VersionHydrogen
Product VersionProduct Buildtrunk@53204 
Target Version3.2.0Fixed in Version3.1.1 
Summary0030838: vlc components crashes IDE during design time
Descriptiongit-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@53204 4005530d-fff6-0310-9dd1-cebe43e6787f

IDE has epic crash after putting the TVLCMediaListPlayer on a form.
Steps To Reproduce1) Install vlc package;
2) go to the multimidia tab and choose the TVLCMediaListPlayer
3) place the component on a form
4) wait for the access violation dialog poping up.
5) press esc
6) see unpleasant things happenning with lazarus-ide
7) reopen the ide: lazvlc component should have change its status from "installed" to "selected but not installed (the green icon)".
8) rebuild the ide and make it happy again
Additional Information9) if the ide is, for some reason, still angry, try deleting the vlc components from the *.lfm file.
Tags1.6, 1.6.2
Fixed in Revision37848
FPCOldBugId
FPCTarget
Attached Files
  • vlc.pp.patch (1,135 bytes)
    Index: packages/libvlc/src/vlc.pp
    ===================================================================
    --- packages/libvlc/src/vlc.pp	(revision 37765)
    +++ packages/libvlc/src/vlc.pp	(working copy)
    @@ -473,7 +473,10 @@
     
     function TCustomVLCMediaListPlayer.GetPlaying: Boolean;
     begin
    -  Result:=libvlc_media_list_player_is_playing(Instance)<>0;
    +  if Assigned(FPlayer) then
    +    Result:=libvlc_media_list_player_is_playing(Instance)<>0
    +  else
    +    Result:=false;
     end;
     
     function TCustomVLCMediaListPlayer.GetInstance: plibvlc_media_list_player_t;
    @@ -495,7 +498,10 @@
     
     function TCustomVLCMediaListPlayer.GetState: libvlc_state_t;
     begin
    -  Result:=libvlc_media_list_player_get_state(Instance)
    +  if Assigned(FInstance) then
    +    Result:=libvlc_media_list_player_get_state(Instance)
    +  else
    +    Result:=libvlc_NothingSpecial;
     end;
     
     function TCustomVLCMediaListPlayer.GetVLC: TVLCLibrary;
    @@ -534,6 +540,7 @@
            libvlc_playback_mode_repeat);
     
     begin
    +  if not Assigned(Finstance) then Exit;
       if FPlayMode=AValue then Exit;
       FPlayMode:=AValue;
       libvlc_media_list_player_set_playback_mode(FInstance, M[AValue]);
    
    vlc.pp.patch (1,135 bytes)

Relationships

related to 0030762 closedMichael Van Canneyt FPC Hard-coded DLL path in libvlc.pp 
related to 0031541 resolvedFlorian FPC lazvlc package - Access Violation in control LCLVLCPlayer 
related to 0032030 resolvedMichl Lazarus Click on ActiveX Control (VLC, and others) on a form leads to Access Violation 

Activities

Rafael Picanco

2016-11-02 01:28

reporter  

Mattias Gaertner

2016-11-10 11:10

manager   ~0095731

Dropping TVLCMediaListPlayer does not crash here on Linux/Ubuntu x86_64 Laz 1.7, fpc 3.0.1. Maybe it was fixed in the meantime?

Michl

2017-12-20 00:07

reporter   ~0104869

Please move this issue to FPC! Patch added.

Michl

2017-12-20 00:13

reporter  

vlc.pp.patch (1,135 bytes)
Index: packages/libvlc/src/vlc.pp
===================================================================
--- packages/libvlc/src/vlc.pp	(revision 37765)
+++ packages/libvlc/src/vlc.pp	(working copy)
@@ -473,7 +473,10 @@
 
 function TCustomVLCMediaListPlayer.GetPlaying: Boolean;
 begin
-  Result:=libvlc_media_list_player_is_playing(Instance)<>0;
+  if Assigned(FPlayer) then
+    Result:=libvlc_media_list_player_is_playing(Instance)<>0
+  else
+    Result:=false;
 end;
 
 function TCustomVLCMediaListPlayer.GetInstance: plibvlc_media_list_player_t;
@@ -495,7 +498,10 @@
 
 function TCustomVLCMediaListPlayer.GetState: libvlc_state_t;
 begin
-  Result:=libvlc_media_list_player_get_state(Instance)
+  if Assigned(FInstance) then
+    Result:=libvlc_media_list_player_get_state(Instance)
+  else
+    Result:=libvlc_NothingSpecial;
 end;
 
 function TCustomVLCMediaListPlayer.GetVLC: TVLCLibrary;
@@ -534,6 +540,7 @@
        libvlc_playback_mode_repeat);
 
 begin
+  if not Assigned(Finstance) then Exit;
   if FPlayMode=AValue then Exit;
   FPlayMode:=AValue;
   libvlc_media_list_player_set_playback_mode(FInstance, M[AValue]);
vlc.pp.patch (1,135 bytes)

Michael Van Canneyt

2017-12-29 09:55

administrator   ~0105087

Applied patch, thank you very much. Apologies for the delay...

Issue History

Date Modified Username Field Change
2016-11-02 01:28 Rafael Picanco New Issue
2016-11-02 01:28 Rafael Picanco File Added: work-around-is-to-delete-lfm-vlc-object.png
2016-11-02 12:27 wp Relationship added related to 0030762
2016-11-10 11:10 Mattias Gaertner Note Added: 0095731
2016-11-23 20:08 Rafael Picanco Tag Attached: 1.6
2016-11-23 20:08 Rafael Picanco Tag Attached: 1.6.2
2017-03-15 09:44 Zoran Vučenović Relationship added related to 0031541
2017-06-17 22:20 Juha Manninen Relationship added related to 0032030
2017-12-20 00:06 Michl File Added: vlc.pp.patch
2017-12-20 00:07 Michl Note Added: 0104869
2017-12-20 00:11 Michl File Deleted: vlc.pp.patch
2017-12-20 00:13 Michl File Added: vlc.pp.patch
2017-12-20 12:12 Maxim Ganetsky Project Lazarus => FPC
2017-12-24 11:19 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-12-24 11:19 Michael Van Canneyt Status new => assigned
2017-12-24 11:21 Michael Van Canneyt Category LCL => Packages
2017-12-24 11:21 Michael Van Canneyt Product Version 1.6 =>
2017-12-29 09:55 Michael Van Canneyt Fixed in Revision => 37848
2017-12-29 09:55 Michael Van Canneyt Note Added: 0105087
2017-12-29 09:55 Michael Van Canneyt Status assigned => resolved
2017-12-29 09:55 Michael Van Canneyt Fixed in Version => 3.1.1
2017-12-29 09:55 Michael Van Canneyt Resolution open => fixed
2017-12-29 09:55 Michael Van Canneyt Target Version => 3.2.0