InitializationException: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"

Bug #793524 reported by Philipp C. Heckel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Syncany
Fix Released
Medium
Unassigned

Bug Description

I received this crash report via the Syncany report functionality. Thanks for reporting @anonymous!

org.syncany.exceptions.InitializationException: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"
       at org.syncany.gui.linux.LinuxNativeClient.startService(LinuxNativeClient.java:290)
       at org.syncany.gui.linux.LinuxNativeClient.init(LinuxNativeClient.java:84)
       at org.syncany.gui.tray.linux.LinuxTray.init(LinuxTray.java:51)
       at org.syncany.Application.initUI(Application.java:175)
       at org.syncany.Application.start(Application.java:105)
       at org.syncany.Syncany.start(Syncany.java:92)
       at org.syncany.Syncany.main(Syncany.java:49)
Caused by: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"
       at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
       at java.lang.Integer.parseInt(Integer.java:481)
       at java.lang.Integer.parseInt(Integer.java:514)
       at org.syncany.gui.linux.LinuxNativeClient.startService(LinuxNativeClient.java:263)
       ... 6 more

This has to do with the new python script which is meant to show the tray icon. Instead of starting properly, the python script crashes. If other people have this problem, please do the following and post the results:

$ cd dist/bin
$ ./native.py /absolute/path/to/the/syncany/res/directory abc123

For me that would be
$ ./native.py /home/pheckel/Code/syncany/syncany/dist/res abc123

Thanks!

Changed in syncany:
importance: Undecided → Medium
Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

I consider this fixed now, although it might be nice to have the full error stack from the python script if it crashes ...

Changed in syncany:
status: New → Fix Committed
Revision history for this message
Jan-Erik Mai (in0de) wrote :

Traceback (most recent call last):
  File "./native.py", line 44, in <module>
    import gobject
ImportError: No module named gobject

:) arch linux i686

Revision history for this message
Philipp C. Heckel (binwiederhier) wrote : Re: [Bug 793524] Re: InitializationException: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"

Just uncomment it. The script doesnt use it anyway.
I'll push a fix right away.

On Mon, Jun 6, 2011 at 9:34 PM, Jan-Erik Mai <email address hidden> wrote:
> Traceback (most recent call last):
>  File "./native.py", line 44, in <module>
>    import gobject
> ImportError: No module named gobject
>
> :) arch linux i686
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/793524
>
> Title:
>  InitializationException: java.lang.NumberFormatException: For input
>  string: \"Traceback (most recent call last):\"
>
> Status in Syncany:
>  Fix Committed
>
> Bug description:
>  I received this crash report via the Syncany report functionality.
>  Thanks for reporting @anonymous!
>
>  org.syncany.exceptions.InitializationException: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"
>         at org.syncany.gui.linux.LinuxNativeClient.startService(LinuxNativeClient.java:290)
>         at org.syncany.gui.linux.LinuxNativeClient.init(LinuxNativeClient.java:84)
>         at org.syncany.gui.tray.linux.LinuxTray.init(LinuxTray.java:51)
>         at org.syncany.Application.initUI(Application.java:175)
>         at org.syncany.Application.start(Application.java:105)
>         at org.syncany.Syncany.start(Syncany.java:92)
>         at org.syncany.Syncany.main(Syncany.java:49)
>  Caused by: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"
>         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>         at java.lang.Integer.parseInt(Integer.java:481)
>         at java.lang.Integer.parseInt(Integer.java:514)
>         at org.syncany.gui.linux.LinuxNativeClient.startService(LinuxNativeClient.java:263)
>         ... 6 more
>
>
>  This  has to do with the new python script which is meant to show the tray icon. Instead of starting properly, the python script crashes. If other people have this problem, please do the following and post the results:
>
>  $ cd dist/bin
>  $ ./native.py /absolute/path/to/the/syncany/res/directory abc123
>
>  For me that would be
>  $ ./native.py /home/pheckel/Code/syncany/syncany/dist/res abc123
>
>  Thanks!
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/syncany/+bug/793524/+subscribe
>

Revision history for this message
isakkarlsson (isak-karlsson) wrote :

You also need to run the script with "python2" instead of "python" (which is python3) on arch linux.

Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

Hi Isaak,

This doesnt get easier with all the distros :-d
Do you have an idea how to do that? Is there a way to make the script
work on python3 as well?

The only option I see for this is to make a wrapper script that tests
the distro... but that would be ugly^2 ... Java calls Bash calls
Python. I don't even like the "Java calls Python" version ...

