Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3222042
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:56:45+00:00 2026-05-17T15:56:45+00:00

We currently have an automated system that runs as a service for processing satellite

  • 0

We currently have an automated system that runs as a service for processing satellite images. This service maintains a configuration file, in the configuration file we apply certain scripts(python) to covnert the input satellite imagery into a more usable format. The scripts call the required applications, for the conversion proces. The scripts themselves are invoked by the service via the system(“command”) (its written in c/c++). (the service uses the same account as the user).

We currently are trying to add support for another satelitte imagery format, the converter is a commerical .exe from ERDAS Imagine(importavhrr), (we do several of our own steps after in the script to change the projection).

The script works fine, up until it hits this:

argslist = ['importavhrr.exe', '-in', '%s' % infn, '-out', '%s' % tmpimg1, '-gui', 'FALSE', '-correct', '-flyingheight', '833', '-rect', 'gcp', gcpfn]
print "".join(argslist)
p = subprocess.Popen(argslist, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
print str(p.communicate())

What ends up happening now is, importavhrr.exe just sits there, and does nothing(according to taskmanager it sits there using 0 cpu usage, and the memory usage never changes). As if its waiting for some sort of user input. (Trying os.system, os.spawnv both yield same results) I am guessing some sort of gui element is ether popping up with a gui window of sorts. Closing the process from task manager, returns control to python.

Note: The -gui FALSE/false/0 argument is supposed to prevent a gui from poping up. However if the data is bad (i tested this manually by corrupting the data, and invoking via a script) an error window will popup showing the results.

When i run the script manually (same file, same working directory), it works fine…. the script even works when i invoke it manually using the same system function (its part of an inhouse library) as the service.

Also making the service invoke a batch file with just the importavhrr.exe and the enviroment variables also results in the importavhrr.exe hanging.

Service Sidewise:
– Uses the same user account as the one i logged in with
– The python script sets around 30-40 envrioment variables for ERDAS
– All the enviroment variables are properly set(dumping the enviroment variables when the script is first run, and comparing them to what i get when i print the messages)
– Passing the enviroment variables into the subprocess.Popen() yields the same results
– The company refuses to help us because they don’t support running programs from command line (however it works fine when a user does it, just not a service)
– Running the service in debug mode works fine.
– I HAVE rebooted the machine.

I am at a loss here, i think (and fear) that the ERDAS executable is making some sort of error message window popup, however i have looked, and looked and can’t find any sort of way to see what the service sees. I have been trying to figure this out for almost a week now so yeah.

EDIT

I grabbed the recommended Process Explorer, and looking at the stack thread i have this:

<snip ntoskrnl calls>
ntdll.dll!KiFastSystemCallRet
ntdll.dll!RtlSetLastWin32ErrorAndNtStatusFromNtStatus+0x301
kernel32.dll!GetModuleHandleA+0xdf

After waiting a few minutes, it changes to this:

<snip ntoskrnl calls>
ntdll.dll!KiFastSystemCallRet
USER32.dll!ScrollWindowEx+0x121d
USER32.dll!SoftModalMessageBox+0x6f8
USER32.dll!MessageBoxTimeoutW+0x1d9
USER32.dll!MessageBoxTimeoutW+0x5b
USER32.dll!MessageBoxTimeoutA+0x9c
USER32.dll!MessageBoxExA+0x1b
USER32.dll!MessageBoxA+0x45
elib.dll!esmg_GetLocalTapesDB+0x23b
elib.dll!esmg_LogMessageFunc+0x13a

Well it is trying to show a window, i presume. I don’t know anything about their behaviour to see what could be causing esmg_LogMessageFunc to crash. That function is part of their dev tools, which i have 0 access to. Furthermore i have never actually seen erdas log anything.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:56:46+00:00Added an answer on May 17, 2026 at 3:56 pm

    Trying to use any Windows API calls that assume access to the windowstation will cause problems in the security context of a service.

    You can use several of the tools from Sysinternals to diagnose this kind of thing. Specifically, consider using Process Explorer in place of Task Manager, and Process Monitor for tracing the activity of a specific process.

    Edit: Their new ProcDump tool can be used to get a core dump of any process with really powerful triggering. Several of the latest war stories on Mark Russinovich’s Blog take advantage of ProcDump to discover what really happened.

    For completeness, a good overview of “official” tools for debugging a service is at this KB article.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have an MS Access application that connects to a PostgreSQL database via
We currently have a company email server with Exchange, and a bulk email processing
I currently have a fairly robust server-side validation system in place, but I'm looking
We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we
In our current database development evironment we have automated build procceses check all the
I currently have speakers set up both in my office and in my living
I currently have an existing database and I am using the LINQtoSQL generator tool
I currently have heavily multi-threaded server application, and I'm shopping around for a good
I currently have a class and I'm trying to create an easy GUI to
I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.