Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
Visual Micro >> Visual Studio 2017, 2019 >> Segmentation Fault - with code
https://www.visualmicro.com/forums/YaBB.pl?num=1565293559

Message started by Bob Jones on Aug 8th, 2019 at 8:45pm

Title: Segmentation Fault - with code
Post by Bob Jones on Aug 8th, 2019 at 8:45pm
I am getting a repeatable segmentation fault. Code attached. See OUTPUT.txt for verbose compiler output.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=JoystickTest.zip (51 KB | 1 )

Title: Re: Segmentation Fault - with code
Post by Visual Micro on 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-segmentation-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.




Title: Re: Segmentation Fault - with code
Post by Bob Jones on Aug 8th, 2019 at 11:32pm
Thanks, Tim. I will dig in a bit further after I get back from Canada (leaving tomorrow morning).

Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.