December 17, 2012 Re: Derelict SFML destructor crashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | > It's not the only way, but it's the easiest way.
What are some other ways? I am just curious.
Also, if we were able to know the size of the object the pointer is referring to, couldn't we then add it to the GC? It sounds like a pretty complicated way, but wouldn't that be a good way if it were possible?
|
December 18, 2012 Re: Derelict SFML destructor crashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jeremy DeHaan | On Monday, 17 December 2012 at 22:08:08 UTC, Jeremy DeHaan wrote: >> It's not the only way, but it's the easiest way. > > What are some other ways? I am just curious. You could use module destructors to cleanup at program exit and use RAII via struct destructors for short-lived objects. > > > Also, if we were able to know the size of the object the pointer is referring to, couldn't we then add it to the GC? It sounds like a pretty complicated way, but wouldn't that be a good way if it were possible? No, that's a bad idea. What if the C library you are using maintains some sort of internal bookkeeping related to the pointer? What if it keeps a copy of the pointer internally? If the GC collects your D-side pointer, how is the C library supposed to know it's time to cleanup everything associated with that pointer? |
December 18, 2012 Re: Derelict SFML destructor crashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Tuesday, 18 December 2012 at 01:24:43 UTC, Mike Parker wrote:
> No, that's a bad idea. What if the C library you are using maintains some sort of internal bookkeeping related to the pointer? What if it keeps a copy of the pointer internally? If the GC collects your D-side pointer, how is the C library supposed to know it's time to cleanup everything associated with that pointer?
I definitely hadn't considered that. I was mainly talking about the CSFML library, but I think even then trying to add the pointers into the GC would cause the problems you mention. Thanks for all the insight!
|
December 18, 2012 Re: Derelict SFML destructor crashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Monday, 17 December 2012 at 04:40:39 UTC, Mike Parker wrote:
> First, please take all Derelict trouble-shooting problems to the Derelict forums[1].
I'm posting here because I was unable to register with the derelict forum.
I filled out the registration form and press the register button, then a page opens with this message.
"An Error Has Occurred!"
I tried a few times being very careful not to make any mistakes.
I was going to post asking for a very small change to the derelict2 make process so that I could specify the compiler path. This is so I can pick a different version of dmd (or gdc, or ldc) as I have multiple versions installed (release and pre-release).
I modded the make files to allow me to specify the compiler by full path, so I'm OK for now, this is just a suggested improvement for you to consider.
I hope you can help me get registered. Thanks!
--rt
|
December 18, 2012 Re: Derelict SFML destructor crashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rob T | On Tuesday, 18 December 2012 at 07:36:09 UTC, Rob T wrote: > On Monday, 17 December 2012 at 04:40:39 UTC, Mike Parker wrote: >> First, please take all Derelict trouble-shooting problems to the Derelict forums[1]. > > I'm posting here because I was unable to register with the derelict forum. > > I filled out the registration form and press the register button, then a page opens with this message. > > "An Error Has Occurred!" Sorry, I've no idea what's going on there. > > I hope you can help me get registered. Thanks! If you email me the user name you want, I'll register an account for you. |
December 18, 2012 Re: Derelict SFML destructor crashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Tuesday, 18 December 2012 at 08:14:01 UTC, Mike Parker wrote:
> On Tuesday, 18 December 2012 at 07:36:09 UTC, Rob T wrote:
>> On Monday, 17 December 2012 at 04:40:39 UTC, Mike Parker wrote:
>>> First, please take all Derelict trouble-shooting problems to the Derelict forums[1].
>>
>> I'm posting here because I was unable to register with the derelict forum.
>>
>> I filled out the registration form and press the register button, then a page opens with this message.
>>
>> "An Error Has Occurred!"
>
> Sorry, I've no idea what's going on there.
>
>>
>> I hope you can help me get registered. Thanks!
>
> If you email me the user name you want, I'll register an account for you.
aldacron@gmail.com
|
December 18, 2012 Re: Derelict SFML destructor crashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rob T | On Tuesday, 18 December 2012 at 07:36:09 UTC, Rob T wrote:
> On Monday, 17 December 2012 at 04:40:39 UTC, Mike Parker wrote:
>> First, please take all Derelict trouble-shooting problems to the Derelict forums[1].
>
> I'm posting here because I was unable to register with the derelict forum.
>
> I filled out the registration form and press the register button, then a page opens with this message.
>
> "An Error Has Occurred!"
>
> I tried a few times being very careful not to make any mistakes.
>
> I was going to post asking for a very small change to the derelict2 make process so that I could specify the compiler path. This is so I can pick a different version of dmd (or gdc, or ldc) as I have multiple versions installed (release and pre-release).
>
> I modded the make files to allow me to specify the compiler by full path, so I'm OK for now, this is just a suggested improvement for you to consider.
>
> I hope you can help me get registered. Thanks!
>
> --rt
I had the same error actually. I just tried until it worked, which was the second time I tried.
|
December 18, 2012 Re: Derelict SFML destructor crashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rob T | On Tuesday, 18 December 2012 at 07:36:09 UTC, Rob T wrote:
> On Monday, 17 December 2012 at 04:40:39 UTC, Mike Parker wrote:
>> First, please take all Derelict trouble-shooting problems to the Derelict forums[1].
>
> I'm posting here because I was unable to register with the derelict forum.
>
> I filled out the registration form and press the register button, then a page opens with this message.
>
> "An Error Has Occurred!"
>
> I tried a few times being very careful not to make any mistakes.
>
I *think* I've got it sorted. If you try again, it should work.
|
December 18, 2012 Re: Derelict SFML destructor crashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Tuesday, 18 December 2012 at 13:47:43 UTC, Mike Parker wrote:
>
> I *think* I've got it sorted. If you try again, it should work.
I tried it again just now and it worked. Thanks!
--rt
|
Copyright © 1999-2021 by the D Language Foundation