tkd
tkd copied to clipboard
GDC fails
Building with GDC 4.9 on Arch x64 fails. The example segfaults of building in debug mode, and it gives OutOfMemory if built with release.
It seems an assertion is triggered in setTags at canvas.d:713
foreach (tag; tags)
{
assert(!tag.all!(isNumber), "Tags must not be entirely composed of numbers.");
}
Here's a backtrace:
(gdb) r
Starting program: /home/simendsjo/.dub/packages/tkd-master/build/example/example
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff3c49700 (LWP 2840)]
Program received signal SIGSEGV, Segmentation fault.
0x000000000043a514 in std.utf.__T6decodeTAyaZ.decode() (str=...,
index=@0x7fffffffd8c8: 0) at /usr/include/dlang/gdc/std/utf.d:958
958 if (str[index] < codeUnitLimit!S)
(gdb) bt
#0 0x000000000043a514 in std.utf.__T6decodeTAyaZ.decode() (str=...,
index=@0x7fffffffd8c8: 0) at /usr/include/dlang/gdc/std/utf.d:958
#1 0x000000000043a467 in std.array.__T5frontTyaZ.front() (a=...)
at /usr/include/dlang/gdc/std/array.d:647
#2 0x00000000004617bf in std.algorithm.__T4findS623std10functional40__T3notS29_D3std3uni8isNumberFNaNbNfwZbZ3notTAyaZ.find() (haystack=...)
at /usr/include/dlang/gdc/std/algorithm.d:4299
#3 0x0000000000461756 in std.algorithm.__T3allS29_D3std3uni8isNumberFNaNbNfwZbTAyaZ.all() (range=...) at /usr/include/dlang/gdc/std/algorithm.d:10206
#4 0x00000000004b4f10 in tkd.widget.canvas.CanvasItem.__T7setTagsTC3tkd6widget6canvas10CanvasItemZ.setTags() (this=..., tags=...) at source/tkd/widget/canvas.d:713
#5 0x000000000041e647 in tkd.widget.canvas.CanvasItem.init() (this=..., parent=...)
at source/tkd/widget/canvas.d:640
#6 0x00000000004222ac in tkd.widget.canvas.CanvasRectangle.init() (this=...,
parent=...) at source/tkd/widget/canvas.d:1251
#7 0x00000000004b01b8 in tkd.widget.canvas.Canvas.__T7addItemTC3tkd6widget6canvas6CanvasZ.addItem() (this=..., item=...) at source/tkd/widget/canvas.d:386
#8 0x000000000040c239 in main.Application.createCanvasPane() (this=...)
at source/example/example.d:328
#9 0x000000000040d36a in main.Application.initInterface() (this=...)
at source/example/example.d:454
#10 0x00000000004192e4 in tkd.tkdapplication.TkdApplication.__ctor() (this=...)
at source/tkd/tkdapplication.d:102
#11 0x000000000040d8ba in main.Application.__ctor() (this=...)
at source/example/example.d:13
#12 0x000000000040d8eb in D main (args=...) at source/example/example.d:495
#13 0x00000000004d127f in rt.dmain2._d_run_main() ()
#14 0x00000000004d174f in rt.dmain2._d_run_main() ()
#15 0x00000000004d1999 in rt.dmain2._d_run_main() ()
#16 0x00000000004d174f in rt.dmain2._d_run_main() ()
#17 0x00000000004d18c6 in _d_run_main ()
#18 0x00000000004071bb in main (argc=1, argv=0x7fffffffe418)
at /usr/include/dlang/gdc/__entrypoint.di:59
The library has not been tested at all with other compilers and i don't have them installed. If you could find the issue, your help would be most appreciated.
I don't actually use gdc or have a project in mind - it was just to test it. Looks great though! But I don't have an incentive to spend a lot of time on this. I guess someone else will jump on it soon. Sorry about that.
Ah ok, i'll leave this issue open and hope someone can take a look sometime.
I prefer to advise you to not use GDC anymore. They do a great job, but they do not follow current D references. The best replacement would certainly be DMD2 or LDC for performances. Just trying to compile the simplest code with GDC won't be successful.
Sorry if I hurt you ;)