Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

My application is having issue with Windows Vista

Posted on 2008-06-23
8
Medium Priority
?
448 Views
Last Modified: 2013-11-20
I have multithreaded MFC application that uses secure socket. The application is running perfectly in XP. But abruptly crashes in Vista (though not always). It crashes when the application calls SSL_library_init. The stack trace shows this crashes at realloc/malloc deep within the SSL_library_init function. The weird thing about this issue is that I can only reproduce in release binary, never in debug or using some tool like boundschecker.
This made be think that this is a timing issue and I added two seconds delay before SSL_library_init, the issue disappeared. Suspecting the previous running instance has not released the socket, I observed the use of socket, but that doesnt looks likely.

I would like to get to the root of it and not able to get the lead. This application is not using more than 22MB, since its known that WIN32 only gets 32MB to work on Vista.
0
Comment
Question by:shuklasunil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 21854008
SSL_library_init must be called (and return :-) before *any* other OpenSSL functions.  Is there a chance that some worker thread or something is assuming that it has already been called?
0
 

Author Comment

by:shuklasunil
ID: 21864820
Than why doesn't it crashes when I add two seconds delay before SSL_library_init. In that case this other thread, that we think, calls OpenSSL before SSL_library_init in more likely be excuted before.

Also if I comment  SSL_library_init the code never crashes.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 21869879
I can't think of anything obvious.  
Are you using the latest version of OpneSSL?  After all, Vista is a relatively new OS... if bugs relating to it exist, they would be fixed onnly in recent versions.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:shuklasunil
ID: 21897629
I am using OpenSSL and I am having issue even with the latest version
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 21903117
The main reason that a Release build fails while a Debug build works is that some variable or buffer is not being initialized in code (the Debug version presets them to defined values).  So check all variables that you are passinging into the OpenSSL functions.
0
 

Author Comment

by:shuklasunil
ID: 22024804
Ok I am using the workaround of sleeping for few second.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 22226488
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question