Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Pick problems
Pick problems [message #24533] Sat, 23 January 2010 10:14 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
I get sometimes 'Pick broken semantic' error in my app and, as it is multithreaded, to locate them is becoming a nightmare.
Just today I've got one which I can't locate, and I'm thinking about some way to check if a container get picked just when it is.
So, it would be possible to add to containers a debug function like

BreakOnPick(bool brk = true);


which, if enabled, would throw a BREAK in debug mode, so the code that breaks pick semantics can be located more easy ?

Another stuff.... IsPicked() is missing from ArrayMap, because it's missing from AIndex template class.
Adding this to it :
bool IsPicked(void) const { return key.IsPicked() || hash.IsPicked(); }


Solves the issue.

Ciao

Max

Re: Pick problems [message #24535 is a reply to message #24533] Sat, 23 January 2010 14:03 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Attached patched core files (Vcont.h, Map.h and Index.h) helps a lot adding a PickBreak(bool) method.
In order to activate Pick detection, is enough to do

MyContainer.PickBreak(true);


then each time the container gets picked a debugger breakpoint is triggered, making easy to backtrace the pick event.

Ciao

Max
Re: Pick problems [message #24561 is a reply to message #24535] Sun, 24 January 2010 14:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I did not liked the implementation - it changes the sizeof() of container and does not care about release mode.

So I have created my own - only one breakpoint possible, but it should be enough...
Re: Pick problems [message #24565 is a reply to message #24561] Sun, 24 January 2010 16:57 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Yep, my implementation was just a quick-and-dirty solution to my problem. What's your implementation usage ?
Do you mean that you can activate the breakpoint just for a single container type or instance on each run ?

Ciao

Max
Re: Pick problems [message #24566 is a reply to message #24565] Sun, 24 January 2010 17:00 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mdelfede wrote on Sun, 24 January 2010 10:57

Yep, my implementation was just a quick-and-dirty solution to my problem. What's your implementation usage ?
Do you mean that you can activate the breakpoint just for a single container type or instance on each run ?

Ciao

Max



Single instance, yes.
Previous Topic: Little .ini reading request
Next Topic: Bug?: Command line arguments passing problem (Windows)
Goto Forum:
  


Current Time: Thu Apr 18 04:17:24 CEST 2024

Total time taken to generate the page: 0.01450 seconds