Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Compiler Segmentation Faults (Read 1559 times)
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Compiler Segmentation Faults
Nov 28th, 2018 at 7:51pm
Print Post  
Tim,

I am seeing several indications of an unstable system:

1) Compiler Segmentation Fault errors
2) Serial port output not being written
3) Repeated nagging from Visual Studio that VM plugin is causing problems.

First, here are the errors I am now seeing quite often:
Severity      Code      Description      File      Line
Warning            compilation terminated            
Error            error: ld returned 1 exit status      collect2.exe      
Error            error: lto-wrapper failed      d:\arduino\hardware\tools\avr\avr\bin\ld.exe      -1
Error            fatal error: D:\Arduino\hardware\tools\avr\bin\avr-gcc returned 1 exit status      lto-wrapper.exe      
Warning            Please submit a full bug report            
Warning            with preprocessed source if appropriate            
Warning            In member function showHelp      D:\Documents\Arduino\libraries\NanoBots\src\BJDriverRF24.h      -1
Warning            internal compiler error  Segmentation fault      D:\Documents\Arduino\libraries\NanoBots\src\BJDriverRF24.h      295
Warning            gcc.gnu.org\bugs.html> for instructions      See <http      

Verbose compiler output is attached.

These errors often go away if I do a Build->Clean, but sometimes even that doesn't fix them. 

Second Symptom:
In some cases, no output is being written to the Serial Port. If I chop out pieces of code or simply issue a RETURN statement at the beginning of a large switch statement, output IS displayed. If I add code back in, the display disappears. What is especially weird is that lots of the serial output happens during setup. The code being selectively disabled is in the loop. So somehow, while still generating setup output, it figures out that something is going to happen in the future so it discards the output. 

To make matters worse, the automatically generated port logs reflect the non-output. Here is the entire content of COM29 2018-11-28 11-19-36.conversation.txt:

2018-11-28 11:19:37      Message      Opening port
Port open


And here is the setup function, clearly showing Serial.print statements that are all being discarded:

void setup () {
     Serial.begin ( 115200 );
     Serial.println ( F ( "SETUP BEGINS" ) );
     delay ( SERIAL_DELAY * 10 );
     master = new BJMaster ();
     Serial.println ( F ( "MASTER CREATED" ) );
     delay ( SERIAL_DELAY * 10 );

     master->init ();
     Serial.println ( F ( "SETUP COMPLETE" ) );
     delay ( SERIAL_DELAY * 10);
}

The third syndrome shows up as a warning that VM is causing severe delays. It asks if I want to disable the plugin and gives a "Never show this reminder again" option. I click on that option and learn pretty soon that "never" is quite subjective, as VS asks the same question again.

I know this is a strange conglomeration of issues, but I am wondering if you have any hunches about what may be causing the problems? Are they connected or unrelated?

In my mind, the most significant is the missing Serial Output. Without that output, I cannot debug. 

The Compiler faults are becoming increasingly annoying but I usually find a way around them. 

The final problem is one you may want to report to Microsoft and ask them, "Does never really mean never?"

Thanks,

Bob
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Segmentation Faults
Reply #1 - Nov 28th, 2018 at 8:02pm
Print Post  
Thanks for the report. Because it is happening to you then you should report issues to Microsoft and they will want to know version number etc from help about.

You should switch off debug but also switch on verbose build output. This will show where any delays are however during builds we want to do things as fast as possible. Depending on your setting of Parallel builds and your virus checker the build processing can be increased or decreased in various ways

Normally you should only expect core and libraries to recompile if they change or if they are in debug mode during build. So we don't expect more than a few secs per 2nd build in most cases.

You need to search google for the reasons for avrdude error reports. 

As a general rule the visual studio errors list is not so helpful. You get better and more detailed info in the visual micro build output especially with verbose compile and upload enabled.

  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint