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 » Developing U++ » U++ Developers corner » ASSERT when using ValueMap
Re: ASSERT when using ValueMap [message #47669 is a reply to message #47668] Tue, 28 February 2017 08:46 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Hi NilaT,

Unfortunately this is the reality of OSS: sometimes your issue gets addressed in 5 minutes, sometimes you wait half a year, sometimes it never gets fixed. One week wait time is often barely measurable.

Adding compilable test-cases which show the problem in isolation always help to get you problem in look at sooner rather than later camp.

But back to you problem: ValueMap.Add and RawToValue should be working fine in general since this is something you would instantly notice that is broken. So I would be inclined to say that the problem is what you are passing into RawToValue.

But to be sure, I did a quick test, with someVar being both int and double:
ValueMap result;
Value v = RawToValue(someVar);
result.Add("key1", v);


So it looks like indeed what you are passing into RawToValue causes the crash. Value implies some sort of copy and that might be the problem. Probably, if you use v in any way for reading it will crash.

To tell you more, I need to see the type of params.someVar, including the prototype of default, copy and move constructors and if there is any assign or move assign constructor. Is the class polymorphic?

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: C2280
Next Topic: Use zlib inside another library
Goto Forum:
  


Current Time: Sun May 12 17:41:12 CEST 2024

Total time taken to generate the page: 0.02192 seconds