Page 1 of 1
Runtime Error 217 - TRVCamera
Posted: Fri Feb 03, 2023 7:44 pm
by darvin
Hi,
I am using Delphi Alexandria 11.2 and RVMedia 9.3. I started a new Windows 32bit FMX project with some GUI elements. Compiled and started. Then I dropped the TRVCamera object, compiled again and the program stopped with "Runtime Error 217". It seems that the units fmxMRVMediaSource and fmxMRVCamera are responsible for this.
Starting in Debug/ Mode does not help - the error message comes right at the beginning before Application.Initialize.
Strange sidenote: the Demo projects work as expected with no error message.
Any suggestions?
Re: Runtime Error 217 - TRVCamera
Posted: Fri Feb 03, 2023 8:37 pm
by darvin
More strange behaviour
Added the fmxRVCamera unit to a new FMX project (Windows 32bits) and ran into the same error @start: Runtime Error 217
Does anyone have a clue on this?
Re: Runtime Error 217 - TRVCamera
Posted: Sat Feb 04, 2023 9:03 am
by Sergey Tkachenko
If demo projects work, there must be some difference it them. Maybe your project is compiled with runtime packages? Try to turn off (menu Project | Options, page Packages | Runtime packages, turn off "Link with runtime packages".
I think some exception happens before the Delphi exception system is initialized (in SysUtils unit), somewhere in initialization section of some RVMedia unit.
Probably third-party exception loggers, such as madExcept (
https://www.madshi.net/) may provide information allowing to find the reason for this problem.
Re: Runtime Error 217 - TRVCamera
Posted: Sat Feb 04, 2023 7:53 pm
by darvin
Thank you for these hints. I compared the project options between the working demo and a new project with a TRVCamera dropped on the canvas. There was no difference, neither were the runtime packages linked as you mentioned.
An interesting detail:
compiling the project under Windows 64bits works with no Runtime Error - but when I compile and start as a Windows 32bits program I get this error.
You have an idea?
UPDATE:
I searched for the initialization section and found some libraries to be loaded, mainly:
While the first three are located in C:\Windows\System32 and C:\Windows\SysWOW64, the latter two are totally missing.
Re: Runtime Error 217 - TRVCamera
Posted: Sat Feb 04, 2023 9:56 pm
by darvin
Update:
I analyzed the project by using your madExcept unit. It showed that the failure is in unit fmxMRVCamView: ERangeError
I have set a breakpoint in the initialization section, it seems that the original problem is in this command:
Code: Select all
Screen_Cursors[crSRV_MOVE_LEFT] := LoadCursor(HInstance, 'CURLEFT');
it seems that this unit is not able to load the resource file fmxMRVCamViewFM.res in Windows 32bits FMX env.
Re: Runtime Error 217 - TRVCamera
Posted: Sun Feb 05, 2023 6:29 pm
by Sergey Tkachenko
It's my fault, I forgot to remove this experimental code from the release
Please change all calls of for FireMonkey, from {$IFDEF FIREMONKEY} to {$ELSE} to
Code: Select all
Screen_Cursors[crSRV_MOVE_LEFT] := crArrow;
Screen_Cursors[crSRV_MOVE_RIGHT] := crArrow;
Screen_Cursors[crSRV_MOVE_UP] := crArrow;
Screen_Cursors[crSRV_MOVE_DOWN] := crArrow;
Screen_Cursors[crSRV_MOVE_LEFTDOWN] := crArrow;
Screen_Cursors[crSRV_MOVE_LEFTUP] := crArrow;
Screen_Cursors[crSRV_MOVE_RIGHTDOWN] := crArrow;
Screen_Cursors[crSRV_MOVE_RIGHTUP] := crArrow;
Screen_Cursors[crSRV_MOVE_CENTER] := crArrow;
Screen_Cursors[crSRV_MOVE_STOP] := crArrow;
FireMonkey does not support custom cursors.
Re: Runtime Error 217 - TRVCamera
Posted: Mon Feb 06, 2023 7:25 am
by darvin
Changed the code according to your suggestion - and it worked!
Thank you for your quick reply!