1

Scenario of my problem is, I am working with three PCs , those are LIVE (OS Ver: Windows 2003 Server R2) , TEST (OS Ver: windows 2012 r2) and USER (OS Ver: Windows 7) PC respectively.

I have placed same applications in F-Drive of LIVE and TEST machines.

Trail - 1 : I mapped LIVE machine's F-Drive to USER PC and tried to run those Delphi6 application in USER PC. Ran well.

Trail - 2 : I mapped TEST machine's F-Drive to USER PC and tried to run those Delphi6 application in USER PC. Then only one application is running well and two of applications raising an error as "Runtime Error 217".

Thanks in advance.

Shamili Rani
  • 345
  • 1
  • 4
  • 12
  • `Runtime Error 207` seems to mean `missing dll`. Is your program using a `TClientDataSet` perhaps ? In that case you might be missing `midas.dll` on the machine where its not working – GuidoG Jun 06 '19 at 10:13
  • @GuidoG, but if you could observe, in Trail - 1 all of applications were working fine in USER PC with LIVE F-Drive. – Shamili Rani Jun 06 '19 at 11:01
  • Please provide a [minimal, complete, and verifiable example](https://stackoverflow.com/help/mcve) that shows where in the code the Runtime Error occurs. – mirtheil Jun 06 '19 at 11:28
  • It's a bad idea to run an executable from a network drive, see https://stackoverflow.com/questions/14378674/recommended-pe-header-settings-for-delphi-7-application-running-on-terminal-serv – Remko Jun 06 '19 at 12:41
  • What is your question? – Sertac Akyuz Jun 06 '19 at 14:29
  • 1
    @Remko: Nonsense. I have a Win2012 Server that acts as an application server for approximately 80 different LOB applications accessed by 50+ users and another 50 automated processes all day every day, running the executables from a common mapped network drive without any issues. – Ken White Jun 06 '19 at 18:25
  • 1
    @ken And I have had lots of clients over the years who have had issues with running executables from network drives. Just because you have not had such issues does not mean they don't exist. IMAGE_FILE_NET_RUN_FROM_SWAP does of course change the ground rules. – David Heffernan Jun 07 '19 at 20:46
  • 1
    @David: So how does that make Remko's comment true? It's not a *bad idea to run an executable from a network drive* in general. Nitpick elsewhere. – Ken White Jun 07 '19 at 20:48
  • 1
    @ken It is a bad idea to run from a network drive because netowkr drives are inherently less reliable than local drives. – David Heffernan Jun 07 '19 at 21:16
  • 1
    @David: Again, nonsense. A blanket statement that it's a *bad idea to run from a network drive* is simply wrong. Because problems *can* happen doesn't mean they'll always happen. I've got 30 years experience with app development on LANs, using Clipper and Delphi, using Netware and various Windows versions, and have seldom experienced issues (other than temporary ones, like when clueless IT staff rolled out a bad group policy that disabled Actvie Directory for a couple of hours until they fixed it). If your experience varies, maybe you're doing something wrong. – Ken White Jun 08 '19 at 00:18
  • @Ken If you have the PE flag IMAGE_FILE_NET_RUN_FROM_SWAP then you aren't really running from a network drive. Without that then a single intermittent network outage leads to page faults when bringing the code into the process. Perhaps you might contemplate why IMAGE_FILE_NET_RUN_FROM_SWAP exists in the first place. – David Heffernan Jun 08 '19 at 06:44
  • 1
    @David: I have never set that PE flag, and I don't know where you got the impression I had. I've never had the need to do so. I dont modify any PE flags at all from the defaults. With regards to why it exists, it may be necessary **if** you're experiencing network issues. Again, my objection to the comment is the *it's a bad idea*,which is just incorrect. It may be a bad idea for someone, but it's hardly a bad idea in general. If the flag was *required* to run from a network, that would be different, but it is not. – Ken White Jun 08 '19 at 18:27

2 Answers2

4

Runtime error 217 is thrown when an unhandled exception is raised before the exception handling framework is installed at startup, or after it is removed at shutdown.

As to why there is an unhandled exception you will need to do some debugging to find out.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Thanks - that "after it is removed at shutdown" comment led me to find an issue with otherwise untouched working code whose only change was that is now inside a thread. – GeoffM May 20 '20 at 16:42
1

if your application uses Type Library, make sure to add in project file {$R *.TLB} to have it linked to executable.

dima
  • 41
  • 8