On Tue, Jun 7, 2011 at 12:25 AM, isakkarlsson <email address hidden> wrote:
> You also need to run the script with "python2" instead of "python"
> (which is python3) on arch linux.
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/793524
>
> Title:
>  InitializationException: java.lang.NumberFormatException: For input
>  string: \"Traceback (most recent call last):\"
>
> Status in Syncany:
>  Fix Committed
>
> Bug description:
>  I received this crash report via the Syncany report functionality.
>  Thanks for reporting @anonymous!
>
>  org.syncany.exceptions.InitializationException: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"
>         at org.syncany.gui.linux.LinuxNativeClient.startService(LinuxNativeClient.java:290)
>         at org.syncany.gui.linux.LinuxNativeClient.init(LinuxNativeClient.java:84)
>         at org.syncany.gui.tray.linux.LinuxTray.init(LinuxTray.java:51)
>         at org.syncany.Application.initUI(Application.java:175)
>         at org.syncany.Application.start(Application.java:105)
>         at org.syncany.Syncany.start(Syncany.java:92)
>         at org.syncany.Syncany.main(Syncany.java:49)
>  Caused by: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"
>         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>         at java.lang.Integer.parseInt(Integer.java:481)
>         at java.lang.Integer.parseInt(Integer.java:514)
>         at org.syncany.gui.linux.LinuxNativeClient.startService(LinuxNativeClient.java:263)
>         ... 6 more
>
>
>  This  has to do with the new python script which is meant to show the tray icon. Instead of starting properly, the python script crashes. If other people have this problem, please do the following and post the results:
>
>  $ cd dist/bin
>  $ ./native.py /absolute/path/to/the/syncany/res/directory abc123
>
>  For me that would be
>  $ ./native.py /home/pheckel/Code/syncany/syncany/dist/res abc123
>
>  Thanks!
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/syncany/+bug/793524/+subscribe
>

Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

Where is the python2 binary? I could just check if it exists from the
java script and call it differently.
Does it work if you launch it like this "/usr/bin/python2 path/to/native.py" ?

On Tue, Jun 7, 2011 at 12:40 AM, Philipp Heckel
<email address hidden> wrote:
> Hi Isaak,
>
> This doesnt get easier with all the distros :-d
> Do you have an idea how to do that? Is there a way to make the script
> work on python3 as well?
>
> The only option I see for this is to make a wrapper script that tests
> the distro... but that would be ugly^2 ... Java calls Bash calls
> Python. I don't even like the "Java calls Python" version ...
>
> On Tue, Jun 7, 2011 at 12:25 AM, isakkarlsson <email address hidden> wrote:
>> You also need to run the script with "python2" instead of "python"
>> (which is python3) on arch linux.
>>
>> --
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>> https://bugs.launchpad.net/bugs/793524
>>
>> Title:
>>  InitializationException: java.lang.NumberFormatException: For input
>>  string: \"Traceback (most recent call last):\"
>>
>> Status in Syncany:
>>  Fix Committed
>>
>> Bug description:
>>  I received this crash report via the Syncany report functionality.
>>  Thanks for reporting @anonymous!
>>
>>  org.syncany.exceptions.InitializationException: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"
>>         at org.syncany.gui.linux.LinuxNativeClient.startService(LinuxNativeClient.java:290)
>>         at org.syncany.gui.linux.LinuxNativeClient.init(LinuxNativeClient.java:84)
>>         at org.syncany.gui.tray.linux.LinuxTray.init(LinuxTray.java:51)
>>         at org.syncany.Application.initUI(Application.java:175)
>>         at org.syncany.Application.start(Application.java:105)
>>         at org.syncany.Syncany.start(Syncany.java:92)
>>         at org.syncany.Syncany.main(Syncany.java:49)
>>  Caused by: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"
>>         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>>         at java.lang.Integer.parseInt(Integer.java:481)
>>         at java.lang.Integer.parseInt(Integer.java:514)
>>         at org.syncany.gui.linux.LinuxNativeClient.startService(LinuxNativeClient.java:263)
>>         ... 6 more
>>
>>
>>  This  has to do with the new python script which is meant to show the tray icon. Instead of starting properly, the python script crashes. If other people have this problem, please do the following and post the results:
>>
>>  $ cd dist/bin
>>  $ ./native.py /absolute/path/to/the/syncany/res/directory abc123
>>
>>  For me that would be
>>  $ ./native.py /home/pheckel/Code/syncany/syncany/dist/res abc123
>>
>>  Thanks!
>>
>> To unsubscribe from this bug, go to:
>> https://bugs.launchpad.net/syncany/+bug/793524/+subscribe
>>
>

Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

