01 December, 2009

That annoying “Source file not found” dialog

If you don’t have Enterprise edition of EurekaLog (the one, that comes with sources) – sometimes you may encounter “Source file not found” dialog like this:

What is this dialog? And what does it want from you?

Well, the short answer: you don’t have Enterprise version of EurekaLog and that’s why there is this dialog.

Long answer: actually, this is not EurekaLog, who wants that file, but rather Delphi's IDE (Debugger).

EurekaLog gather many information for the report. Some info (like call stack, assembler and CPU) requires operating in uncertain conditions. I.e. when you gather this type of information, you can encounter Access Violation, because you're trying to access invalid memory. When this happens, the executing code is EurekaLog's code. And you are aware that Delphi's debugger usually shows you a line, which raised exception, right? That's it. Exception is handled by EurekaLog, but debugger doesn’t care – he wants to show you the line.

The reason for this "Source File not Found" dialog is that you have professional version of EurekaLog, that comes without sources. Therefore, EurekaLog installs only set of precompiled DCUs on your machine. It is suffice to compile and run your application. The EurekaLog itself will be fully functional.

But the Delphi debugger is different beast. He can stops on exceptions. And when he do that – he want to show you something. And that something is the source code. When exception is occurred the most "hot place" is EurekaLog's hooking code. You do not have the source code of EurekaLog. So, it is unsurprising that debugger can't find it.

That's where the dialog comes from: Delphi debugger wants you to show source file to him. You can't do that, since you do not have source code at all. You should just push the "Ignore" button and continue your debug session. There may be other dialogs, but just continue to press "Ignore" and F9 – and in the end your application will continue work and EurekaLog’s dialog will pop up.

Of course, there is no such "Source File not Found" dialog if you will run your application without debugger – namely, on client's machines. That’s because this dialog is shown by Delphi, not your application nor EurekaLog.

You do have a several options:
  1. Continue to using it as it is – by pressing the "Ignore" button.

  2. Run your application as standalone rather then from IDE.

  3. Disable the debugger by unchecking "Integrated debugger" option box in the Tools/Debugger Options.

  4. Disable the "Stop on Delphi exception" option box in the Tools/Debugger Options on the "Language Exceptions" page (personally, I think that it is a best solution for you, since you have EurekaLog now to track all of your exceptions).

  5. Disable EurekaLog for development cycle and enable it for the release product.

  6. Try to find your default settings where this dialog won't be appear. Try to toggle "Use Debug DCUs" option, for example. Remember that any slightest change in code or memory layout may significantly change the situation.

  7. Buy a Enterprise version and get the full source code (and forget about these and similar problems forever).
Also you can send us a demo, where you have reproduced this problem (hard to do though). We'll take a look and may be will be able to add a few additional checks in EL code to avoid this kind of situation (there can be other problem place though).

P.S. Note, that this issue is not specific to EurekaLog, but rather to any component, library or other piece of code, that is distributed without source code.

No comments:

Post a Comment

You can use some HTML-tags like:

<a href="http://www.example.com/">Link</a>