digitalmars.D.learn - Very vague compiler error message
- Jeremy DeHaan (7/7) Aug 12 2014 I recently got this error messege when building my library:
- ketmar via Digitalmars-d-learn (5/6) Aug 12 2014 On Tue, 12 Aug 2014 07:16:49 +0000
- Rikki Cattermole (5/12) Aug 12 2014 That error is being generated from within dmd itself.
- H. S. Teoh via Digitalmars-d-learn (6/15) Aug 12 2014 That's an ICE (Internal Compiler Error). Please reduce your test case
- Jeremy DeHaan (4/4) Aug 12 2014 Awesome, thanks everyone.
- =?UTF-8?B?IlRow6lv?= Bueno" (2/10) Aug 14 2014 Same issue here with dsfml-audio, this is really annoying :/
- bearophile (4/5) Aug 14 2014 Have you filed the issue?
- =?UTF-8?B?IlRow6lv?= Bueno" (5/10) Aug 14 2014 Jebbs filed an issue on his bugtracker :
- Jeremy DeHaan (5/18) Aug 14 2014 Yeah, sorry. I did get it to compile, but I didn't have access to
- Jeremy DeHaan (24/24) Aug 17 2014 I didn't have access to my compute for longer than I thought, but
I recently got this error messege when building my library: dmd: cppmangle.c:154: void CppMangleVisitor::cpp_mangle_name(Dsymbol*): Assertion `0' failed. I have no idea what it means and haven't found much information about it. I think I have narrowed it down to the file that is giving this error, but does anyone know what the heck causes something like this? Talk about a nondescript error.
Aug 12 2014
On Tue, 12 Aug 2014 07:16:49 +0000 Jeremy DeHaan via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:but does anyone know what the heck causes something like this?it's internal compiler error, the thing that should never happen. try to use dustmite to build minimalictic test case and fill the bug.
Aug 12 2014
On 12/08/2014 7:16 p.m., Jeremy DeHaan wrote:I recently got this error messege when building my library: dmd: cppmangle.c:154: void CppMangleVisitor::cpp_mangle_name(Dsymbol*): Assertion `0' failed. I have no idea what it means and haven't found much information about it. I think I have narrowed it down to the file that is giving this error, but does anyone know what the heck causes something like this? Talk about a nondescript error.That error is being generated from within dmd itself. In other words you've found an edge case congratulations! Look for functions/methods using the extern(C++) mangling. Mock them out into D versions and see which fails maybe?
Aug 12 2014
On Tue, Aug 12, 2014 at 07:16:49AM +0000, Jeremy DeHaan via Digitalmars-d-learn wrote:I recently got this error messege when building my library: dmd: cppmangle.c:154: void CppMangleVisitor::cpp_mangle_name(Dsymbol*): Assertion `0' failed. I have no idea what it means and haven't found much information about it. I think I have narrowed it down to the file that is giving this error, but does anyone know what the heck causes something like this? Talk about a nondescript error.That's an ICE (Internal Compiler Error). Please reduce your test case and file a critical bug. T -- Stop staring at me like that! It's offens... no, you'll hurt your eyes!
Aug 12 2014
Awesome, thanks everyone. I'll take the suggestion to use Dustmite as an excuse to familiarize myself with it, but if normally extern(C++) types cause it I know just where to look.
Aug 12 2014
On Tuesday, 12 August 2014 at 07:16:50 UTC, Jeremy DeHaan wrote:I recently got this error messege when building my library: dmd: cppmangle.c:154: void CppMangleVisitor::cpp_mangle_name(Dsymbol*): Assertion `0' failed. I have no idea what it means and haven't found much information about it. I think I have narrowed it down to the file that is giving this error, but does anyone know what the heck causes something like this? Talk about a nondescript error.Same issue here with dsfml-audio, this is really annoying :/
Aug 14 2014
Théo Bueno:Same issue here with dsfml-audio, this is really annoying :/Have you filed the issue? Bye, bearophile
Aug 14 2014
On Thursday, 14 August 2014 at 13:28:03 UTC, bearophile wrote:Théo Bueno:Jebbs filed an issue on his bugtracker : https://github.com/Jebbs/DSFML/issues/125 ... and he seems to have a fix, or at least a clue. Personally, I was not able to figure out where is the bug.Same issue here with dsfml-audio, this is really annoying :/Have you filed the issue? Bye, bearophile
Aug 14 2014
On Thursday, 14 August 2014 at 13:47:58 UTC, Théo Bueno wrote:On Thursday, 14 August 2014 at 13:28:03 UTC, bearophile wrote:Yeah, sorry. I did get it to compile, but I didn't have access to my computer last night unexpectedly and I haven't checked it to confirm that the audio module still works. If everything does still work, then I'll upload the fix in the next couple of hours.Théo Bueno:Jebbs filed an issue on his bugtracker : https://github.com/Jebbs/DSFML/issues/125 ... and he seems to have a fix, or at least a clue. Personally, I was not able to figure out where is the bug.Same issue here with dsfml-audio, this is really annoying :/Have you filed the issue? Bye, bearophile
Aug 14 2014
I didn't have access to my compute for longer than I thought, but I finally got around to this. After some messing around, I not only managed to track down the cause, but I got it fixed and the Audio module for DSFML is back to where it was. In one of my D classes, SoundStream, I defined a struct called Chunk, which held a chunk of sound data. It looks like this: struct Chunk { const(short)* samples; size_t sampleCount; } All of the streaming is actually happening in an extern(C++) interface instance, and with the help of Dustmite, the method that caused the initial error was this: extern(C++) bool onGetData(SoundStream.Chunk* chunk); I think because it has a D Class member as the parameter type in an extern(C++) class method the D compiler broke? What I did to fix it was I changed Chunk from being a member of SoundStream and declared it as a extern(C++) struct instead. That changed onGetData to "extern(C++) bool onGetData(Chunk* chunk);" and the compiler was ok with that. I might do some more testing to see if I can reproduce the error, but changing the parameter type fixed it for me.
Aug 17 2014