I believe it should work. I pushed a fix on the trunk.

On Tue, Jun 7, 2011 at 12:43 AM, Philipp Heckel
<email address hidden> wrote:
> Where is the python2 binary? I could just check if it exists from the
> java script and call it differently.
> Does it work if you launch it like this "/usr/bin/python2 path/to/native.py" ?
>
> On Tue, Jun 7, 2011 at 12:40 AM, Philipp Heckel
> <email address hidden> wrote:
>> Hi Isaak,
>>
>> This doesnt get easier with all the distros :-d
>> Do you have an idea how to do that? Is there a way to make the script
>> work on python3 as well?
>>
>> The only option I see for this is to make a wrapper script that tests
>> the distro... but that would be ugly^2 ... Java calls Bash calls
>> Python. I don't even like the "Java calls Python" version ...
>>
>> On Tue, Jun 7, 2011 at 12:25 AM, isakkarlsson <email address hidden> wrote:
>>> You also need to run the script with "python2" instead of "python"
>>> (which is python3) on arch linux.
>>>
>>> --
>>> You received this bug notification because you are a direct subscriber
>>> of the bug.
>>> https://bugs.launchpad.net/bugs/793524
>>>
>>> Title:
>>>  InitializationException: java.lang.NumberFormatException: For input
>>>  string: \"Traceback (most recent call last):\"
>>>
>>> Status in Syncany:
>>>  Fix Committed
>>>
>>> Bug description:
>>>  I received this crash report via the Syncany report functionality.
>>>  Thanks for reporting @anonymous!
>>>
>>>  org.syncany.exceptions.InitializationException: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"
>>>         at org.syncany.gui.linux.LinuxNativeClient.startService(LinuxNativeClient.java:290)
>>>         at org.syncany.gui.linux.LinuxNativeClient.init(LinuxNativeClient.java:84)
>>>         at org.syncany.gui.tray.linux.LinuxTray.init(LinuxTray.java:51)
>>>         at org.syncany.Application.initUI(Application.java:175)
>>>         at org.syncany.Application.start(Application.java:105)
>>>         at org.syncany.Syncany.start(Syncany.java:92)
>>>         at org.syncany.Syncany.main(Syncany.java:49)
>>>  Caused by: java.lang.NumberFormatException: For input string: \"Traceback (most recent call last):\"
>>>         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>>>         at java.lang.Integer.parseInt(Integer.java:481)
>>>         at java.lang.Integer.parseInt(Integer.java:514)
>>>         at org.syncany.gui.linux.LinuxNativeClient.startService(LinuxNativeClient.java:263)
>>>         ... 6 more
>>>
>>>
>>>  This  has to do with the new python script which is meant to show the tray icon. Instead of starting properly, the python script crashes. If other people have this problem, please do the following and post the results:
>>>
>>>  $ cd dist/bin
>>>  $ ./native.py /absolute/path/to/the/syncany/res/directory abc123
>>>
>>>  For me that would be
>>>  $ ./native.py /home/pheckel/Code/syncany/syncany/dist/res abc123
>>>
>>>  Thanks!
>>>
>>> To unsubscribe from this bug, go to:
>>> https://bugs.launchpad.net/syncany/+bug/793524/+subscribe
>>>
>>
>

Revision history for this message
isakkarlsson (isak-karlsson) wrote :

I think we should maybe rethink the design a bit. I would suggest that we have one listener that has a defined interface as it is today -- but the notification daemon (or what we call it) might be separate (as with the linux version) for all platforms.

This would allow for a simpler code base (no need for different AbstractCommonTray implementations) but only different notification daemon implementations for different platforms. This would also allow for applications or other things to interact with syncany.

The only different thing needed for different platforms then would be different startup-scripts.

What do you think about this?

Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

Hi Isak,

I also thought about this. I find this is an excellent idea, and should be further discussed! I registered a blueprint [1] and will soon open another bug so we can discuss the details.

If you like, you can take the lead on this!

Cheers
Philipp

[1] https://blueprints.launchpad.net/syncany/+spec/daemonize-core

Revision history for this message
Jan-Erik Mai (in0de) wrote :

I think deluge is a good example for it.

There is the deluge-daemon (core) and you can start and connect gtk-interface or webui to the daemon.

http://deluge-torrent.org/

Changed in syncany:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.