Re: Issue with socket recieve

2021-01-22 Thread Mike Parker via Digitalmars-d-learn

On Wednesday, 20 January 2021 at 21:31:54 UTC, Tim wrote:

Hi all,

I'm having a really terrible bug that seemed to come from 
nowhere and is really hard to narrow down.


You may be hitting this issue:

https://issues.dlang.org/show_bug.cgi?id=7349

FWIW, popped onto the radar in the most recent Foundation meeting.


Re: Issue with socket recieve

2021-01-22 Thread Imperatorn via Digitalmars-d-learn

On Thursday, 21 January 2021 at 03:30:50 UTC, Tim wrote:
On Thursday, 21 January 2021 at 03:21:41 UTC, Adam D. Ruppe 
wrote:

On Wednesday, 20 January 2021 at 21:31:54 UTC, Tim wrote:

[...]

[snip]
generate a core.exception.InvalidMemoryOperationError that I 
can't catch.



None of this makes much sense given the code you provided. 
InvalidMemoryOperationError (the scariest thing in D btw, such 
a pain to debug) is usually caused by a class destructor 
somewhere, and none of those should be trying to resolve those 
files.


Do you have any destructors defined?


You seem like a rather switched-on fellow. Would you be able to 
send me an email at some point at tim.oli...@tutanota.com. I 
have a proposition for you.


On Discord fyi


Re: Issue with socket recieve

2021-01-20 Thread Tim via Digitalmars-d-learn

On Thursday, 21 January 2021 at 03:35:05 UTC, Adam D. Ruppe wrote:

On Thursday, 21 January 2021 at 03:24:13 UTC, Tim wrote:

No, I don't. It should be all garbage collected right?


Yeah, but that's where the problem comes.

Note that by destructor, I mean *any* function in your code 
called `~this() {}`. If there are any and they call a memory 
allocation function, that's how you get the 
InvalidMemoryOperationError.


I'd have to look up if there's any other causes of that...


I am aware of this, there is absolutely no ~this in *my* code


Re: Issue with socket recieve

2021-01-20 Thread Adam D. Ruppe via Digitalmars-d-learn

On Thursday, 21 January 2021 at 03:24:13 UTC, Tim wrote:

No, I don't. It should be all garbage collected right?


Yeah, but that's where the problem comes.

Note that by destructor, I mean *any* function in your code 
called `~this() {}`. If there are any and they call a memory 
allocation function, that's how you get the 
InvalidMemoryOperationError.


I'd have to look up if there's any other causes of that...




Re: Issue with socket recieve

2021-01-20 Thread Tim via Digitalmars-d-learn

On Thursday, 21 January 2021 at 03:21:41 UTC, Adam D. Ruppe wrote:

On Wednesday, 20 January 2021 at 21:31:54 UTC, Tim wrote:
Unable to open 'recv.c': Unable to read file 
'/build/glibc-ZN95T4/glibc-2.31/sysdeps/unix/sysv/linux/recv.c' (Error: Unable to resolve non-existing file '/build/glibc-ZN95T4/glibc-2.31/sysdeps/unix/sysv/linux/recv.c').

[snip]
generate a core.exception.InvalidMemoryOperationError that I 
can't catch.



None of this makes much sense given the code you provided. 
InvalidMemoryOperationError (the scariest thing in D btw, such 
a pain to debug) is usually caused by a class destructor 
somewhere, and none of those should be trying to resolve those 
files.


Do you have any destructors defined?


You seem like a rather switched-on fellow. Would you be able to 
send me an email at some point at tim.oli...@tutanota.com. I have 
a proposition for you.


Re: Issue with socket recieve

2021-01-20 Thread Tim via Digitalmars-d-learn

On Thursday, 21 January 2021 at 03:21:41 UTC, Adam D. Ruppe wrote:

On Wednesday, 20 January 2021 at 21:31:54 UTC, Tim wrote:
Unable to open 'recv.c': Unable to read file 
'/build/glibc-ZN95T4/glibc-2.31/sysdeps/unix/sysv/linux/recv.c' (Error: Unable to resolve non-existing file '/build/glibc-ZN95T4/glibc-2.31/sysdeps/unix/sysv/linux/recv.c').

[snip]
generate a core.exception.InvalidMemoryOperationError that I 
can't catch.



None of this makes much sense given the code you provided. 
InvalidMemoryOperationError (the scariest thing in D btw, such 
a pain to debug) is usually caused by a class destructor 
somewhere, and none of those should be trying to resolve those 
files.


Do you have any destructors defined?


No, I don't. It should be all garbage collected right?

Hahahaha, about 50% of my troubles are 
InvalidMemoryOperationError! It's so frustrating. This whole 
project has been a nightmare


Re: Issue with socket recieve

2021-01-20 Thread Adam D. Ruppe via Digitalmars-d-learn

On Wednesday, 20 January 2021 at 21:31:54 UTC, Tim wrote:
Unable to open 'recv.c': Unable to read file 
'/build/glibc-ZN95T4/glibc-2.31/sysdeps/unix/sysv/linux/recv.c' 
(Error: Unable to resolve non-existing file 
'/build/glibc-ZN95T4/glibc-2.31/sysdeps/unix/sysv/linux/recv.c').

[snip]
generate a core.exception.InvalidMemoryOperationError that I 
can't catch.



None of this makes much sense given the code you provided. 
InvalidMemoryOperationError (the scariest thing in D btw, such a 
pain to debug) is usually caused by a class destructor somewhere, 
and none of those should be trying to resolve those files.


Do you have any destructors defined?