Bug 19714 – Invalid memory operation in class destructor

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-03-03T13:58:30Z
Last change time
2019-03-03T20:53:25Z
Assigned to
No Owner
Creator
Seweryn

Attachments

IDFilenameSummaryContent-TypeSize
1733bug.dSample minimalistic code with runtime errortext/x-dsrc342

Comments

Comment #0 by seweryn.kaminski — 2019-03-03T13:58:30Z
Created attachment 1733 Sample minimalistic code with runtime error Output of attached example: core.exception.InvalidMemoryOperationError@src/core/exception.d(729): Invalid memory operation
Comment #1 by destructionator — 2019-03-03T14:29:26Z
That bug is in your code: you are allocating a new string while the garbage collector is running. The exception is telling you to not do that. I don't know where that's documented though...
Comment #2 by seweryn.kaminski — 2019-03-03T20:46:23Z
OK, thanks. I did not expect that behavior.
Comment #3 by seweryn.kaminski — 2019-03-03T20:51:18Z
Here are some information about the problem https://wiki.dlang.org/InvalidMemoryOperationError