#589 closed bug (fixed)
BNode Lock()/Unlock() not implemented
Reported by: | Owned by: | axeld | |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/Kernel | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
It appears that when Vision tries to load the VisionSettings file from /boot/home/config/settings/Vision/ it fails (and then clears it as a result).
It would appear that the failure may be Haiku's inability to properly unflatten the BMessage.
It has also been reported that a VisionSettings file from Zeta also fails.
If necessary, I will attach a VisionSettings file that fails.
Attachments (1)
Change History (21)
comment:1 by , 19 years ago
Cc: | added |
---|
comment:2 by , 19 years ago
comment:3 by , 19 years ago
Owner: | changed from | to
---|
comment:4 by , 19 years ago
I've now tested the attached file both from my test environment and under Haiku itself (both with a stream and a buffer based unflatten) and I can't reproduce the problem. The message unflattens fine and returns B_OK in both cases. Are you sure that it is Unflatten that failes? Or is it possible that there is a problem with the Vision setup or with reading / writing the message?
comment:5 by , 19 years ago
It did occur to me after posting this that mabye it's not the Unflatten() that is causing the problem, but possibly the BFile?
If someone has a chance to download the Vision source (from bebits) - the SettingsFile class is where the problem appears.
I added some debug statements to determine that the proper path for the file was being used, but I realize now that I never actually checked that the file was being read properly.
I will dig in a bit deeper - I apologize that I'm not terribly familiar with the BeAPI and still learning.
comment:6 by , 19 years ago
One thing of note - it appears that Vision is calling Unflatten(&file) where file is a BFile - I see some mention of being supported in the bebook on beunited.org - is that possibly the problem?
comment:7 by , 19 years ago
That's a quite usual way to use Unflatten actually. The BFile represents also a BDataIO which can be read like a stream. I'm rather suspecting the BFile.Lock() or something before that failing.
comment:8 by , 19 years ago
I have been using/testing Vision in Haiku, and for the most part it works well.
I do not know the technicalities, but what happens is that in Haiku Vision seems unable to save any settings, nor is it able to use settings migrated from a Vision installation in BeOS R5 or ZETA.
In other words, although it is possible to set IRC servers and channels, and set Vision preferences, but once you close Vision, all the settings are gone.
Maybe this is all obvious to those looking at this bug, but thought I would post this anyway. FWIW.
comment:9 by , 19 years ago
Yes, it's the file.Lock() that fails. Should this bug be closed as invalid and another one be opened instead or shall I reassign back to you Axel and leave it?
comment:11 by , 19 years ago
It would appear that the issue goes back to the kernel (vfs.cpp I believe) where common_lock_node() and common_unlock_node() are not yet implemented.
If I remove failing file.Lock() calls from Vision's SettingsFile.cpp, it works great!
comment:12 by , 19 years ago
Owner: | changed from | to
---|
comment:13 by , 19 years ago
Summary: | [Vision] can't unflatten R5 BMessage: VisionSettings → [Vision] doesn't load/save settings: BNode Lock()/Unlock() not fully implemented |
---|
comment:14 by , 19 years ago
Owner: | changed from | to
---|
comment:15 by , 19 years ago
Component: | Kits → Kernel |
---|
comment:16 by , 19 years ago
Summary: | [Vision] doesn't load/save settings: BNode Lock()/Unlock() not fully implemented → BNode Lock()/Unlock() not implemented |
---|
comment:17 by , 19 years ago
The Vision part is fixed now, the functions pretend to be successful since hrev17505. I keep this bug open since they still don't work as expected (ie. they still do nothing).
comment:18 by , 18 years ago
Status: | new → closed |
---|
comment:19 by , 18 years ago
Resolution: | → fixed |
---|
Thanks for the example! Can you provide one from Zeta as well? Haiku is supposed to understand both message formats.