|
George_George wrote: Does anyone have any conclusions or reference materials?
Have you seen here?
"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
|
|
|
|
|
Thanks DavidCrow,
I think the article only mentions the implementation details (in reference section) for insert/delete/update, not no prove or conclusion for the min/max number of nodes which will be changed (if they are still in the tree).
Any comments?
regards,
George
|
|
|
|
|
You could always step through the source 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
|
|
|
|
|
Thanks DavidCrow,
I just want to find some one sentence conclusion for the # of nodes changed (conclusion I mean somehting like, like # of external nodes are the # of internal nodes + 1 in a binary tree), and reading source code is slow.
regards,
George
|
|
|
|
|
George, if you need a formal proof you need to talk to this lady[^] who knows more about b+ trees than the bees themselves.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Thanks Matthew!
Why you refer her, she is the inventor for B+ Tree?
I just want to have some conclusion like the max/min time complexity of quick sort, I am surprised it is so hard to find and get an answer.
regards,
George
|
|
|
|
|
Hi all
What is wrong with my function? it keeps crashing when it gets to return.
bool CUpdateServiceModule::DoCheckForProductUpdates(ns1__Update oUpdateCode, RMproduct* prd)
{
iRet = m_pWebServiceSoap->__ns2__DoCheckForProductUpdates(pDoCheckForProductUpdates,pDoCheckForProductUpdatesResponse);
switch(iRet)
{
case SOAP_OK :
{
if(pDoCheckForProductUpdatesResponse->DoCheckForProductUpdatesResult)
{
pDoGetLatestProduct->productName = pDoCheckForProductUpdates->productName;
iRet = m_pWebServiceSoap->__ns2__DoGetLatestProduct(pDoGetLatestProduct,pDoGetLatestProductResponse);
switch(iRet)
{
case SOAP_OK :
{
RMUpdates* update = new RMUpdates;
break;
return true;
}
default:
{
Log(GetSoapError());
}
}
}
}
default:
{
Log(GetSoapError());
}
}
return false;
}
I am getting this error:
Unhandled exception at 0x004970b6 in UpdateService.exe: 0xC0000005:
Access violation reading location 0xcdcdcdd5.
Please Advise
thanks,
Jayjay
|
|
|
|
|
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
|
|
|
|