U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ Developers corner » ASSERT when using ValueMap
Re: ASSERT when using ValueMap [message #47684 is a reply to message #47651] Tue, 07 March 2017 00:58 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
[quote title=NilaT wrote on Tue, 21 February 2017 16:23]Hello everyone, I've got a nice little "soft crash" again, may you can help me?
It happens when I try to "Add" something to a Value Map.
So my code basically looks like this:
Params params = HandleParams(param1, param2); // Params is a struct which contains some Strings, some ints, and a Time Variable
ValueMap result;
result.Add("key1", RawToValue(params.someVar));

[/code]

OK, found it. Problem like was that params.someVar is likely of some type that is supported as "basic Value" (int, double, int64, String etc...).

E.g. this crashes:

int x;
ValueMap result;
result.Add("key1", RawToValue(x));


That is why nobody noticed this yet, as there is not reason to use RawToValue.

result.Add("key1", x);


works just fine. Anyway, fixed....

Mirek

P.S.: Sorry for the delay, got a bit distracted after last release.

[Updated on: Tue, 07 March 2017 01:00]

Report message to a moderator

 
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 Jun 21 16:36:58 GMT+2 2026

Total time taken to generate the page: 0.00690 seconds