Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault on windows #874

Open
wx4cb opened this issue Aug 27, 2019 · 1 comment

Comments

@wx4cb
Copy link

commented Aug 27, 2019

I have a multiple source file, how can i figure out what is causing the segfault ?

Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

G:\arduino-1.8.9\arduino-builder -dump-prefs -logger=machine -hardware G:\arduino-1.8.9\hardware -tools G:\arduino-1.8.9\tools-builder -tools G:\arduino-1.8.9\hardware\tools\avr -built-in-libraries G:\arduino-1.8.9\libraries -libraries C:\Users\Charles Blackburn\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=0X2341_0X0010 -ide-version=10809 -build-path C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611 -warnings=none -build-cache C:\Users\CHARLE~1\AppData\Local\Temp\arduino_cache_339183 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=G:\arduino-1.8.9\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=G:\arduino-1.8.9\hardware\tools\avr -prefs=runtime.tools.avrdude.path=G:\arduino-1.8.9\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=G:\arduino-1.8.9\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=G:\arduino-1.8.9\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=G:\arduino-1.8.9\hardware\tools\avr -verbose C:\Users\Charles Blackburn\Documents\Arduino\NanoDrakLED\NanoDrakLED.ino
G:\arduino-1.8.9\arduino-builder -compile -logger=machine -hardware G:\arduino-1.8.9\hardware -tools G:\arduino-1.8.9\tools-builder -tools G:\arduino-1.8.9\hardware\tools\avr -built-in-libraries G:\arduino-1.8.9\libraries -libraries C:\Users\Charles Blackburn\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=0X2341_0X0010 -ide-version=10809 -build-path C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611 -warnings=none -build-cache C:\Users\CHARLE~1\AppData\Local\Temp\arduino_cache_339183 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=G:\arduino-1.8.9\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=G:\arduino-1.8.9\hardware\tools\avr -prefs=runtime.tools.avrdude.path=G:\arduino-1.8.9\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=G:\arduino-1.8.9\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=G:\arduino-1.8.9\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=G:\arduino-1.8.9\hardware\tools\avr -verbose C:\Users\Charles Blackburn\Documents\Arduino\NanoDrakLED\NanoDrakLED.ino
Using board 'mega' from platform in folder: G:\arduino-1.8.9\hardware\arduino\avr
Using core 'arduino' from platform in folder: G:\arduino-1.8.9\hardware\arduino\avr
Detecting libraries used...
"G:\\arduino-1.8.9\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\\arduino-1.8.9\\hardware\\arduino\\avr\\cores\\arduino" "-IG:\\arduino-1.8.9\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\sketch\\NanoDrakLED.ino.cpp" -o nul
"G:\\arduino-1.8.9\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\\arduino-1.8.9\\hardware\\arduino\\avr\\cores\\arduino" "-IG:\\arduino-1.8.9\\hardware\\arduino\\avr\\variants\\mega" "-IC:\\Users\\Charles Blackburn\\Documents\\Arduino\\libraries\\FastLED" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\sketch\\NanoDrakLED.ino.cpp" -o nul
Using cached library dependencies for file: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED\FastLED.cpp
Using cached library dependencies for file: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED\bitswap.cpp
Using cached library dependencies for file: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED\colorpalettes.cpp
Using cached library dependencies for file: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED\colorutils.cpp
Using cached library dependencies for file: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED\hsv2rgb.cpp
Using cached library dependencies for file: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED\lib8tion.cpp
Using cached library dependencies for file: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED\noise.cpp
Using cached library dependencies for file: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED\platforms.cpp
Using cached library dependencies for file: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED\power_mgt.cpp
Using cached library dependencies for file: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED\wiring.cpp
Generating function prototypes...
"G:\\arduino-1.8.9\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\\arduino-1.8.9\\hardware\\arduino\\avr\\cores\\arduino" "-IG:\\arduino-1.8.9\\hardware\\arduino\\avr\\variants\\mega" "-IC:\\Users\\Charles Blackburn\\Documents\\Arduino\\libraries\\FastLED" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\sketch\\NanoDrakLED.ino.cpp" -o "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"G:\\arduino-1.8.9\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"G:\\arduino-1.8.9\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\\arduino-1.8.9\\hardware\\arduino\\avr\\cores\\arduino" "-IG:\\arduino-1.8.9\\hardware\\arduino\\avr\\variants\\mega" "-IC:\\Users\\Charles Blackburn\\Documents\\Arduino\\libraries\\FastLED" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\sketch\\NanoDrakLED.ino.cpp" -o "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\sketch\\NanoDrakLED.ino.cpp.o"
In file included from C:\Users\Charles Blackburn\Documents\Arduino\NanoDrakLED\NanoDrakLED.ino:5:0:

