Jump to page: 1 2
Thread overview
Totally bizarre error, requesting assistance
Sep 19, 2014
Koz Ross
Sep 19, 2014
deadalnix
Sep 19, 2014
Vladimir Panteleev
Sep 19, 2014
Koz Ross
Sep 19, 2014
Koz Ross
Sep 19, 2014
ketmar
Sep 19, 2014
ketmar
Sep 19, 2014
Koz Ross
Sep 19, 2014
ketmar
Sep 19, 2014
Koz Ross
Sep 19, 2014
Dan Olson
Sep 19, 2014
Iain Buclaw
Sep 19, 2014
Koz Ross
Sep 19, 2014
Koz Ross
Sep 19, 2014
Iain Buclaw
Sep 19, 2014
Kagamin
September 19, 2014
I don't know if this is the right place to ask, but I figured it was worth a try. Basically, I'm getting totally bizarre behaviour from my code, which I have put in a repo at https://gitorious.org/tournament-tree/tournament-tree/source/545460fb9d760b6bfa5bc74deb7b69d79ec70541:

To replicate the error, simply run 'make profile' from the project directory. It should fail (claiming an enforcement error on node.d, line 50). Then, go to tournament.d, and uncomment line 33. Then, try 'make profile' again, and it won't have the same issue. I've been working all day to try and isolate the source of the problem, across multiple machines, and I've had no luck. This is the most isolation I've managed.

I would really appreciate any and all help, as this is something that totally baffles me. I know this is a lot of code, and it's probably quite hideous, but it would help me a lot if someone could at least suggest as to where the source of the problem lies.

I already am aware that the failure is caused by an overflow, but its source is completely unclear, and I never get overflows when that one writeln statement in tournament.d is executed (hence my confusion).

I'm running Manjaro GNU/Linux, and my gdc version is 4.9.1. I have a 64-bit OS.
September 19, 2014
You should try dustmite to reduce the problem further: https://github.com/CyberShadow/DustMite
September 19, 2014
On Friday, 19 September 2014 at 04:46:56 UTC, Koz Ross wrote:
> I don't know if this is the right place to ask, but I figured it was worth a try. Basically, I'm getting totally bizarre behaviour from my code, which I have put in a repo at https://gitorious.org/tournament-tree/tournament-tree/source/545460fb9d760b6bfa5bc74deb7b69d79ec70541:

I can't reproduce this. It's probably related to GDC. Can you try a different D compiler?

If you can't reproduce the problem with DMD, you should post in the GDC group:
http://forum.dlang.org/group/D.gnu

Have you heard of DustMite? It can automate the process of reducing your code to a minimal test case:

https://github.com/CyberShadow/DustMite/

> To replicate the error, simply run 'make profile' from the project directory. It should fail (claiming an enforcement error on node.d, line 50).

There is no enforce call on node.d line 50. Is the uploaded source code correct, or is this part of the problem?
September 19, 2014
On Friday, 19 September 2014 at 04:55:34 UTC, Vladimir Panteleev wrote:
> On Friday, 19 September 2014 at 04:46:56 UTC, Koz Ross wrote:
>> I don't know if this is the right place to ask, but I figured it was worth a try. Basically, I'm getting totally bizarre behaviour from my code, which I have put in a repo at https://gitorious.org/tournament-tree/tournament-tree/source/545460fb9d760b6bfa5bc74deb7b69d79ec70541:
>
> I can't reproduce this. It's probably related to GDC. Can you try a different D compiler?
>
> If you can't reproduce the problem with DMD, you should post in the GDC group:
> http://forum.dlang.org/group/D.gnu
>
> Have you heard of DustMite? It can automate the process of reducing your code to a minimal test case:
>
> https://github.com/CyberShadow/DustMite/
>
>> To replicate the error, simply run 'make profile' from the project directory. It should fail (claiming an enforcement error on node.d, line 50).
>
> There is no enforce call on node.d line 50. Is the uploaded source code correct, or is this part of the problem?

Hi Vladimir,

First of all, thanks for the prompt response. The enforce call in question is actually on line 55, and looks like this:

