Bug 13978 - java.lang.NumberFormatException: For input string: "ffffffff"
Summary: java.lang.NumberFormatException: For input string: "ffffffff"
Status: CLOSED NORESPONSE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 3.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2013-08-14 14:29 UTC by Bryan Moulton
Modified: 2015-08-24 08:19 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Build Log (110.26 KB, text/plain)
2013-08-14 14:29 UTC, Bryan Moulton
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
CLOSED NORESPONSE

Description Bryan Moulton 2013-08-14 14:29:57 UTC
Created attachment 4629 [details]
Build Log

In reference to case #42745

After updating to 4.8.01013, Visual Studio 2012 is showing errors when opening a project:

Mono.VisualStudio.Shell.ShellPackage Error: 0 : ERROR: java.lang.NumberFormatException: For input string: "ffffffff"

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at java.lang.Integer.parseInt(Integer.java:461)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.parseEnumFlagValues(AttrsXmlParser.java:536)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.parseAttributeTypes(AttrsXmlParser.java:475)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.parseAttr(AttrsXmlParser.java:369)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.parseDeclaredStyleable(AttrsXmlParser.java:410)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.parseResources(AttrsXmlParser.java:228)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.preload(AttrsXmlParser.java:153)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.AndroidTarget.<init>(AndroidTarget.java:26)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.AndroidDesignerHost.getAndroidTarget(AndroidDesignerHost.java:54)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.DesignerSession.initialize(DesignerSession.java:74)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.Project.createSession(Project.java:239)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.Project.processMessage(Project.java:270)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.ListenerThread.processMessages(HostProcessConnection.java:182)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.ListenerThread.run(HostProcessConnection.java:156)

Mono.VisualStudio.Shell.ShellPackage Error: 0 :

Mono.VisualStudio.Shell.ShellPackage Error: 0 : ERROR: Value in <attr name="accessibilityEventTypes"><flag name="typeAllMask" value="0xffffffff"></attr> is not a valid decimal or hexadecimal

Mono.VisualStudio.Shell.ShellPackage Error: 0 : ERROR: java.lang.NumberFormatException: For input string: "ffffffff"

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at java.lang.Integer.parseInt(Integer.java:461)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.parseEnumFlagValues(AttrsXmlParser.java:536)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.parseAttributeTypes(AttrsXmlParser.java:475)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.parseAttr(AttrsXmlParser.java:369)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.parseDeclaredStyleable(AttrsXmlParser.java:410)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.parseResources(AttrsXmlParser.java:228)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at com.android.ide.eclipse.adt.internal.resources.AttrsXmlParser.preload(AttrsXmlParser.java:153)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.AndroidTarget.<init>(AndroidTarget.java:26)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.AndroidDesignerHost.getAndroidTarget(AndroidDesignerHost.java:54)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.DesignerSession.initialize(DesignerSession.java:74)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.Project.createSession(Project.java:239)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.Project.processMessage(Project.java:270)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.ListenerThread.processMessages(HostProcessConnection.java:182)

Mono.VisualStudio.Shell.ShellPackage Error: 0 : at mono.android.ListenerThread.run(HostProcessConnection.java:156)

Mono.VisualStudio.Shell.ShellPackage Error: 0 :

Mono.VisualStudio.Shell.ShellPackage Error: 0 : ERROR: Value in <attr name="accessibilityFeedbackType"><flag name="feedbackAllMask" value="0xffffffff"></attr> is not a valid decimal or hexadecimal

Mono.VisualStudio.Shell.ShellPackage Error: 0 : ERROR: Failed to parse file C:\TEMP\Xamarin\VS\MyEnergate\MyEnergate\Resources\Drawable\ButtonGrayRoundedStyle.xml

Mono.VisualStudio.Shell.ShellPackage Error: 0 : ERROR: Failed to parse file C:\TEMP\Xamarin\VS\MyEnergate\MyEnergate\Resources\Drawable\ButtonGrayRoundedStyle.xml

Mono.VisualStudio.Shell.ShellPackage Error: 0 : ERROR: Failed to parse file C:\TEMP\Xamarin\VS\MyEnergate\MyEnergate\Resources\Drawable\ButtonRedRoundedStyle.xml

Mono.VisualStudio.Shell.ShellPackage Error: 0 : ERROR: Failed to parse file C:\TEMP\Xamarin\VS\MyEnergate\MyEnergate\Resources\Drawable\ButtonGreenRoundedStyle.xml

Mono.VisualStudio.Shell.ShellPackage Error: 0 : ERROR: Failed to parse file C:\TEMP\Xamarin\VS\MyEnergate\MyEnergate\Resources\Anim\SpinAnim.xml
Comment 1 Yuri 2013-08-14 17:59:46 UTC
But it compiles and runs an application with no problem
Comment 2 Dominique Louis 2013-08-15 09:14:51 UTC
Bryan are you still seeing this issue with either 4.8.1 or 4.8.2?
Comment 3 Yuri 2013-08-15 11:37:41 UTC
yes with 4.8.1 and alpha 4.8.2
Comment 6 mlpstingray 2013-08-29 16:27:04 UTC
Same problem here, I'm on Stable 4.8.0 using VS 2012 and it's MAJOR problem for me because when that happen the .apk file size is 0 byte and I cannot write into the usual Apk folders since the .apk is broken.

