Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Segmentation Fault - with code (Read 142 times)
Bob Jones
Full Member
***
Offline



Posts: 207
Bellingham, WA
Segmentation Fault - with code
Aug 8th, 2019 at 8:45pm
 
I am getting a repeatable segmentation fault. Code attached. See OUTPUT.txt for verbose compiler output.
Back to top
 

JoystickTest.zip (51 KB | 3 )
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10550
United Kingdom
Re: Segmentation Fault - with code
Reply #1 - Aug 8th, 2019 at 9:05pm
 
Hi Bob,

Please do not open another thread about segmentation faults. You should try to keep adding to the same thread so that we can keep the answers in the forefont. I believe this is the third or fourth time you have creted a thread to discuss this. The answer is always the same but at least this time you have posted the output and code example.

Reading and/or reporting half an error is of no use to you or anyone else. If we look at you output the error is this:-

wiring_digital.c:163: internal compiler error  Segmentation fault

When I take your error and make a search of google it gives this top result.

https://arduino.stackexchange.com/questions/58495/strange-compiler-error-segment
ation-fault

When I read the answer in the above link that has a vote it explains clearly the issue and one option to solve. It also gives a link that allows you to understand how to solve properly.

https://github.com/arduino/ArduinoCore-avr/issues/39

When I read the github link it explains how the use of F() strings can cause this and explains an alternative way to work.

When I read your .ino code in your demo error example I see you have made extensive use of F() strings.

Hopefully you can find a solution in all of this one way or another.



Back to top
 
WWW  
IP Logged
 
Bob Jones
Full Member
***
Offline



Posts: 207
Bellingham, WA
Re: Segmentation Fault - with code
Reply #2 - Aug 8th, 2019 at 11:32pm
 
Thanks, Tim. I will dig in a bit further after I get back from Canada (leaving tomorrow morning).
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print