mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   ntdll.dll error when starting Prime95 from a task scheduler action (https://www.mersenneforum.org/showthread.php?t=24235)

pokemonlover123 2019-03-28 19:36

No Dice
 
SFC returned no integrity violation and the no tray selection didn't do anything. I'll continue doing research.

pokemonlover123 2019-03-28 19:58

Okay so I found something weird. It seems that the process starts Prime95 fine, because it shows up in task manager and it disappears properly when I unplug (I have it set to stop when I switch back to battery power). The process starts, and it isn't a ghost process. However, the access violation keeps it from ever actually doing stuff. The icon never appears and it never does any calculations, and then it stops after about 10-15 seconds. All this leads me to think it's either a windows bug or a prime95 bug. Trying to come up with a way to debug.

Uncwilly 2019-03-28 22:15

Where are your data files for Prime95? If they are in Program Files, that might be your issue.

pokemonlover123 2019-03-28 22:32

All of the data files are in a folder on my desktop. The task scheduler has working dir set to that folder. All files are owned by my user account, which is also the account the task is run under.

pokemonlover123 2019-03-28 22:37

This is most likely a bug
 
At this point I'm convinced this is a bug and not a problem with my computer or my configuration. I think I'm gonna email a bug report to George Woltmann tomorrow (as specified on the bottom of the software download page) and get some developer input on this. Hopefully they can figure out what's actually going wrong.

Uncwilly 2019-03-28 22:39

He is here on the forum. He just might not have logged in yet.

pokemonlover123 2019-03-28 22:41

Oh yeah. He's the Prime95 account right? Hopefully he'll see this and offer input

Prime95 2019-03-29 02:12

You are well beyond Windows internals that I am familiar with.

My guess is that it may have something to do with being able to run prime95 as either a normal app or as a service (until Microsoft broke this cool feature several years ago).

The relevant code is:

[CODE]
GetStartupInfo (&sui);
if (sui.dwFlags == 0 || (sui.dwFlags & STARTF_USESHOWWINDOW)) {
return (WinMainCRTStartup ());
}
[/CODE]

If STARTF_USESHOWWINDOW is not set prime95 tries to run as a service.

Good luck!

sdbardwick 2019-03-29 03:33

I wonder if using the service version and putting [FONT="Courier New"]NET START[/FONT] and[FONT="Courier New"] NET STOP[/FONT] in batch files would work...

pokemonlover123 2019-03-29 09:45

[QUOTE=Prime95;512095]You are well beyond Windows internals that I am familiar with.

My guess is that it may have something to do with being able to run prime95 as either a normal app or as a service (until Microsoft broke this cool feature several years ago).

The relevant code is:

[CODE]
GetStartupInfo (&sui);
if (sui.dwFlags == 0 || (sui.dwFlags & STARTF_USESHOWWINDOW)) {
return (WinMainCRTStartup ());
}
[/CODE]

If STARTF_USESHOWWINDOW is not set prime95 tries to run as a service.

Good luck![/QUOTE]

I suppose that it might be that task scheduler doesnt pass STARTF_USESHOWWINDOW to the programs it runs! That may be causing prime95 to try to run as a service, causing the access violation. I've found a workaround for now, that doesnt require batch files. Have the task run cmd, then parameters are /C path/to/prine95

pokemonlover123 2019-03-29 13:18

What would happen if the flag STARTF_USESHOWWINDOWS wasn't set and the program still tried to run as a program rather than a service? Would building from source and changing that part to remove the check for that flag work? Or would another error occur from not being passed that flag?


All times are UTC. The time now is 18:31.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.