Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by ya_vanka »

I get Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure.
What do I do:
1. connect to rtsp://127.0.0.1:8554/stream.sdp to play video
2. stop video streaming (I use VLC if it matters) -> Access violation ... at avcodec-58.dll (
Access violation ... at avcodec-58.dll
Access violation ... at avcodec-58.dll
access_violation_error.jpg (252.14 KiB) Viewed 42025 times
)
3. stop RVCamera
4. start RVCamera again (video streaming is still stopped) -> Range check error in MD5Encode procedure (
Range check error in MD5Encode procedure
Range check error in MD5Encode procedure
range_check_error.jpg (214.07 KiB) Viewed 42025 times
)
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by ya_vanka »

The same issue with Range check error in MD5Encode procedure if I press Search camera button in Media Test demo application.

RVMedia v 7.4
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by Sergey Tkachenko »

MRVMD5.pas must be compiled without overflow checking.
It is fixed in the newer version of RVMedia by adding {$OVERFLOWCHECKS OFF} below the line {$I MRV_Defs.inc}.
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by ya_vanka »

I have {$OVERFLOWCHECKS OFF} directive after {$I MRV_Defs.inc}, but still get the error.

Could you please check it once again.

If it matters overflow checking is turned on in my project.
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by ya_vanka »

And I still get access violation in TRVMFFMPEG.DeinitDecode function
Access violation in TRVMFFMPEG.DeinitDecode function 2
Access violation in TRVMFFMPEG.DeinitDecode function 2
access_violation_error2.jpg (241.85 KiB) Viewed 41769 times
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by Sergey Tkachenko »

Can you tell me which string causes problem in MD5 function?
Please put a breakpoint on the call of MD5String from (MRVMD5.pas) and, store the value of S parameter somewhere, and if this string causes a range check error, send it to me.
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by ya_vanka »

You can see the string in Call Stack panel on the second screenshot.
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by ya_vanka »

May be there should be {$RANGECHECKS OFF} as well?
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by Sergey Tkachenko »

Unfortunately, the call stack does not show the value of the string parameter, it shows
RVMD5.MD5String(???)
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by ya_vanka »

Yes, but if we open the source code of md5() we will see that S is directly passed from md5() to MD5String() and the value of the parameter of md5() is shown in call stack, isn't it?

Code: Select all

function md5(S: String): String;
begin
  {$IFDEF MRVDELPHIXE8}
  Result := System.Hash.THashMD5.GetHashString(S);
  {$ELSE}
  Result := MD5Print(MD5String(S));
  {$ENDIF}
end;
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by Sergey Tkachenko »

As you can see, sometimes instead of the parameter value Delphi shows ??? in the call stack window, especially if the project is compiled with optimization and without stack frames (see compiler options for the project)
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by ya_vanka »

Yes, I see. But still we can get info from previous calls.

Is that enough to fix the problem or should I do smth else?

And what would you say about access violation errors?
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by Sergey Tkachenko »

Sorry, I overlooked the previous call.
Tomorrow I'll upload a new version of TRichView and then switch to RVMedia.
I'll try to review code to find that can go wrong in DeinitDecode. If I will not be able to find it, I'll need your assistance to reproduce this problem.
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by ya_vanka »

Are there any news?
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Access violation in TRVMFFMPEG.DeinitDecode function and Range check error in MD5Encode procedure

Post by Sergey Tkachenko »

Sorry, completing the new release took more time than I expected.
Now I am switching to RVMedia.

The first result: yes, range checking must be turned off for MRVMD5.pas
Add {$R-} to the beginning of this file.
Post Reply