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 » Problem with UPP_HEAP and multithread
Problem with UPP_HEAP and multithread [message #23304] Thu, 08 October 2009 10:58 Go to previous message
kov_serg is currently offline  kov_serg
Messages: 37
Registered: August 2008
Location: Russia
Member
I have serious problem with Upp memory allocation in multithreads. This problem dissapear if I don't use UPP_HEAP.

If I allocate, reallocate and free memory in different thread, I have strange bugs. If I force Defs.h "flagUSEMALLOC" problem doesn't occure. I think this is some kind of bug with heap monitor.

The simples example to reproduce this bug attached in file test.cpp (with option MT)

If I call th0(1) programm works fine.
But if argument th0(2) or more it will stop debugger in various places with out visible reason.
In real programm it cause unhandled exception when gui terminates or even fail on vector<>.clear inside GUI thread o_0.

hz1.png -- dubugger stop in unknown place without visible reason. (test.cpp)
hz2.png -- screen shot from other program when this problem occure. (real project) I have exceptions from delete operator. Usually from vector<>.clear(). Exception may occure on different delete operators. And behaviour is very unstable.

Upp version: SVN.643
  • Attachment: test.cpp
    (Size: 0.87KB, Downloaded 255 times)
  • Attachment: hz1.PNG
    (Size: 68.32KB, Downloaded 260 times)
  • Attachment: hz2.PNG
    (Size: 48.24KB, Downloaded 293 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: starting console app hidden
Next Topic: Splitting a string by a string?
Goto Forum:
  


Current Time: Wed May 08 05:07:00 CEST 2024

Total time taken to generate the page: 0.02685 seconds