After several Clean, Rebuild, Clean, Rebuild, like 5-6 timees, then the problem goes away. But when it comes back it's the whole same problem again.
Comment 7 Robert S. 2013-08-30 04:59:27 UTC
I'm using VS 2010, and have the same problem. And it seems there is no chance to get it working through Clean-Rebuild.
Comment 8 Robert S. 2013-08-30 05:18:12 UTC
I just found that in my case the problem seems to be the Intel Atom (x86) AVD.

http://screencast.com/t/RGRdz0gFrT
Comment 9 Jonathan Pryor 2013-08-30 08:52:40 UTC
Given `mono.android.DesignerSession`, I'm guessing this is designer-related.

That said, the problem is the XML:

  <attr name="accessibilityFeedbackType">
    <flag name="feedbackAllMask" value="0xffffffff">
  </attr>

As per the stack trace, Integer.parseInt(String) is used to parse the string "ffffffff", but Integer.parseInt() is defined as using base-10, and clearly ffffffff is not base 10.

http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt(java.lang.String)

Please try using a valid base-10 value for //attr/flag/@value.
Comment 10 Robert S. 2013-08-30 09:29:09 UTC
I'm a beginner with Xamarin. Could you please tell me, where I can find that XML?
Comment 11 Jonathan Pryor 2013-08-30 09:54:07 UTC
@Robert: Based on the stack trace, I'd assume you should look at C:\TEMP\Xamarin\VS\MyEnergate\MyEnergate\Resources\Drawable\ButtonGrayRoundedStyle.xml or C:\TEMP\Xamarin\VS\MyEnergate\MyEnergate\Resources\Anim\SpinAnim.xml.
Comment 12 Yuri 2013-08-30 10:59:53 UTC
And what is wrong there?

<?xml version="1.0" encoding="utf-8" ?>

<!--<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
  <solid android:color="#FF404041" />
  
  <corners android:radius="10dp" />
</shape>-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:state_pressed="true" >
    <shape>
      <solid
          android:color="#404041" />
      <!--<stroke
          android:width="1dp"
          android:color="#992f2f" />-->
      <corners
          android:radius="10dp" />
      <padding
          android:left="10dp"
          android:top="10dp"
          android:right="10dp"
          android:bottom="10dp" />
    </shape>
  </item>
  <item>
    <shape>
      <gradient
          android:startColor="#DBDBDE"
          android:endColor="#606061"
          android:angle="270" />
      <!--<stroke
          android:width="1dp"
          android:color="#992f2f" />-->
      <corners
          android:radius="10dp" />
      <padding
          android:left="10dp"
          android:top="10dp"
          android:right="10dp"
          android:bottom="10dp" />
    </shape>
  </item>
</selector>
Comment 13 Jonathan Pryor 2013-08-30 12:43:11 UTC
@Yuri: I don't see //flag or //attr in Comment #12, nor //@value, so I don't see anything wrong per-se.

Would it be possible to get a copy of the project which suffers from this error?
Comment 14 Lluis Sanchez 2013-08-30 12:49:26 UTC
ERROR: Value in <attr name="accessibilityFeedbackType"><flag name="feedbackAllMask" value="0xffffffff"></attr> is not a valid decimal or hexadecimal

The above error and all the errors before that one shown in the log are bugs in the Android SDK (the resources are wrong), and can be ignored. They should have any effect on the designer.

The remaining errors are all in the MyEnergate directory, and seem to be caused by invalid XML.

Are you seeing any error in the designer? or are you seeing this only in the log? Would it be possible to get a copy of that project?
Comment 15 Yuri 2013-08-30 12:55:32 UTC
I see that in all projects. I have sent one of them to Bryan from your support
Comment 16 Robert S. 2013-09-05 06:31:19 UTC
@Jonathan Pryor: I'm sorry I couldn't get back to you earlier.
In my case I "only" get the Android SDK errors, not these containing the path information.

It's hard to ignore the errors since I cannot run and debug the app any more.
Comment 17 Ian Ceicys 2015-07-21 10:39:37 UTC
Yuri, as there is no response from 08-30-2013 I'm planning on closing this closing this issue by 7/31/2015. I am not able to reproduce this issue without the requested solution file / project file. Please add the solution/project file as an attachment to this bug. 

Please try to upgrade to the latest stable XVS build and if you are still
experiencing the same problem please reply and I'd be more than happy to setup
a screen sharing session to debug the issue.

http://developer.xamarin.com/releases/vs/xamarin.vs_3/xamarin.vs_3.11/
Comment 18 Akhilesh kumar 2015-08-24 08:19:29 UTC
As these is no response on the bug and it is a old bug, so I am closing this
issue.

Please feel free to reopen it again if you have any concern or suggestion for
the same.

Thanks!