Skip to content

Arduino IDE 1.9 Beta : com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input #6818

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

Open
erkobg opened this issue Oct 11, 2017 · 9 comments
Labels
Component: IDE The Arduino IDE IDE 1.9.x Beta Related to the Arduino IDE Beta Build Type: Bug

Comments

@erkobg
Copy link

erkobg commented Oct 11, 2017

Downloaded arduino-PR-beta1.9-BUILD-44

After pressing Autocomplete ( Ctrl + Space) for the first time after a while I see exception :

com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
 at [Source: ; line: 1, column: 1]
	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3781)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3721)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2726)
	at cc.arduino.autocomplete.ClangCompletionProvider.getCompletionsImpl(ClangCompletionProvider.java:98)
	at org.fife.ui.autocomplete.CompletionProviderBase.getCompletions(CompletionProviderBase.java:104)
	at org.fife.ui.autocomplete.AutoCompletion.refreshPopupWindow(AutoCompletion.java:801)
	at org.fife.ui.autocomplete.AutoCompletion$AutoCompleteAction.actionPerformed(AutoCompletion.java:1351)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
	at java.awt.Component.processEvent(Component.java:6310)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
	at java.awt.Component.dispatchEventImpl(Component.java:4760)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
@erkobg erkobg closed this as completed Oct 11, 2017
@erkobg erkobg reopened this Oct 11, 2017
@facchinm facchinm added the IDE 1.9.x Beta Related to the Arduino IDE Beta Build label Oct 11, 2017
facchinm added a commit to facchinm/arduino-builder that referenced this issue Oct 12, 2017
@facchinm
Copy link
Member

Hi @erkobg ,
a new build of beta branch is live on the downloads server; it should solve your issue and add a refined diagnostic on preprocessor/json related errors.
The new version name is arduino-PR-beta1.9-BUILD-9 (we had a small problem with Jenkins, they'll all be sorted from now on).

Thanks for testing! Feel free to report if it fixes your problem.

@facchinm facchinm added the Waiting for feedback More information must be provided before we can proceed label Oct 12, 2017
@erkobg
Copy link
Author

erkobg commented Oct 12, 2017

Hello @facchinm,
downloaded the latest build available: arduino-PR-beta1.9-BUILD-9

Exception is gone, but nothing happens else....
Well when I press for Autocomplete it hangs for a long period( that's normal) but without any result.
I expect to see autocomplete list ( for example I hit Autocomplete on Serial. and nothing happens).
If I hit Autocomplete - again hanging and no result...

I started Arduino from debug : arduino_debug.exe and the output is following:


Looking for library user32
Adding paths from jna.library.path: null
Trying user32.dll
Found library user32 at user32.dll
Looking for library shell32
Adding paths from jna.library.path: null
Trying shell32.dll
Found library shell32 at shell32.dll
Looking for library Ole32
Adding paths from jna.library.path: null
Trying Ole32.dll
Found library Ole32 at Ole32.dll
Loading configuration...
Initializing packages...
Preparing boards...

Starting...
"RCSwitch.cpp" contains unrecognized characters. If this code was created with an older version of Arduino, you may need to use Tools -> Fix Encoding & Reload to update the sketch to use UTF-8 encoding. If not, you may need to delete the bad characters to get rid of this warning.

"RCSwitch.h" contains unrecognized characters. If this code was created with an older version of Arduino, you may need to use Tools -> Fix Encoding & Reload to update the sketch to use UTF-8 encoding. If not, you may need to delete the bad characters to get rid of this warning.

Using proxy DIRECT
Using proxy DIRECT
Using proxy DIRECT
Using proxy DIRECT
Using proxy DIRECT
Using proxy DIRECT
Using proxy DIRECT

My proxy works - I am able to browse from Libraries and Boards.
Please advice.

@facchinm
Copy link
Member

Thanks for testing, let's try debugging this.
Which board have you currently selected?
Two things you could try:

  • selecting an Arduino Uno (and try autocompleting Serial-related stuff)
  • moving RCSwitch library outside the sketchbook (after closing the IDE and killing arduino-builder.exe process)
    In case of error the new build should report (in verbose mode) a string to the commandline which is being launched.

@erkobg
Copy link
Author

erkobg commented Oct 13, 2017

Hello @facchinm,
I was trying my project for NodeMCU, so after your suggestions I tried :

  1. Trying smaller project as Blink- it is not working for NodeMCU.
  2. Trying smaller project as Blink- it is working for Arduino Uno.
  3. For my project, changing to Arduino Uno board - autocomplete works

So at least my conclusion is that Autocomplete is working for default boards only.

Update : just noticed that autocomplete for Wemos D1 board is working for Blink example

@facchinm
Copy link
Member

Yep, there could be some edge cases we are still trying to figure out; we currently preprocess the source (with gcc or any default compiler for the target) before passing it to the preprocessor.
This means that there could be gcc-specific stuff that gets imported only if used (so not in every sketch or board combination) and "breaks" the (clang based) preprocessor.
We will add a bit of debugging to understand how the AST generation is failing in these cases.

@facchinm
Copy link
Member

Could you test the latest build (10) after selecting nodemcu? We silenced a couple of warnings with could have caused the error.

@erkobg
Copy link
Author

erkobg commented Oct 13, 2017

Hello @facchinm,
Seems that this build works even for the NodeMcu.

The only annoying thing left - every time on Autocomplete it freezes and takes quite some time to show the list, not only the first time. Time for showing the list is proportional to the amount of the code in the sketch - if the code is bigger it takes more time.

@per1234 per1234 removed the Waiting for feedback More information must be provided before we can proceed label Oct 25, 2017
@fizban99
Copy link

fizban99 commented Dec 27, 2017

Hi, I just tested with TinyScreen+ with the current beta (build-31) and I am getting a similar problem. CircuitPlaygroundExpress shows autocompletion fine.
In debug window the TinyScreen+ default example displays the following when triggering autocomplete after display.:

com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
 at [Source: ; line: 1, column: 1]
        at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3781)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3721)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2726)
        at cc.arduino.autocomplete.ClangCompletionProvider.getCompletionsImpl(ClangCompletionProvider.java:99)
        at org.fife.ui.autocomplete.CompletionProviderBase.getCompletions(CompletionProviderBase.java:104)
        at org.fife.ui.autocomplete.AutoCompletion.refreshPopupWindow(AutoCompletion.java:801)
        at org.fife.ui.autocomplete.AutoCompletion$AutoCompleteAction.actionPerformed(AutoCompletion.java:1351)
        at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
        at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
        at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
        at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
        at java.awt.Component.processEvent(Component.java:6310)
        at java.awt.Container.processEvent(Container.java:2236)
        at java.awt.Component.dispatchEventImpl(Component.java:4889)
        at java.awt.Container.dispatchEventImpl(Container.java:2294)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
        at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
        at java.awt.Component.dispatchEventImpl(Component.java:4760)
        at java.awt.Container.dispatchEventImpl(Container.java:2294)
        at java.awt.Window.dispatchEventImpl(Window.java:2746)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.awt.EventQueue$4.run(EventQueue.java:729)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Using proxy DIRECT