enforce(value > 0)

I added a few clarifying comments to the file, and I guess it changed the line number from what it was originally.

I will try and compile this under dmd and see if I have the same problem. I haven't heard of DustMite, but I'll also look into that. Thanks!
September 19, 2014
On Friday, 19 September 2014 at 04:55:34 UTC, Vladimir Panteleev wrote:
> On Friday, 19 September 2014 at 04:46:56 UTC, Koz Ross wrote:
>> I don't know if this is the right place to ask, but I figured it was worth a try. Basically, I'm getting totally bizarre behaviour from my code, which I have put in a repo at https://gitorious.org/tournament-tree/tournament-tree/source/545460fb9d760b6bfa5bc74deb7b69d79ec70541:
>
> I can't reproduce this. It's probably related to GDC. Can you try a different D compiler?
>
> If you can't reproduce the problem with DMD, you should post in the GDC group:
> http://forum.dlang.org/group/D.gnu
>
> Have you heard of DustMite? It can automate the process of reducing your code to a minimal test case:
>
> https://github.com/CyberShadow/DustMite/
>
>> To replicate the error, simply run 'make profile' from the project directory. It should fail (claiming an enforcement error on node.d, line 50).
>
> There is no enforce call on node.d line 50. Is the uploaded source code correct, or is this part of the problem?

Following up on this, under DMD, I get the enforcement failure on line 55 with and without the print statement. Now I'm even more confused.
September 19, 2014
On Fri, 19 Sep 2014 04:55:32 +0000
Vladimir Panteleev via Digitalmars-d <digitalmars-d@puremagic.com>
wrote:

> Have you heard of DustMite? It can automate the process of reducing your code to a minimal test case: https://github.com/CyberShadow/DustMite/
i think that we must have DustMite on the main D page. it's a great tool, yet most people can find it only by accident or by reading posts of other people who mention it.


September 19, 2014
On Fri, 19 Sep 2014 04:46:55 +0000
Koz Ross via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

> To replicate the error, simply run 'make profile' from the project directory. It should fail (claiming an enforcement error on node.d, line 50).
no failuers for me. Slackware GNU/Linux, x86, gcc 4.9.1 and gdc-4.9-head (yet with some fixes backported from master, but they shouldn't make any difference). it also works perfectly with dmd-head.


September 19, 2014
On Friday, 19 September 2014 at 05:18:20 UTC, ketmar via Digitalmars-d wrote:
> On Fri, 19 Sep 2014 04:46:55 +0000
> Koz Ross via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
>
>> To replicate the error, simply run 'make profile' from the project directory. It should fail (claiming an enforcement error on node.d, line 50).
> no failuers for me. Slackware GNU/Linux, x86, gcc 4.9.1 and
> gdc-4.9-head (yet with some fixes backported from master, but they
> shouldn't make any difference). it also works perfectly with dmd-head.

Yeah, I'm still confused as to why this is happening to me. So does it run correctly and output a bunch of numbers, separated by spaces, two per line, or does it just not throw an enforcement error?
September 19, 2014
On Fri, 19 Sep 2014 06:11:32 +0000
Koz Ross via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

> Yeah, I'm still confused as to why this is happening to me. So does it run correctly and output a bunch of numbers, separated by spaces, two per line, or does it just not throw an enforcement error?
yes, alot of lines (201 ;-) with pairs of numbers, no errors at all. maybe it's due to my 32-bit system.


September 19, 2014
On Friday, 19 September 2014 at 06:21:31 UTC, ketmar via Digitalmars-d wrote:
> On Fri, 19 Sep 2014 06:11:32 +0000
> Koz Ross via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
>
>> Yeah, I'm still confused as to why this is happening to me. So does it run correctly and output a bunch of numbers, separated by spaces, two per line, or does it just not throw an enforcement error?
> yes, alot of lines (201 ;-) with pairs of numbers, no errors at all.
> maybe it's due to my 32-bit system.

I'll try and test it on a 32-bit machine (or in fact, another machine) and see if I get the same error.
« First   ‹ Prev
1 2