Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with visual studio works, but unable to do a proto begin --> m_handle=null #35

Open
Richju07 opened this issue Apr 27, 2022 · 3 comments

Comments

@Richju07
Copy link

Hi Team,

I have an issue when I m using the example project tiny_loopback build with Microsoft Visual Studio. Every time that I tried to start proto.begin(), it 's not possible to create the m_handle. It seems that program failed at :

/* Next we allocate some space for peer-related data */
ptr = TINY_ALIGN_BUFFER(ptr);
protocol->peers_count = peers_count;
protocol->peers = (tiny_fd_peer_info_t *)ptr;
protocol->next_peer = 0;
ptr += sizeof(tiny_fd_peer_info_t) * peers_count;

if ( ptr > (uint8_t *)init->buffer + init->buffer_size )
{
LOG(TINY_LOG_CRIT, "Out of provided memory: provided %i bytes, used %i bytes\n", init->buffer_size,
(int)(ptr - (uint8_t *)init->buffer));
return TINY_ERR_INVALID_DATA;
}

In tiny_fd.

The strange things, it's I have not the same behavior if I'm using clang ++ and ninja to build the project.

Is someone found this issue too?

Regards,
Julien R .

@lexus2k
Copy link
Owner

lexus2k commented May 2, 2022

Hi Julien,

Could you please provide complete example to reproduce the issue?
Is your platform Windows 64-bit based on x86 architecture?

@Richju07
Copy link
Author

Richju07 commented May 4, 2022

Hi Lexus2k,

I'm using visual studio 2017 to build in win 32. I'm using the version of the master branch.

Regards,
Julien R.

@lexus2k
Copy link
Owner

lexus2k commented May 5, 2022

I compiled the project in Visual Studio from master branch:

изображение

As you can see, the handle is not null.
Can you provide more details? For example, describe the parameters you use to launch tiny_loopback?

I believe, there is small issue with calculating of required buffer size. Can you please copy "Out of provided memory" message content from debug console? Don't forget to add debug flags before the compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants