On Thu, 2019-01-03 at 07:52 +0000, Nicholas Wilson via Digitalmars-d-learn wrote: > On Thursday, 3 January 2019 at 06:25:46 UTC, Russel Winder wrote: > > So I have a D program that used to work. I come back to it, > > recompile it, and: > > > > [...] > > __GI___libc_free (mem=0xa) at malloc.c:3093 > > You've tried to free a pointer that, while not null, was derived > from a pointer that was, i.e. an offset to a field of a struct. > > A backtrace would help a lot, otherwise it really is just > guessing.
Sorry about that, fairly obvious that the backtrace is needed in hindsight. :- ) #0 __GI___libc_free (mem=0xa) at malloc.c:3093 #1 0x000055555558f174 in dvb_file_free (dvb_file=0x5555555a1320) at dvb_file.d:282 #2 0x000055555558edcc in types.File_Ptr.~this() (this=...) at types.d:83 #3 0x0000555555574809 in channels.TransmitterData.__fieldDtor() (this=<error reading variable: Cannot access memory at address 0xa>) at channels.d:144 #4 0x000055555556aeda in channels.TransmitterData.__aggrDtor() (this=...) at channels.d:144 #5 0x000055555556ab53 in D main (args=...) at main.d:33 Which indicates that the destructor is being called before the instance has been constructed. Which is a real WTF. -- Russel. =========================================== Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
signature.asc
Description: This is a digitally signed message part