Task scheduler program FAILS when "Run whether user is logged on or not" but PASSES when "Run only when user is logged on" and

47 Views Asked by At

PROBLEM: So basically I'm running a python script that only works if I'm running it on my task scheduler set to "Run only when user is logged on" and fails when run on "Run whether user is logged on or not".

Showing general configuration

FINDINGS:

  • The error code I get in the Last Run Result when it fails is 0xC0000005.
  • I know the path is right cause I copied the file within the code while debugging and it copied the file to another location (proving it's a valid path)
  • I don't think it's actually throwing an error. I surrounded my entire python code with a try catch, and if it fails within the try the catch has code that'll write the error to a textfile and send a notification to my phone - but it never does that. It just fails at that line.
  • The code where it fails is specifically the .load_state line:
plugin_path = path.join(getcwd(), 'Plugins', 'Vital')
states_path = path.join(plugin_path, 'States')
plugin_dlls = glob.glob(f"{plugin_path}/*.dll")

engine = daw.RenderEngine(44100, 512)
engine.set_bpm(bpm)
    
plugin = engine.make_plugin_processor("my_plugin", plugin_dlls[0])
state_files = listdir(states_path)

chosen_state_file = state_files[random.randint(0, len(state_files)-1)]
plugin.load_state(str(path.join(states_path, chosen_state_file)))

GENERAL INFORMATION:

HYPOTHESIS:

  • There's something wrong with the actual Dawdreamer package. If so, how could I verify this?
0

There are 0 best solutions below