PaslibVLC crash by open iconcache files?

This forum is about all development around libVLC.
HarryNak
New Cone
New Cone
Posts: 3
Joined: 15 Nov 2020 02:05

PaslibVLC crash by open iconcache files?

Postby HarryNak » 15 Nov 2020 02:09

Strange hanging problem with VLC player

In short: Executing a Fileopendialog, and closing it, seems to leave about 8 iconcache files open in a Windows application, and this causes hanging of VLCPlayer in that application.

I am using the VLCPlayer in an application written in Lazarus. Love the VLC player, but I get hanging and access violations now and then. I have already spent many many hours to circumvent these errors, and today I dived into this problem again.

I noticed more errors with a particular set of GoPro files and I examined if I could play them without error in \PasLibVlc_3.0.7\DemoPasLibVlcMediaListPlayer. This worked fine. You can switch and scroll through the files easily without crashing. Then I ported this exct code to my own application but still got hanging...But then, I found out that it only happened after a Fileopendialog had been executed...

After placing an Opendialog in \PasLibVlc_3.0.7\DemoPasLibVlcMediaListPlayer the effect can be noticed. After just opening the dialog, and just pressing cancel, you can see with the Nirsoft tool 'OpenedFilesView'* that several files are still opened by the demoapplication. When now scrolling through the MP4 files, a crash is imminent.

By the way: I have also checked if a standard application leaves these iconcache files opened, and yes Notepad also show this behavior.


Questions are: where to go with this question, does this sound logical and how to solve the problem...

*Tool used to see opened files: https://www.nirsoft.net/utils/opened_files_view.html

Regards

HarryNak
New Cone
New Cone
Posts: 3
Joined: 15 Nov 2020 02:05

Re: PaslibVLC crash by open iconcache files?

Postby HarryNak » 16 Nov 2020 02:18

Reply to myself, and as an update
As idotic as I am, I am trying to solve this problem....My idea was simply close these files, if they cause the problem.
Destroying or freeing, or whatever on the TOpendialog does not work.. And more experiments definitely leads me to the standpoint that after opening a filedialog, the VLCPlayer crashes at certain unknown moments....
So, how to find the still remaining open files?
Based on the code of RRUZ (https://stackoverflow.com/questions/157 ... pplication) I wrote a simple application with an opendialog that can be executed or not.
This is the difference of open handles between:
Situation 1: before opening the openfiledialog
Situation 2: after opening the openfiledialog, and closing by selecting Cancel

Next step will be to try to close some of these handles (at least the file handles) and see if that stabilises the crashing of the VLCPlayer...No time more now, too tired after so many hours behind the screen....
Regards!

Edit: there was more, but did not fit in message...
So here are the results:
Situation 1:
Handle: 320 Name: \Sessions\1\BaseNamedObjects typenum: 3 typename: Directory
Handle: 352 Name: \Sessions\1\Windows\WindowStations\WinSta0 typenum: 24 typename: WindowStation
Handle: 356 Name: \Default typenum: 25 typename: Desktop
Handle: 360 Name: \Sessions\1\Windows\WindowStations\WinSta0 typenum: 24 typename: WindowStation
Handle: 568 Name: \Sessions\1\BaseNamedObjects\SM0:1344:168:WilStaging_02 typenum: 17 typename: Mutant
Handle: 580 Name: \Sessions\1\BaseNamedObjects\SM0:1344:168:WilStaging_02_p0 typenum: 19 typename: Semaphore
Handle: 768 Name: \BaseNamedObjects\[CoreUI]-PID(1344)-TID(13500) 44a697c9-5e40-4b76-b16a-5646c69ca68e typenum: 46 typename: ALPC Port
Handle: 796 Name: \Sessions\1\BaseNamedObjects\SM0:1344:64:WilError_02_p0 typenum: 19 typename: Semaphore
Handle: 800 Name: \Sessions\1\BaseNamedObjects\SM0:1344:64:WilError_02 typenum: 17 typename: Mutant


Situation 2:

Handle: 320 Name: \Sessions\1\BaseNamedObjects typenum: 3 typename: Directory
Handle: 352 Name: \Sessions\1\Windows\WindowStations\WinSta0 typenum: 24 typename: WindowStation
Handle: 356 Name: \Default typenum: 25 typename: Desktop
Handle: 360 Name: \Sessions\1\Windows\WindowStations\WinSta0 typenum: 24 typename: WindowStation
Handle: 568 Name: \Sessions\1\BaseNamedObjects\SM0:1344:168:WilStaging_02 typenum: 17 typename: Mutant
Handle: 580 Name: \Sessions\1\BaseNamedObjects\SM0:1344:168:WilStaging_02_p0 typenum: 19 typename: Semaphore
Handle: 768 Name: \BaseNamedObjects\[CoreUI]-PID(1344)-TID(13500) 44a697c9-5e40-4b76-b16a-5646c69ca68e typenum: 46 typename: ALPC Port
Handle: 796 Name: \Sessions\1\BaseNamedObjects\SM0:1344:64:WilError_02_p0 typenum: 19 typename: Semaphore
Handle: 800 Name: \Sessions\1\BaseNamedObjects\SM0:1344:64:WilError_02 typenum: 17 typename: Mutant
Handle: 1052 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_idx.db!rwWriterMutex typenum: 17 typename: Mutant
Handle: 1056 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_idx.db!rwWriterEvent typenum: 16 typename: Event
Handle: 1060 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_16.db!dfMaintainer typenum: 17 typename: Mutant
Handle: 1064 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_32.db!dfMaintainer typenum: 17 typename: Mutant
Handle: 1068 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_48.db!dfMaintainer typenum: 17 typename: Mutant
Handle: 1072 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_96.db!dfMaintainer typenum: 17 typename: Mutant
Handle: 1076 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_256.db!dfMaintainer typenum: 17 typename: Mutant
Handle: 1080 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_768.db!dfMaintainer typenum: 17 typename: Mutant
Handle: 1084 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_1280.db!dfMaintainer typenum: 17 typename: Mutant
Handle: 1088 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_1920.db!dfMaintainer typenum: 17 typename: Mutant
Handle: 1092 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_2560.db!dfMaintainer typenum: 17 typename: Mutant
Handle: 1096 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_sr.db!dfMaintainer typenum: 17 typename: Mutant
Handle: 1100 Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_wide.db!dfMaintainer

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: PaslibVLC crash by open iconcache files?

Postby mfkl » 16 Nov 2020 04:07

Please share full libvlc logs, and crash logs, and code. I don't really know paslibvlc and can't find their recent code online.
https://mfkl.github.io

HarryNak
New Cone
New Cone
Posts: 3
Joined: 15 Nov 2020 02:05

Re: PaslibVLC crash by open iconcache files?

Postby HarryNak » 16 Nov 2020 18:09

Hi mfkl,
Someone else in the Lazarus forum tested on my issue, but he found no problems. Since he was on a higher version of Lazarus and fpc, I updated my software as well. This seems to have solved the problem! So, I'm happy.
FYI: PaslibVLC is a wrapper around the VLCplayer that you can use in a.o. in Delphi and Lazarus. (https://prog.olsztyn.pl/paslibvlc/)
Thanks for your interest, greetings, Leo


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 19 guests