Jump to content
  • Advertisement
Sign in to follow this  
Ahmet

Starting exe with Windows Services

This topic is 2555 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi;

I have a window service starts a program which produce report files. There is no problem when files are produced in my computer. But when I mapped a folder from my network to include files my program will produce, my program gives "debug asertion: map set iterator not dereferencable " exception.
I dont encounter same problem when tracing my code to produce to network folders.
Anyone have an idea what would be the cause of this problem?
I think it would be about network privileges but I am not sure. If is this problem comes from privileges how can I overcome this issue?

Regards.

Share this post


Link to post
Share on other sites
Advertisement

Anyone have an idea what would be the cause of this problem?
[/quote]
It looks like the problem is a bug in your code - specifically you are using a std::map or std::set iterator incorrectly.


I think it would be about network privileges but I am not sure.
[/quote]
It does not look to be the case. That said, once you fix this bug you might find privilege problems anyway.

[hr]

What is probably happening is the new mapping is causing a branch of your code to execute you haven't tested. A classic example might be you are testing a small number of files, but when you try it for "real" on a larger number you trigger some undefined behaviour.

I'd recommend copying all the files locally and seeing if you can still reproduce the issue. Also try attaching a debugger to the process, or starting it from a debugger.

Share this post


Link to post
Share on other sites


I'd recommend copying all the files locally and seeing if you can still reproduce the issue. Also try attaching a debugger to the process, or starting it from a debugger.

[/quote]
I cant see my exe on process explorer of VS2008 because whenever it start I dont have enough time to select it for debug attaching.
I trigger windows service with changing database. Listener Windows service start my exe andsend parameters to it. I a few seconds I see the exception.
How can debug my code when started by window service?

Share this post


Link to post
Share on other sites
I found the problem, as you said it is about a case when occur on strange situation. I writed a line to sleep 30 seconds and attached the exe and waited to see results. At the end I see the problem it is about misuse of maps..
Thank you very much [color="#284b72"]rip-off.
I use this site because I have always find the solution , there is great people ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!