Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

tango Threads crash (0xE0440001)

Moderators: kris

Posted: 04/30/09 22:18:41 Modified: 04/30/09 22:20:20

Hi,

I'm using the current release for Windows (tango 0.99.8 dmd 1.041) and every time a thread ends the program exits with the returncode -532414463 (0xE0440001). Example code:

import tango.core.Thread;
import tango.io.Console;


int main(char[][] args)
{
    Thread t = new Thread(&test);

    Cout("one").newline;
    t.start();
    Thread.sleep(1);
    t.join();
    Cout("three").newline;

    return 0;
}

void test()
{
    Cout("two").newline;
}

output:

one
two

Process returned -532414463 (0xE0440001)   execution time : 2.000 s
Press any key to continue.

I'm using Windows XP pro SP3

Author Message

Posted: 05/01/09 00:42:14

could be because Cout/Stdout are not thread-safe

Posted: 05/01/09 04:54:08

no it also crashes without the console stuff.

Posted: 05/01/09 15:11:30

What prints the info text when the program exits?

Posted: 05/01/09 22:43:17

cb_console_runner.exe - The codeblocks IDE

Posted: 05/02/09 10:43:45

I think you will have to debug this a bit yourself. The example works on linux, and threading in general works very well with Tango.

Posted: 05/02/09 15:26:17

it has something to do with the -debug and the -g switch. When I compile without those it works.

Posted: 05/07/09 02:52:50

it has something to do with the -debug and the -g switch. When I compile without those it works.

This may be another issue, but the -g switch resulted in a compilation error on Linux (Kubuntu 9.04).

% ~/tango-0.99.8-bin-linux-dmd.1.041/bin/dmd t.d
% ~/tango-0.99.8-bin-linux-dmd.1.041/bin/dmd -g t.d
/home/miura/tango-0.99.8-bin-linux-dmd.1.041/bin/../lib/libtango-base-dmd-d.a(aaA.o): In function `_d_assocarrayliteralT':
/home/larsivi/code/d/tango/tags/releases/0.99.8/lib/compiler/dmd/rt/aaA.d:884: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/home/miura/tango-0.99.8-bin-linux-dmd.1.041/bin/../lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_newarrayiT':
/home/larsivi/code/d/tango/tags/releases/0.99.8/lib/compiler/dmd/rt/lifetime.d:275: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/home/miura/tango-0.99.8-bin-linux-dmd.1.041/bin/../lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_newarraymT':
/home/larsivi/code/d/tango/tags/releases/0.99.8/lib/compiler/dmd/rt/lifetime.d:331: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/home/miura/tango-0.99.8-bin-linux-dmd.1.041/bin/../lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_newarraymiT':
/home/larsivi/code/d/tango/tags/releases/0.99.8/lib/compiler/dmd/rt/lifetime.d:385: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/home/miura/tango-0.99.8-bin-linux-dmd.1.041/bin/../lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_arrayliteralT':
/home/larsivi/code/d/tango/tags/releases/0.99.8/lib/compiler/dmd/rt/lifetime.d:1000: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
collect2: ld returned 1 exit status
--- errorlevel 1
%

-- MIURA Masahiro echochamber@gmail.com

Posted: 07/26/09 14:53:05

I have the same problem as Dubhead on Kubuntu Jaunty (9.04). I'm using Tango 0.99.8 with dmd 1.041. If I'm using the -g switch it does not compile (application is simple hello world). Without the -g switch it compiles and runs fine. Below is the error message:

--- errorlevel 1
/usr/local/bin/../lib/libtango-base-dmd-d.a(aaA.o): In function `_d_assocarrayliteralT':
/home/larsivi/code/d/tango/tags/releases/0.99.8/lib/compiler/dmd/rt/aaA.d:884: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/usr/local/bin/../lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_newarrayiT':
/home/larsivi/code/d/tango/tags/releases/0.99.8/lib/compiler/dmd/rt/lifetime.d:275: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/usr/local/bin/../lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_newarraymT':
/home/larsivi/code/d/tango/tags/releases/0.99.8/lib/compiler/dmd/rt/lifetime.d:331: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/usr/local/bin/../lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_newarraymiT':
/home/larsivi/code/d/tango/tags/releases/0.99.8/lib/compiler/dmd/rt/lifetime.d:385: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/usr/local/bin/../lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_arrayliteralT':
/home/larsivi/code/d/tango/tags/releases/0.99.8/lib/compiler/dmd/rt/lifetime.d:1000: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
collect2: ld returned 1 exit status

