Recent

Author Topic: [CLOSED] I can't debug a program that uses PasLibVLC in the IDE.  (Read 8893 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 3078
Re: I can't debug a program that uses PasLibVLC in the IDE.
« Reply #30 on: June 01, 2021, 11:15:20 am »
However, if my guess (timing) is right, gdbserver might still help. Gdb reports to the IDE via pipes, that takes time (especially on Win). GdbServer talks to gdb over tcp. That may or may not make a difference.

It can also help with ownership issues. My notes say

Code: Pascal  [Select][+][-]
  1. (*  *   It may be debugged by being run like                                    *)
  2. (*                                                                              *)
  3. (*      # gdbserver :2345 ./Watchxxx-x86_64-linux-gtk2                          *)
  4. (*                                                                              *)
  5. (*      with the Lazarus IDE debugger backend set to remote/gdbserver.          *)
  6.  

Note that in this case any parameters should be on the command line https://bugs.freepascal.org/view.php?id=37581

Remember to switch the IDE back to ordinary gdb when done :-)

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

pcurtis

  • Hero Member
  • *****
  • Posts: 636
Re: I can't debug a program that uses PasLibVLC in the IDE.
« Reply #31 on: June 01, 2021, 12:02:57 pm »
So far I've tried MarkMLI's, and the program still doesn't play videos.
Windows 10
Laz 2.0.10
FPC 3.2.0

MarkMLl

  • Hero Member
  • *****
  • Posts: 3078
Re: I can't debug a program that uses PasLibVLC in the IDE.
« Reply #32 on: June 01, 2021, 12:09:07 pm »
So far I've tried MarkMLI's, and the program still doesn't play videos.

Which: both standalone debugger and gdbserver+IDE?

If so I think it points very much to a general libvlc problem rather than something to do with the IDE or underlying tools, and I think it's something you could usefully write up in the wiki.

MarkMLl


Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MarkMLl

  • Hero Member
  • *****
  • Posts: 3078
Re: I can't debug a program that uses PasLibVLC in the IDE.
« Reply #33 on: June 03, 2021, 09:30:56 pm »
I've just checked that with program using the LCL etc., and also with he main VLC binary without obvious problems although I didn't go looking for a file to play.

It would be interesting if, in fact, it's possible to run vlc under gdb but not a program using libvlc.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

pcurtis

  • Hero Member
  • *****
  • Posts: 636
Re: I can't debug a program that uses PasLibVLC in the IDE.
« Reply #34 on: June 04, 2021, 08:34:13 am »
Guys, I have been side tracked the last couple of days,
but my result is this :
PasLibVlc (at least for me), is unusable. Without out of the box debugging (solving debugging issues for one component / application is not worth the effort) it is unusable, I also found that I can't seek in .ts files (not sure if this is a VLC or PasLibVLC problem). With these issues I decided to stick with MPV.

At least the issue has been half solved and I thank you for your assistance.

I will mark this post as CLOSED not SOLVED.
Windows 10
Laz 2.0.10
FPC 3.2.0

MarkMLl

  • Hero Member
  • *****
  • Posts: 3078
Re: [CLOSED] I can't debug a program that uses PasLibVLC in the IDE.
« Reply #35 on: June 04, 2021, 09:07:15 am »
OK, but for completeness (and the benefit of anybody who gets here via Google) this appears to be something to do with libvlc, and does not highlight a fault in the Lazarus IDE or the Pascal wrapper.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Fred vS

  • Hero Member
  • *****
  • Posts: 2388
    • StrumPract is the musicians best friend
Re: [CLOSED] I can't debug a program that uses PasLibVLC in the IDE.
« Reply #36 on: July 03, 2021, 10:18:35 pm »
I can't use PasLibVlc in the IDE. When I run the exe  out of the IDE all is OK.
This goes for the demo apps or my own.

Is there a setting I am missing?

Both VLC and PasLibVlc are the latest versions.

I noted that it is extremely difficult to debug a application that deals with audio (or video + audio).
This because debugging "eats" latency with his analysis and so disturbs the flow of samples to sound card.

To resume, debug is OK to detect errors but the result in your loudspeakers may be bad.
« Last Edit: July 03, 2021, 10:22:30 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

MarkMLl

  • Hero Member
  • *****
  • Posts: 3078
Re: [CLOSED] I can't debug a program that uses PasLibVLC in the IDE.
« Reply #37 on: July 03, 2021, 11:05:16 pm »
I noted that it is extremely difficult to debug a application that deals with audio (or video + audio).
This because debugging "eats" latency with his analysis and so disturbs the flow of samples to sound card.

OTOH I think OP's said (although he's not explicitly confirmed) that he was able to run without breakpoints set, and even though Martin makes the point that the debugger silently intercepts various events I'd not have thought it would make that much difference on a modern CPU.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018