This is not as much a programming question, as it is a configuration thing.
I’ve got an EXE that was written in Delphi. Not mine. I can run it directly from a shortcut, and it runs fine. If I try to set up a Scheduled Task, it crashes every time with an
Access Violation at [hex address] in module [file]. Read of address
00000000
This happens whether I run the task, or let the schedule run the task.
Now the fun part.
This happens on Windows 7 32bit.
It runs fine in the task scheduler on WindowsXP.
I’ve enable DEP, and set compatibility to XP sp3. I set the Scheduler service to Interact With Desktop even though it isn’t really available in 7.
The user that is set up for the task is the same user I am logged in as.
The program is set to run only when user is logged in, as it has a UI component
I am willing to try anything, as the vendor responsible for this only tells me It should work fine and all the other items that we use from them do run with out any crashes.
EDIT : Adding some requested information:
1. If it was a service, it wouldn’t need Task Scheduler. Is it regular GUI that does bar code scanning of documents stored in a database.
2. The vendor is as stuck as I am. And is unwilling to put in a lot of effort to fix this. We’re moving away from them this year so it may end up as a moot point.
The error address in your message (
Read of address 00000000) is a null pointer exception. In Delphi, it typically happens when you try to access an object instance (for instance, a component) before it’s created.Other than that, you’ve given no information that can be used to help you solve the problem. You’ve provided no information about the type of application (service, regular GUI application, console application) other than the fact it is written in Delphi, has a UI component (which services prior to Vista were allowed to have) and that it’s being started by Scheduler. You’ve information about what it does, or any other details about the application itself, which might be helpful.
Send the vendor a screen capture of the error dialog, and ask them if it looks like it “works fine”. Recommend that they invest in an exception handling package like
MadExceptorEurekaLogthat will give them a stack trace in a readable format that you can send them so they can use it to track down the problem. If they’re not willing to do that, find a new vendor.