Opened 11 years ago
Closed 10 years ago
#4242 closed defect (fixed)
"Send to Friend" feature not working reliably
Reported by: | ajay_garg | Owned by: | humitos |
---|---|---|---|
Priority: | High | Milestone: | Unspecified |
Component: | Sugar | Version: | Git as of bugdate |
Severity: | Unspecified | Keywords: | regression |
Cc: | humitos, erikos, manuq, godiard | Distribution/OS: | Fedora |
Bug Status: | Unconfirmed |
Description
On XO-1.75s, os11 image, the "Send to Friend" feature isn't working.
I see that the build 12 was released just a few hours back, but there isn't any new tangible commit since the 0.97.11 release at http://git.sugarlabs.org/sugar/mainline.
Attachments (7)
Change History (34)
comment:1 Changed 11 years ago by humitos
- Cc humitos added
comment:2 Changed 11 years ago by godiard
- Keywords regression added
comment:3 Changed 11 years ago by manuq
The traceback in shell.log shows this is an issue with the Journal model, similar to #3888 .
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py", line 1442, in __long_pressed_event_cb self.notify_right_click() File "/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py", line 967, in notify_right_click self._ensure_palette_exists() File "/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py", line 955, in _ensure_palette_exists palette = self.parent.create_palette() File "/usr/lib/python2.7/site-packages/jarabe/journal/listview.py", line 641, in create_palette metadata = tree_model.get_metadata(self.props.palette_invoker.path) File "/usr/lib/python2.7/site-packages/jarabe/journal/listmodel.py", line 103, in get_metadata return model.get(self[path][ListModel.COLUMN_UID]) File "/usr/lib/python2.7/site-packages/gi/overrides/Gtk.py", line 782, in __getitem__ aiter = self._getiter(key) File "/usr/lib/python2.7/site-packages/gi/overrides/Gtk.py", line 776, in _getiter aiter = self.get_iter(key) File "/usr/lib/python2.7/site-packages/gi/overrides/Gtk.py", line 798, in get_iter path = TreePath(path) File "/usr/lib/python2.7/site-packages/gi/overrides/Gtk.py", line 1209, in __new__ if len(path) == 0: TypeError: object of type 'NoneType' has no len()
comment:4 Changed 11 years ago by dsd
- Priority changed from Unspecified by Maintainer to High
Changed 10 years ago by humitos
Candidate. It makes Sugar to crash because of a Segmentation Fault that must be solved. I'm researching about this
Changed 10 years ago by humitos
An isolated example to test easily in a local machine using the same logic
comment:5 Changed 10 years ago by humitos
comment:6 Changed 10 years ago by humitos
This is an old bug but maybe useful: https://bugzilla.gnome.org/show_bug.cgi?id=567792
Mailing list thread with the same problem (seems to be already fixed): https://mail.gnome.org/archives/python-hackers-list/2012-June/msg00008.html
comment:7 Changed 10 years ago by humitos
- Owner changed from erikos to humitos
- Status changed from new to accepted
comment:8 Changed 10 years ago by humitos
We need to use these methods:
- http://developer.gnome.org/gio/stable/GInputStream.html#g-input-stream-read-bytes-async
- http://developer.gnome.org/gio/stable/GOutputStream.html#g-output-stream-write-bytes-async
g_input_stream_read_bytes () Like g_input_stream_read(), this tries to read count bytes from the stream in a blocking fashion. However, rather than reading into a user-supplied buffer, this will create a new GBytes containing the data that was read. This may be easier to use from language bindings.
comment:9 Changed 10 years ago by humitos
- Cc erikos manuq godiard added
- Keywords r? added
I attached a patch that is working on 13.1.0 build 16. Can you take a look at it and make a test/review? Thanks!
comment:10 follow-ups: ↓ 11 ↓ 16 Changed 10 years ago by ajay_garg
I checked the feature with
:: development build 16 on XO-1.75 ==> as SENDER
:: development build 16 on XO-1 ==> as RECEIVER
The initial outgoingtransfer, and incomingtransfer icons appear fine; however, when I click "Accept" on the receiver (development build 16 on XO-1), XO-1 crashes, and restarts. No logs could be taken, hence.
I will try to have this working, with XO-1.75s being both the receiver and the sender.
comment:11 in reply to: ↑ 10 Changed 10 years ago by ajay_garg
Replying to ajay_garg:
I checked the feature with
:: development build 16 on XO-1.75 ==> as SENDER
:: development build 16 on XO-1 ==> as RECEIVER
Just wish to mention that I DID replace the patched "filetransfer.py" file :D
The initial outgoingtransfer, and incomingtransfer icons appear fine; however, when I click "Accept" on the receiver (development build 16 on XO-1), XO-1 crashes, and restarts. No logs could be taken, hence.
I will try to have this working, with XO-1.75s being both the receiver and the sender.
comment:12 follow-up: ↓ 13 Changed 10 years ago by godiard
Can you attach shell.log from sender and receiver?
comment:13 in reply to: ↑ 12 ; follow-up: ↓ 14 Changed 10 years ago by ajay_garg
Replying to godiard:
Can you attach shell.log from sender and receiver?
*
Nothing in the logs for the sender.
*
On the receiver (where the crash occurred), the shell.log cannot be taken, as the crash caused "sugar" to restart.
On an unrelated note, please fix http://bugs.sugarlabs.org/ticket/3169 (or http://bugs.sugarlabs.org/ticket/4226, whatever you may like :D ) as soon as possible; as it really swells shell.log like anything. If you wish, I may send the patch for it, it is just a single-line of if-check. :(
comment:14 in reply to: ↑ 13 ; follow-up: ↓ 15 Changed 10 years ago by godiard
On an unrelated note, please fix http://bugs.sugarlabs.org/ticket/3169 (or http://bugs.sugarlabs.org/ticket/4226, whatever you may like :D ) as soon as possible; as it really swells shell.log like anything. If you wish, I may send the patch for it, it is just a single-line of if-check. :(
Please don't use the ticket to put unrelated notes, is not a good way of communication. We have a mailing list too :)
And yes, patches are welcome.
comment:15 in reply to: ↑ 14 Changed 10 years ago by ajay_garg
Replying to godiard:
On an unrelated note, please fix http://bugs.sugarlabs.org/ticket/3169 (or http://bugs.sugarlabs.org/ticket/4226, whatever you may like :D ) as soon as possible; as it really swells shell.log like anything. If you wish, I may send the patch for it, it is just a single-line of if-check. :(
Please don't use the ticket to put unrelated notes, is not a good way of communication. We have a mailing list too :)
Ok, sorry for that :)
Will take care in the future.
And yes, patches are welcome.
Posted the patch, and attached the link on the tickets.
comment:16 in reply to: ↑ 10 ; follow-up: ↓ 17 Changed 10 years ago by humitos
Replying to ajay_garg:
I click "Accept" on the receiver (development build 16 on XO-1), XO-1 crashes
Mmmh... I don't have an XO-1. So, I can't test / fix this.
@gonzalo: do you have one? Maybe I can help you if you want. Just let me know.
comment:17 in reply to: ↑ 16 Changed 10 years ago by humitos
Replying to humitos:
Replying to ajay_garg:
I click "Accept" on the receiver (development build 16 on XO-1), XO-1 crashes
Mmmh... I don't have an XO-1. So, I can't test / fix this.
I got a borrowed XO-1. I test this patch between
- XO-4 (build 18 with my patch)
- XO-1 (build 18 with my patch)
and I had no problem at all with the transfer. I used both of them as receivers and senders.
Besides, I tried between
- XO-1.75 (12.1.0 build 21 -without my patch)
- XO-1 (build 18 with my patch)
and I had no problem at all with the transfer. I used both of them as receivers and senders.
@ajay_garg: please, next time be more specific with your report. Give more information, do better test and so. I spent a lot of time to get and XO-1, downloading the build and patching / testing this issue.
comment:18 Changed 10 years ago by ajay_garg
@humitos:
1)
Open "Record" activity.
2)
Close the activity.
3)
Send the "Record Activity" entry to XO-1 (as the receiver).
4)
Click "Accept¨ on the XO'1.
5)
See if the XO-1 crashes.
comment:19 Changed 10 years ago by ajay_garg
@humitos :
Another testcase ::
1)
Copy the attached filetransfer.py file from pen-drive to Journal.
2)
Send the "filetransfer.py" entry to XO-1 (as the receiver).
3)
Click "Accept¨ on the XO'1.
4)
See if the XO-1 crashes.
Both the above test-cases are for build 16 (for both XO-1.75 and XO-1).
If things work fine in build 18 (as you said that you have lately tested on build 18), I am fine with it; although I would say testing on build 16 will make your "feeling-like-a-fool-borrowing-a-XO-1" feeling go away.
Changed 10 years ago by ajay_garg
comment:20 Changed 10 years ago by manuq
- Keywords r+ added; r? removed
The latest patch with the improved comment explain the reasoning behind the changes. r+ from me.
comment:21 Changed 10 years ago by erikos
The trace noted in #comment:3 has been moved to #4339, as this seem to be an issue with the tree model code when doing a long press on an activity icon in the Journal list.
I am a bit unsure about the need for the "gobject.threads_init()", it seems to work here without it, or maybe I am just lucky.
I am a bit confused about the description, about "read_bytes_async", but that can be an issue in the explanation only, or a misunderstanding on my side.
comment:22 follow-up: ↓ 23 Changed 10 years ago by ajay_garg
@humitos,
The two test-cases I mentioned are failing even on build 18 (after applying the patch, of course).
Please confirm/un-confirm if the same happens at your side, so that I may figure out if I am being incredibly stupid somewhere.
comment:23 in reply to: ↑ 22 Changed 10 years ago by humitos
- Resolution set to fixed
- Status changed from accepted to closed
Replying to ajay_garg:
Please confirm/un-confirm if the same happens at your side, so that I may figure out if I am being incredibly stupid somewhere.
I don't have the XO-1 anymore, but the second one worked the other day at least.
This PATCH was pushed as d7ea857 and it's included in 0.98.2.
So, please install that version of sugar and re-test your test case. In case that they fail, please open a new ticket with the correct explanation and with a link to this ticket.
Thanks!
comment:24 Changed 10 years ago by erikos
- Keywords r+ removed
- Resolution fixed deleted
- Status changed from closed to reopened
I did just tested with a XO-1 and an XO-4. The first time I tried sending something over did not work, both ways. Then in the same session I tried again, and it worked, both ways. We need to look a bit closer at the details.
comment:25 Changed 10 years ago by erikos
- Summary changed from "Send to Friend" feature not working to "Send to Friend" feature not working reliably
comment:26 Changed 10 years ago by dnarvaez
- Milestone changed from 0.98 to Unspecified
comment:27 Changed 10 years ago by dnarvaez
- Resolution set to fixed
- Status changed from reopened to closed
Sounds like we have least attempted to fix it. We need a way to reproduce, if it's reproducable, to be able to do something about it.
I have the same problem. When I try to send a file to a friend Sugar crashes and it's restarted.