Board index » delphi » Help - Same Exe started from the Explorer and started inside Delphi are different

Help - Same Exe started from the Explorer and started inside Delphi are different

All last day I am debugging a real strange error. When I start my
project within Delphi, I get an access violation in some method of a
class. I can't say what really happens: Debugging into the Create-method
of that class I can break at the begin statement. When I go further I am
gone...
Another strange thing: When I start that exe from the explorer
everything is okay!

I also tried to use that class in a new project without anything else
and it works even when I start it from Delphi.

So I really don't know what else to try. Any hints - any experiences?

Thanks so much
Hans-Peter  
--
+--------------------------------------------------------------+
| Hans-Peter Haberlandner       mailto:h...@technodat.co.at    |
| Technodat CAD/CAM             Phone: +43 - (0)662-454944-670 |
| Jakob Haringer-Strasse 6      FAX:   +43 - (0)662-454944-9   |
| A-5020 Salzburg                                              |
+--------------------------------------------------------------+

 

Re:Help - Same Exe started from the Explorer and started inside Delphi are different


Hans-Peter:

Quote
In article <3496A268.3...@technodat.co.at>, Hans-Peter Haberlandner wrote:
> All last day I am debugging a real strange error. When I start my
> project within Delphi, I get an access violation in some method of a
> class. I can't say what really happens: Debugging into the Create-method
> of that class I can break at the begin statement. When I go further I am
> gone...
> Another strange thing: When I start that exe from the explorer
> everything is okay!

If your Create method is less than about 30 lines, could you post it?

Regards
Ralph (TeamB)
Herrsching, Germany, Tue, 16 Dec 1997 19:08 +0100

Re:Help - Same Exe started from the Explorer and started inside Delphi are different


I've experienced something of the same trying to call a dll written i C++
from Delphi 3.0. I got access violation when running my app. through
Delphi, but it all works fine when I run the app. from elsewhere!! I
stepped through the code inside Delphi and it all works fine. When I run
without stepping I get access violation!!

I moved the project to another computer and all works fine. (Both computers
are Pentium 133 with 32MB RAM)
--
Edgar Vorland
{Remove X and Y from my mailadress, this is to avoid spawn}
Xevorl...@Yreadmatre.no

Hans-Peter Haberlandner <h...@technodat.co.at> wrote in article
<3496A268.3...@technodat.co.at>...

Quote
> All last day I am debugging a real strange error. When I start my
> project within Delphi, I get an access violation in some method of a
> class. I can't say what really happens: Debugging into the Create-method
> of that class I can break at the begin statement. When I go further I am
> gone...
> Another strange thing: When I start that exe from the explorer
> everything is okay!

> I also tried to use that class in a new project without anything else
> and it works even when I start it from Delphi.

> So I really don't know what else to try. Any hints - any experiences?

> Thanks so much
> Hans-Peter  
> --
> +--------------------------------------------------------------+
> | Hans-Peter Haberlandner       mailto:h...@technodat.co.at    |
> | Technodat CAD/CAM             Phone: +43 - (0)662-454944-670 |
> | Jakob Haringer-Strasse 6      FAX:   +43 - (0)662-454944-9   |
> | A-5020 Salzburg                                              |
> +--------------------------------------------------------------+

Re:Help - Same Exe started from the Explorer and started inside Delphi are different


Hans-Peter,

sounds like an error at the place where you create the offending object,
not an error in the constructor. If now use the syntax

  anobj.Create...

replace it with

  anobj := someclass.Create...

The first syntax calls the constructor as a normal method on an already
existing object instance, the second creates a new object instance and
assigns its reference to the anObj variable.

Peter Below (TeamB)  100113.1...@compuserve.com)

Other Threads