digitalmars.D - User feedback - recurrent runtime bug
- simen (19/19) Nov 04 2010 I tried D some years ago and liked it's ideas but thought it too soon to...
- Andrei Alexandrescu (10/29) Nov 04 2010 To make this quest successful, you may want to reduce the code to a
- Jesse Phillips (8/20) Nov 04 2010 Or you could look at:
- Steven Schveighoffer (5/28) Nov 04 2010 Compile time is not possible. You cannot construct the import graph unt...
- Iain Buclaw (6/40) Nov 04 2010 Agreed, and what makes the plot thicker is that it also depends on the *...
- Steven Schveighoffer (6/17) Nov 04 2010 That actually shouldn't matter. I believe what you are seeing is a
- Michel Fortin (11/33) Nov 04 2010 This last one is a different problem... and is by design.
- Steven Schveighoffer (22/40) Nov 04 2010 It is likely the cyclic dependency problem will not be solved. The
- Steven Schveighoffer (7/12) Nov 08 2010 I fixed the cyclic dependency algorithm, and added a verbose printout wh...
- Iain Buclaw (4/16) Nov 08 2010 Will this be applied to D1 too?
- Steven Schveighoffer (5/22) Nov 08 2010 It should be (since it's a bug fix for D1 too), but I'm not involved wit...
I tried D some years ago and liked it's ideas but thought it too soon to jump in then. Call this try once. Then I came back about a year ago to try D version 2 and again found it also too early to jump in, but, admittedly, still liking the D concept. IIRC the reason I dropped out the second time was then to do with cyclic dependency problems that emerged when I tried converting a Java project to D just for fun. Call this try twice. A year later I try D version 2 to see if it has improved. Porting some rather simple Java code to D and compiling it without error, I am initially impressed that the SLOC metric is much smaller than the original Java code. So far, so good until running the simple app, the same runtime error message surfaces as per my second attempt a year ago: object.Exception: Cyclic dependency in module test Call this try twice again and now thrice shy. From what can glean this does not need a new bug report being a known and still uncorrected problem. - simen
Nov 04 2010
On 11/4/10 8:32 AM, simen wrote:I tried D some years ago and liked it's ideas but thought it too soon to jump in then. Call this try once. Then I came back about a year ago to try D version 2 and again found it also too early to jump in, but, admittedly, still liking the D concept. IIRC the reason I dropped out the second time was then to do with cyclic dependency problems that emerged when I tried converting a Java project to D just for fun. Call this try twice. A year later I try D version 2 to see if it has improved. Porting some rather simple Java code to D and compiling it without error, I am initially impressed that the SLOC metric is much smaller than the original Java code. So far, so good until running the simple app, the same runtime error message surfaces as per my second attempt a year ago: object.Exception: Cyclic dependency in module test Call this try twice again and now thrice shy. From what can glean this does not need a new bug report being a known and still uncorrected problem. - simenTo make this quest successful, you may want to reduce the code to a simple test case and submit it as a bug report or post it here. As the error you're encountering is the only problem you're seeing whenever you try your code and an infrequent one for others, it's not impossible it's a usage error rather than a bug in the language or its implementation. At any rate, just describing how you feel makes it difficult to pinpoint and solve whatever matter you've been hitting. Thanks for sharing, Andrei
Nov 04 2010
Andrei Alexandrescu Wrote:To make this quest successful, you may want to reduce the code to a simple test case and submit it as a bug report or post it here. As the error you're encountering is the only problem you're seeing whenever you try your code and an infrequent one for others, it's not impossible it's a usage error rather than a bug in the language or its implementation. At any rate, just describing how you feel makes it difficult to pinpoint and solve whatever matter you've been hitting. Thanks for sharing, AndreiOr you could look at: http://d.puremagic.com/issues/show_bug.cgi?id=2457 Then there are other cyclic/import bugs: http://d.puremagic.com/issues/show_bug.cgi?id=5053 http://d.puremagic.com/issues/show_bug.cgi?id=4384 http://d.puremagic.com/issues/show_bug.cgi?id=3979 Which of course is a good way to find out if a particular bug has been fixed or not. I don't know if the message will just be moved into compile time (I've it it myself and haven't minded it too much, other than it happening at run-time).
Nov 04 2010
On Thu, 04 Nov 2010 10:31:47 -0400, Jesse Phillips <jessekphillips+D gmail.com> wrote:Andrei Alexandrescu Wrote:Compile time is not possible. You cannot construct the import graph until link time, and the linker does not support performing any kind of analysis. -SteveTo make this quest successful, you may want to reduce the code to a simple test case and submit it as a bug report or post it here. As the error you're encountering is the only problem you're seeing whenever you try your code and an infrequent one for others, it's not impossible it's a usage error rather than a bug in the language or its implementation. At any rate, just describing how you feel makes it difficult to pinpoint and solve whatever matter you've been hitting. Thanks for sharing, AndreiOr you could look at: http://d.puremagic.com/issues/show_bug.cgi?id=2457 Then there are other cyclic/import bugs: http://d.puremagic.com/issues/show_bug.cgi?id=5053 http://d.puremagic.com/issues/show_bug.cgi?id=4384 http://d.puremagic.com/issues/show_bug.cgi?id=3979 Which of course is a good way to find out if a particular bug has been fixed or not. I don't know if the message will just be moved into compile time (I've it it myself and haven't minded it too much, other than it happening at run-time).
Nov 04 2010
== Quote from Steven Schveighoffer (schveiguy yahoo.com)'s articleOn Thu, 04 Nov 2010 10:31:47 -0400, Jesse Phillips <jessekphillips+D gmail.com> wrote:Agreed, and what makes the plot thicker is that it also depends on the *order* that you send files to the linker too. Bug report from Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=583837 Regards IainAndrei Alexandrescu Wrote:Compile time is not possible. You cannot construct the import graph until link time, and the linker does not support performing any kind of analysis. -SteveTo make this quest successful, you may want to reduce the code to a simple test case and submit it as a bug report or post it here. As the error you're encountering is the only problem you're seeing whenever you try your code and an infrequent one for others, it's not impossible it's a usage error rather than a bug in the language or its implementation. At any rate, just describing how you feel makes it difficult to pinpoint and solve whatever matter you've been hitting. Thanks for sharing, AndreiOr you could look at: http://d.puremagic.com/issues/show_bug.cgi?id=2457 Then there are other cyclic/import bugs: http://d.puremagic.com/issues/show_bug.cgi?id=5053 http://d.puremagic.com/issues/show_bug.cgi?id=4384 http://d.puremagic.com/issues/show_bug.cgi?id=3979 Which of course is a good way to find out if a particular bug has been fixed or not. I don't know if the message will just be moved into compile time (I've it it myself and haven't minded it too much, other than it happening at run-time).
Nov 04 2010
On Thu, 04 Nov 2010 12:41:16 -0400, Iain Buclaw <ibuclaw ubuntu.com> wrote:== Quote from Steven Schveighoffer (schveiguy yahoo.com)'s articleThat actually shouldn't matter. I believe what you are seeing is a manifestation of bug 4384. The cycle detection algorithm is broken, it doesn't detect some cycles, and I would not be surprised if link order affected whether a certain cycle was detected. -SteveCompile time is not possible. You cannot construct the import graph until link time, and the linker does not support performing any kind of analysis. -SteveAgreed, and what makes the plot thicker is that it also depends on the *order* that you send files to the linker too. Bug report from Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=583837
Nov 04 2010
On 2010-11-04 09:32:35 -0400, simen <simen nowhere.com> said:I tried D some years ago and liked it's ideas but thought it too soon to jump in then. Call this try once. Then I came back about a year ago to try D version 2 and again found it also too early to jump in, but, admittedly, still liking the D concept. IIRC the reason I dropped out the second time was then to do with cyclic dependency problems that emerged when I tried converting a Java project to D just for fun. Call this try twice. A year later I try D version 2 to see if it has improved. Porting some rather simple Java code to D and compiling it without error, I am initially impressed that the SLOC metric is much smaller than the original Java code. So far, so good until running the simple app, the same runtime error message surfaces as per my second attempt a year ago: object.Exception: Cyclic dependency in module test Call this try twice again and now thrice shy.This last one is a different problem... and is by design. D allows cyclic imports between modules. But if one of the modules involved in the cyclic dependency contains a "static this()" the runtime will not be able to determine in which order the modules must be initialized and will complain with the exception you just got. The error message isn't very clear though. -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Nov 04 2010
On Thu, 04 Nov 2010 09:32:35 -0400, simen <simen nowhere.com> wrote:I tried D some years ago and liked it's ideas but thought it too soon to jump in then. Call this try once. Then I came back about a year ago to try D version 2 and again found it also too early to jump in, but, admittedly, still liking the D concept. IIRC the reason I dropped out the second time was then to do with cyclic dependency problems that emerged when I tried converting a Java project to D just for fun. Call this try twice. A year later I try D version 2 to see if it has improved. Porting some rather simple Java code to D and compiling it without error, I am initially impressed that the SLOC metric is much smaller than the original Java code. So far, so good until running the simple app, the same runtime error message surfaces as per my second attempt a year ago: object.Exception: Cyclic dependency in module test Call this try twice again and now thrice shy. From what can glean this does not need a new bug report being a known and still uncorrected problem.It is likely the cyclic dependency problem will not be solved. The granularity is too coarse -- if two modules contain static constructors, and they depend on eachother, then there is a cycle. It doesn't matter if the static constructors don't access data from other modules. There are two options I can think of for solutions. First is to add syntax to indicate the lack of dependency. This is unlikely to happen, but probably the only true solution. If someone can come up with some reasonable syntax, it might be considered. Second is to have the compiler create a true dependency tree based on what variables are accessed. This would most likely involve creating a custom object format (and linker), and is akin to full escape analysis. This is *very* unlikely to happen unless someone wants to do all the work on their own. For now, there are probably workarounds you can use to alleviate the problem. I can't really say how you can apply them without some example of your code. There is also the issue of a cryptic error message. "Cyclic dependency in module test" gives you almost no information. This is an issue I hope to solve, when I have some spare time. I have already tried to solve it but ran into some severe bugs, but I can work around those bugs for now. -Steve
Nov 04 2010
On Thu, 04 Nov 2010 10:20:28 -0400, Steven Schveighoffer <schveiguy yahoo.com> wrote:There is also the issue of a cryptic error message. "Cyclic dependency in module test" gives you almost no information. This is an issue I hope to solve, when I have some spare time. I have already tried to solve it but ran into some severe bugs, but I can work around those bugs for now.I fixed the cyclic dependency algorithm, and added a verbose printout when a cycle is detected (showing you the entire cycle). Hopefully this at least helps diagnosing this problem. http://www.dsource.org/projects/druntime/changeset/414 -Steve
Nov 08 2010
== Quote from Steven Schveighoffer (schveiguy yahoo.com)'s articleOn Thu, 04 Nov 2010 10:20:28 -0400, Steven Schveighoffer <schveiguy yahoo.com> wrote:Will this be applied to D1 too? Regards IainThere is also the issue of a cryptic error message. "Cyclic dependency in module test" gives you almost no information. This is an issue I hope to solve, when I have some spare time. I have already tried to solve it but ran into some severe bugs, but I can work around those bugs for now.I fixed the cyclic dependency algorithm, and added a verbose printout when a cycle is detected (showing you the entire cycle). Hopefully this at least helps diagnosing this problem. http://www.dsource.org/projects/druntime/changeset/414 -Steve
Nov 08 2010
On Mon, 08 Nov 2010 10:06:11 -0500, Iain Buclaw <ibuclaw ubuntu.com> wrote:== Quote from Steven Schveighoffer (schveiguy yahoo.com)'s articleIt should be (since it's a bug fix for D1 too), but I'm not involved with D1 Phobos at all. I'm pretty sure Tango will apply it, but I'm not involved there either. -SteveOn Thu, 04 Nov 2010 10:20:28 -0400, Steven Schveighoffer <schveiguy yahoo.com> wrote:Will this be applied to D1 too?There is also the issue of a cryptic error message. "Cyclicdependencyin module test" gives you almost no information. This is an issue I hope to solve, when I have some spare time. I have already tried to solve it but ran into some severe bugs, but I can work around thosebugsfor now.I fixed the cyclic dependency algorithm, and added a verbose printout when a cycle is detected (showing you the entire cycle). Hopefully this at least helps diagnosing this problem. http://www.dsource.org/projects/druntime/changeset/414 -Steve
Nov 08 2010