Using proxy DIRECT`

facchinm added a commit to facchinm/arduino-builder that referenced this issue Jan 10, 2018
cmaglie pushed a commit to cmaglie/arduino-builder that referenced this issue Jan 10, 2018
facchinm added a commit to facchinm/arduino-builder that referenced this issue Jan 10, 2018
cmaglie pushed a commit to cmaglie/arduino-builder that referenced this issue Jan 10, 2018
cmaglie pushed a commit to cmaglie/arduino-builder that referenced this issue Jan 11, 2018
@jbrepogmailcom
Copy link

jbrepogmailcom commented Nov 26, 2019

Hello, got this error with file arduino-1.9.0-beta-linux64 on Linux. So it is still not resolved?

com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (String)""; line: 1, column: 0]
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4133)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3988)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2992)
	at cc.arduino.autocomplete.ClangCompletionProvider.getCompletionsImpl(ClangCompletionProvider.java:99)
	at org.fife.ui.autocomplete.CompletionProviderBase.getCompletions(CompletionProviderBase.java:104)
	at org.fife.ui.autocomplete.AutoCompletion.refreshPopupWindow(AutoCompletion.java:801)
	at org.fife.ui.autocomplete.AutoCompletion$AutoCompleteAction.actionPerformed(AutoCompletion.java:1351)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1668)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
	at java.awt.Component.processEvent(Component.java:6316)
	at java.awt.Container.processEvent(Container.java:2239)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:835)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1103)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:974)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:800)
	at java.awt.Component.dispatchEventImpl(Component.java:4760)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

@per1234 per1234 added Component: IDE The Arduino IDE Type: Bug labels Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE IDE 1.9.x Beta Related to the Arduino IDE Beta Build Type: Bug
Projects
None yet
Development

No branches or pull requests

5 participants