It seems surprising memory growth would interact with embind. Can you
perhaps make a standalone testcase showing the issue?

- Alon


On Mon, Oct 6, 2014 at 1:18 AM, Sergey Solozhentsev <
[email protected]> wrote:

> Hello
>
> I have strange issue. I have embind
>
> struct VkUser
> {
> std::wstring userFirstName;
> std::wstring userLastName;
> std::string userId;
> std::string imageUrl;
> std::string birthdate;
> std::wstring country;
> std::wstring city;
> int gender;
> bool hasMobile;
> bool appUser;
> };
>
> void jsVkOnLogin(int res, VkUser user)
>
> EMSCRIPTEN_BINDINGS(vk)
> {
> value_object<VkUser>("VkUser")
> .field("userFirstName", &VkUser::userFirstName)
> .field("userLastName", &VkUser::userLastName)
> .field("userId", &VkUser::userId)
> .field("imageUrl", &VkUser::imageUrl)
> .field("birthdate", &VkUser::birthdate)
> .field("country", &VkUser::country)
> .field("city", &VkUser::city)
> .field("gender", &VkUser::gender)
> .field("hasMobile", &VkUser::hasMobile)
> .field("appUser", &VkUser::appUser)
> ;
>  register_vector<VkUser>("VectorVkUser");
>  function("jsVkOnLogin", jsVkOnLogin);
> function("jsOnVkFriends", jsOnVkFriends);
> }
>
> function jsVkOnLogin is often called with strange fields with type
> std::wstring. I think it because of enlarging memory. I saw message about
> memory enarlaging just before call of jsVkOnLogin. I switched off memory
> enlarging and everything became ok.
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to