C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.001

 #    pragma message "FastLED version 3.003.001"

                     ^

Compiling libraries...
Compiling library "FastLED"
Using previously compiled file: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611\libraries\FastLED\platforms.cpp.o
Using previously compiled file: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611\libraries\FastLED\colorutils.cpp.o
Using previously compiled file: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611\libraries\FastLED\noise.cpp.o
Using previously compiled file: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611\libraries\FastLED\FastLED.cpp.o
Using previously compiled file: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611\libraries\FastLED\colorpalettes.cpp.o
Using previously compiled file: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611\libraries\FastLED\wiring.cpp.o
Using previously compiled file: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611\libraries\FastLED\power_mgt.cpp.o
Using previously compiled file: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611\libraries\FastLED\hsv2rgb.cpp.o
Using previously compiled file: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611\libraries\FastLED\bitswap.cpp.o
Using previously compiled file: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_build_663611\libraries\FastLED\lib8tion.cpp.o
Compiling core...
Using precompiled core: C:\Users\CHARLE~1\AppData\Local\Temp\arduino_cache_339183\core\core_arduino_avr_mega_cpu_atmega2560_f6eb279e6d95a94f20839f4369b72207.a
Linking everything together...
"G:\\arduino-1.8.9\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611/NanoDrakLED.ino.elf" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\sketch\\NanoDrakLED.ino.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\libraries\\FastLED\\FastLED.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\libraries\\FastLED\\bitswap.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\libraries\\FastLED\\colorpalettes.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\libraries\\FastLED\\colorutils.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\libraries\\FastLED\\hsv2rgb.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\libraries\\FastLED\\lib8tion.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\libraries\\FastLED\\noise.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\libraries\\FastLED\\platforms.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\libraries\\FastLED\\power_mgt.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611\\libraries\\FastLED\\wiring.cpp.o" "C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611/..\\arduino_cache_339183\\core\\core_arduino_avr_mega_cpu_atmega2560_f6eb279e6d95a94f20839f4369b72207.a" "-LC:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\arduino_build_663611" -lm
C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED/controller.h: In member function 'clearLeds':

C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED/controller.h:76:82: internal compiler error: Segmentation fault

  virtual void clearLeds(int nLeds) { showColor(CRGB::Black, nLeds, CRGB::Black); }

                                                                                  ^

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

lto-wrapper.exe: fatal error: G:\arduino-1.8.9\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

g:/arduino-1.8.9/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

Using library FastLED at version 3.3.1 in folder: C:\Users\Charles Blackburn\Documents\Arduino\libraries\FastLED 
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
@wx4cb

This comment has been minimized.

Copy link
Author

commented Aug 27, 2019

ok i've narrowed it down to this - which i took from the demo100 examples "add glitter"

      if ( random8() < (fract8 )80) {
      LED_LWing[ random16(LEDS_PER_WING) ] += CRGB::White;
      LED_RWing[ random16(LEDS_PER_WING) ] += CRGB::White;
      }

original function:

void addGlitter( fract8 chanceOfGlitter) 
{
  if( random8() < chanceOfGlitter) {
    leds[ random16(NUM_LEDS) ] += CRGB::White;
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.