Any help would be appreciated as I'm new to D and I'm trying to set up an usable development environment (should i open a new thread?).

Thanks

Posted: 07/26/09 15:32:00 -- Modified: 07/26/09 15:32:53 by
larsivi

Quite a lot of things have happened since 0.99.8, so if any of you would like to try trunk, that would be more helpful. If you still have issues then, please create a ticket.

And also upgrade to a newer compiler such as DMD 1.045/46 (neither of those will work with Tango 0.99.8).

Posted: 07/26/09 15:50:11

I suppose I have to build from sources and get the compiler from the digital mars site (I used the one that comes bundled with the tango archive) ... I'll give it a try

Thanks

Posted: 07/26/09 16:09:13

Yes, unfortunately I think the snapshots have fallen behind also on Linux lately.

Posted: 07/26/09 16:27:46

Well, the build process went pretty smooth but I get the same kind of error when trying to compile with the -g switch. Here's the new error output:

/usr/local/lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_newarrayiT':
/home/mac/work/tango/trunk/lib/compiler/dmd/rt/lifetime.d:275: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/usr/local/lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_newarraymT':
/home/mac/work/tango/trunk/lib/compiler/dmd/rt/lifetime.d:331: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/usr/local/lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_newarraymiT':
/home/mac/work/tango/trunk/lib/compiler/dmd/rt/lifetime.d:385: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/usr/local/lib/libtango-base-dmd-d.a(lifetime.o): In function `_d_arrayliteralT':
/home/mac/work/tango/trunk/lib/compiler/dmd/rt/lifetime.d:991: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
/usr/local/lib/libtango-base-dmd-d.a(aaA.o): In function `_d_assocarrayliteralT':
/home/mac/work/tango/trunk/lib/compiler/dmd/rt/aaA.d:884: undefined reference to `_D5tango4stdc6stdarg6va_endFPvZv'
collect2: ld returned 1 exit status
--- errorlevel 1

Posted: 07/26/09 17:56:28

Add an import to tango.stdc.stdarg somewhere. Your build tool should pick it up. I don't think it's compiled into the tango lib by default..

I don't know why I'd make a new scripting language. I mean, I might as well just draw some lines in the sand with a stick.

Posted: 07/26/09 21:12:27

JarrettBillingsley wrote:

Add an import to tango.stdc.stdarg somewhere. Your build tool should pick it up. I don't think it's compiled into the tango lib by default..

It doesn't work.

I also looked at the files that exhibit the error and all of them have that import. The symbol that is missing is the va_end() function with the debug information (the name of the function is mangled for debug purposes; at least that's how it looks to me) which is a builtin ?! (from the dmd compiler side I guess; someone please educate me on that matter); but I'm completely new to D and I do not have enough knowledge of the language to figure it out yet. I'll try at least to understand what's happening. Until then ... no debugging for me

Thanks

Posted: 08/05/09 11:30:37

Could you check if the issue is still present with the actual trunk version (the build process changed quite substantially). If it is still present then it might be a forgotten file in the build process... and I will look into it.

Posted: 08/26/09 19:23:51 -- Modified: 08/26/09 19:32:07 by
Huii -- Modified 5 Times

I was having the same problem than JustMax?. I compiled the last revision from the SVN and everything works fine now.