Avatar of reynaldio
reynaldio
Flag for Indonesia asked on

Run Error

hi,

i have this strange error when trying to run my project.
"Project C:\Workspace\test.exe faulted with message: 'access violation at 0x40015e61: write of address 0x00040f70'.
When I delete the executables, then the error is gone. But after i run the program for several times, the error comes back.
I don't know which part of my code raise this error. It happens at this line "Application.Run"
Please help :(

I attach my cpu windows.

Regards,

Reynaldi
rterror.gif
Delphi

Avatar of undefined
Last Comment
reynaldio

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
2266180

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
reynaldio

ASKER
Hi,

I'm still waiting the error to come. it's happen at random time.
I use many bpl for my application. do i need to set different image base to each package? could that be the problem?

Regards,

Reynaldi
Geert G

If it's random... Do you have threads running, timers running, database querying ???
Threads might cause AV when accessing non thread safe vars.  
Timers might be accessing variables not initialised.
Database querying might query databases with connection problems.
Running it from Delphi.  Did you use the "stop on Delphi exceptions" with the integrated debugger.
When the AV appears you can sometimes call the stack with Ctrl-F3 to see what routing caused the AV.
2266180

>> do i need to set different image base to each package?

no :)
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
reynaldio

ASKER
Hi, i just got that faulted error again . but it's not av this time. I use madExcept 3 but it couldn't catch the exception. I run for several times the error keep coming, until one time the error just gone. I didn't change anything, all i do is press F9.
Could this be a virus in my comp?

Reynaldi
rterror3.gif
reynaldio

ASKER
sorry last picture was bad.
rterror3.gif
2266180

did you enable madexcept for your project? menu-project - madexcept settings and tick enable madexcept checkbox.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
reynaldio

ASKER
>>Threads might cause AV when accessing non thread safe vars.  
Timers might be accessing variables not initialised.
Database querying might query databases with connection problems.
Running it from Delphi.  Did you use the "stop on Delphi exceptions" with the integrated debugger.
When the AV appears you can sometimes call the stack with Ctrl-F3 to see what routing caused the AV.

-------------------------------------------------------------------------------------------------------------

i do have timers, but i've checked and i didnt find anything wrong with it.
I couldn't press Ctrl-F3 and yes i use "stop on Delphi exceptions".
As soon as i compile and run, delphi showed  "Debugger Fault Notification"  window and the CPU window.
I also sometimes get Invalid pointer exception when i stop the application.

This is so strange cause i never got this error since last week.
i only did minor modification.
MerijnB

please also give a try with eurekalog (www.eurekalog.com), ciuly mentioned it as well, it might give you more information.
reynaldio

ASKER
Hi guys, i installed eurekalog and error just disappeared. I have no idea what happened.
Anyways, thank you all for your comments. I'll post another question if error comes again (hopefully not) :)
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
reynaldio

ASKER
thanks alot ciuly :)