Skip to content

Removing selected board definition causes crash #220

Open
ricklon opened this Issue May 2, 2012 · 2 comments

3 participants

@ricklon
chipKIT member
ricklon commented May 2, 2012

When editing boards.txt it's possible to remove the board that is selected in preferences.txt. This causes and MPIDE crash.

Need to detect missing board and set to a default board instead of crashing.

@EmbeddedMan
chipKIT member

Here is the output from "ant win-debug" when this situation arises. Maybe it will help you know how to change the code to prevent the problem from occurring.

I think the right behavior would be for MPIDE to simply reset to the first board listed if it can't find the last used board name.

*Brian

D:\Projects\EM_chipKIT32-MAX\build>ant win-debug
Buildfile: D:\Projects\EM_chipKIT32-MAX\build\build.xml

build:

revision-check:

windows-checkos:

subprojects-build:

compile:
[methods] No changes to PApplet API.

build:

compile:

build:

windows-build:
[unzip] Expanding: D:\Projects\EM_chipKIT32-MAX\build\windows\avr_tools.zip into D:\Projects\EM_chipKIT32-MAX\build\windows\work\hardware
[unzip] Expanding: D:\Projects\EM_chipKIT32-MAX\build\windows\dist\pic32-tools-chipKIT-cxx-master-win32-image-20120720.zip into D:\Projects\EM_chipKIT32-MAX\build\windows\work\hardware\pic32\compi
ler

assemble:
[unzip] Expanding: D:\Projects\EM_chipKIT32-MAX\build\shared\reference.zip into D:\Projects\EM_chipKIT32-MAX\build\windows\work

update-avrdude-windows:
[copy] Copying 3 files to D:\Projects\EM_chipKIT32-MAX\build\windows\work
[launch4j] Compiling resources
[launch4j] Linking
[launch4j] Successfully created D:\Projects\EM_chipKIT32-MAX\build\windows\work\mpide.exe

win-debug:
[java] 0 [main] DEBUG processing.app.Base - DEBUG: Logging enabled.processing.app.Base
[java] Exception in thread "main" java.lang.NullPointerException
[java] 1206 [main] DEBUG processing.app.Base - Target: initiated: name = arduino folder= arduino at processing.app.Base.(Base.java:273)
[java]
[java] 1208 [main] DEBUG processing.app.Base - Target: initiated: name = pic32 folder= pic32
[java] at processing.app.Base.main(Base.java:183)
[java] 1210 [main] DEBUG processing.app.Base - Target: initiated: name = tools folder= tools
[java] 1210 [main] DEBUG processing.app.Base - Base: getTarget() : Target Name: pic32
[java] 1210 [main] DEBUG processing.app.Base - Target: getBoards(): pic32
[java] 1210 [main] DEBUG processing.app.Base - !!!Base: Platform Name: null
[java] 1210 [main] DEBUG processing.app.Base - Base: getPlatformPreferences: platformname: null
[java] 1210 [main] DEBUG processing.app.Base - Base: getTarget() : Target Name: pic32
[java] 1210 [main] DEBUG processing.app.Base - Target: getPlatforms(): pic32
[java] Java Result: 1

BUILD SUCCESSFUL
Total time: 4 seconds

D:\Projects\EM_chipKIT32-MAX\build>

@majenkotech
chipKIT member

This is already fixed as part of the whole boards.txt / variants overhaul

41191 [AWT-EventQueue-0] DEBUG processing.app.Base  - Base: getBoardPreferences board not found, defaulting to uno_pic32

It defaults to the first board in the Boards array, usually the Uno32.

Close?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.