|
are you acquainted with the debugger! if not know it better. may be there is some uninitialized memory that you are using or you may be accessing some out-of-bounds variable.
what happens when you debug?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Did you check the Call Stack?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
By looking at code i cant tell you exactly why its crashing but i can point out few things.
1. Your function will never return true.
monsieur_jj wrote: break;
return true;
due to break following statement will never get executed.
2.
monsieur_jj wrote: RMUpdates* update = new RMUpdates;
You are just creating new instance and doing nothing with it?? How are you going to access this instance after your function returns. (If at all you need).
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
This is the whole code I apologize
bool CUpdateServiceModule::DoCheckForProductUpdates(ns1__Update oUpdateCode, RMproduct* prd)
{
int iRet = SOAP_ERR;
_ns1__DoCheckForProductUpdates *pDoCheckForProductUpdates;
_ns1__DoCheckForProductUpdatesResponse *pDoCheckForProductUpdatesResponse;
pDoCheckForProductUpdates = InstantiateCheckUpdate();
pDoCheckForProductUpdatesResponse = InstantiateCheckUpdateResponse();
USES_CONVERSION;
pDoCheckForProductUpdates->productName = new std::string(W2A(prd->m_Name.c_str()));
pDoCheckForProductUpdates->productVersion = new std::string(W2A(prd->m_VersionNo.c_str()));
pDoCheckForProductUpdates->serialNumber = new std::string(W2A(prd->m_SerialNo.c_str()));
pDoCheckForProductUpdates->siteCode = new std::string(W2A(prd->m_SiteCode.c_str()));
_ns1__DoGetLatestProduct *pDoGetLatestProduct;
_ns1__DoGetLatestProductResponse *pDoGetLatestProductResponse;
pDoGetLatestProduct = InstantiateGetProduct();
pDoGetLatestProductResponse = InstantiateGetProductResponse();
iRet = m_pWebServiceSoap->__ns2__DoCheckForProductUpdates(pDoCheckForProductUpdates,pDoCheckForProductUpdatesResponse);
switch(iRet)
{
case SOAP_OK :
{
if(pDoCheckForProductUpdatesResponse->DoCheckForProductUpdatesResult)
{
pDoGetLatestProduct->productName = pDoCheckForProductUpdates->productName;
pDoGetLatestProduct->productVersion = pDoCheckForProductUpdates->productVersion;
pDoGetLatestProduct->serialNumber = pDoCheckForProductUpdates->serialNumber;
pDoGetLatestProduct->siteCode = pDoCheckForProductUpdates->siteCode;
iRet = m_pWebServiceSoap->__ns2__DoGetLatestProduct(pDoGetLatestProduct,pDoGetLatestProductResponse);
switch(iRet)
{
case SOAP_OK :
{
RMUpdates* update = new RMUpdates;
update->prdName = prd->m_Name.c_str();
update->nameVer = std::wstring(A2W(pDoGetLatestProductResponse->DoGetLatestProductResult->Version->c_str()));
update->link.append(DOWNLOADLINK);
update->link.append(std::wstring(A2W(pDoGetLatestProductResponse->DoGetLatestProductResult->Link->c_str())));
update->savePath = SetDestination(update->link.c_str());
prd->updateList->push_back(update);
return true;
}
default:
{
Log(GetSoapError());
}
}
}
}
case SOAP_CLI_FAULT :
{
return false;
}
case SOAP_SVR_FAULT :
{
return false;
}
case SOAP_TAG_MISMATCH :
{
return false;
}
case SOAP_TYPE :
{
return false;
}
case SOAP_SYNTAX_ERROR :
{
return false;
}
case SOAP_NO_TAG :
{
return false;
}
case SOAP_IOB :
{
return false;
}
case SOAP_MUSTUNDERSTAND :
{
return false;
}
default:
{
Log(GetSoapError());
}
}
return false;
}
|
|
|
|
|
I rechecked it and it seems that it crashes when i pushback
|
|
|
|
|
This is where i get the error:
void resize(size_type _Newsize, _Ty _Val)
{
if (size() < _Newsize)
_Insert_n(end(), _Newsize - size(), _Val);
else if (_Newsize < size())
erase(begin() + _Newsize, end());
}
size_type size() const
{
return (_Myfirst == 0 ? 0 : _Mylast - _Myfirst);
}
"Unhandled exception at 0x004970b6 in UpdateService.exe: 0xC0000005: Access violation reading location 0xcdcdcdd5."
any advise?
I apologize for not posting the whole code as i believe it was too long.
Thanks,
jayjay
|
|
|
|
|
monsieur_jj wrote: it keeps crashing when it gets to return.
As there are two, which return are you referring to?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
DavidCrow wrote: As there are two, which return are you referring to?
Can only be the last one since the first is unreachable due to the break-statement.
This also means that the function always returns false...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: Can only be the last one since the first is unreachable due to the break-statement.
This also means that the function always returns false...
I know. I couldn't think of any other way to say, "What's with this code?"
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
DavidCrow wrote: I know. I couldn't think of any other way to say, "What's with this code?"
Well, the answer could be "there's a lot with this code".
Memory leak, unreachable code....
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: unreachable code....
i like this type of coding [ ]
|
|
|
|
|
ThatsAlok like this type of coding
Well, if the code doesn't execute it certainly cannot do anything wrong.
Playing it safe, Alok?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: Playing it safe, Alok? [Big Grin]
Life all about playing safe .. atleast no body find the bug there
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Hello,
I have an application that produces a blue screen.
Do you have any idea of how can I output in a log file debug information of which line in source-code is being executed? Are there any debug-libraries that do this?
Then I could trace just before the Blue-Screen which line caused the fault. I am now using a classical fprintf/fflush method, but it does not look nice in code: I would need some "hook" or something.
Best regards.
|
|
|
|
|
are you making a call to a device driver function ?
Our Philosophy, Mohammed Baqir Al Sadr
|
|
|
|
|
system always dump memory as i close pogram window giving message driver locked pages in process
modified on Monday, August 11, 2008 3:33 AM
|
|
|
|
|
|
is there any API in linux through which we can set static IP address or connect to DHCP
|
|
|
|
|
Wrong forum dude!
With respect to markkuk's reply.
Sorry Pal. The word "linux" forced me to think so.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
modified on Monday, August 11, 2008 8:37 AM
|
|
|
|
|
pls suggest where i can post my query
|
|
|
|
|
|
A negative vote? I did something wrong?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
modified on Monday, August 11, 2008 5:18 AM
|
|
|
|
|
The IP address is set either using the socket() API with a RTM_NEWADDR message through a RTNETLINK socket, or with the ioctl() API and a SIOCSIFADDR command. DHCP is handled by userspace client programs that set the IP address by one of the previously mentioned APIs.
|
|
|
|
|
Hi All,
When database server abruptly goes down, Client hangs in ExecuteSql statement.
I know only the remote(database) port number.
Is there any way to identify the local port that is connected to the remote port and terminate it?
Any help is appreciated.
Thanks in advance.
Regards, Selva
Selva
|
|
|
|
|
Yes, it can be done by following the instructions in this prior post[^].
Best Wishes,
-David Delaune
|
|
|
|