Skip to content

Fix crash when sending file from terminal; Silence some warnings#28

Closed
jeremypw wants to merge 2 commits intomainfrom
jeremypw/fix-bluetooth-send-files
Closed

Fix crash when sending file from terminal; Silence some warnings#28
jeremypw wants to merge 2 commits intomainfrom
jeremypw/fix-bluetooth-send-files

Conversation

@jeremypw
Copy link
Copy Markdown
Contributor

@jeremypw jeremypw commented Dec 31, 2024

  • Use Gee.ArrayList instead of File[] - this stopped the crash
  • Ensure the ObjectManager has finished initializing before sending files. This ensures certain functions' requirements are met before they are called

This makes the scan_and_send_files function wait in Idle loop until object_manager flags it is ready - is there a more elegant way?

@danirabbit danirabbit requested a review from a team February 26, 2025 21:10
zeebok
zeebok previously approved these changes Jun 1, 2025
Copy link
Copy Markdown

@zeebok zeebok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested but the code changes make sense

# Conflicts fixed:
#	src/Application.vala
#	src/Services/Manager.vala
@jeremypw jeremypw requested a review from zeebok June 1, 2025 15:39
@jeremypw jeremypw dismissed zeebok’s stale review June 1, 2025 15:40

Significant changes due to merging main - needs to be checked and tested again.

@jeremypw
Copy link
Copy Markdown
Contributor Author

jeremypw commented Jun 1, 2025

@zeebok Thanks for looking at this! It is some time since I last visited it and there have been significant changes in main which I have merged in but am not sure if it is correct. I cannot test on OS8 at the moment as I run that in a VM. I'll try to test in Horus though. This doesn't seem to be linked to a particular issue and I cannot remember now how I reproduced the crash 😞

@jeremypw
Copy link
Copy Markdown
Contributor Author

jeremypw commented Jun 1, 2025

Well, I managed to transfer a file to my Android phone OK using Files and also using bt-obex -p from the terminal. Hopefully someone can test this further on OS8.

@leonardo-lemos
Copy link
Copy Markdown
Contributor

@jeremypw Can you provide more info about how to reproduce the crash, please?

@jeremypw
Copy link
Copy Markdown
Contributor Author

jeremypw commented Jun 2, 2025

@leonardo-lemos Sorry I cannot remember now exactly what prompted this PR, but I just tried installing the main branch on OS7.1 and running bt-obex -p <devicename> <path-to-file> when the device was not connected and it successfully connected to the device and transferred the file so I think maybe the issue has been fixed elsewhere. I am going to close this for now.

@jeremypw jeremypw closed this Jun 2, 2025
@jeremypw
Copy link
Copy Markdown
Contributor Author

jeremypw commented Jun 2, 2025

I think if may be something to do with running io.elementary.bluetooth --send=<path> in the terminal. This does not seem to work on Horus. Nothing happens at all - the io.elementary.bluetooth process does not crash tho.

I'll look into it further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants