Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#589 closed bug (fixed)

BNode Lock()/Unlock() not implemented

Reported by: umccullough@… Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version:
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no 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)

VisionSettings (3.0 KB) - added by umccullough@… 13 years ago.
flattened BMessage VisionSettings file from R5

Download all attachments as: .zip

Change History (21)

comment:1 Changed 13 years ago by umccullough@…

Cc: koki@… added

comment:2 Changed 13 years ago by axeld

Thanks for the example! Can you provide one from Zeta as well? Haiku is supposed to understand both message formats.

comment:3 Changed 13 years ago by axeld

Owner: changed from axeld to mmlr

Changed 13 years ago by umccullough@…

Attachment: VisionSettings added

flattened BMessage VisionSettings file from R5

comment:4 Changed 13 years ago by mmlr

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 Changed 13 years ago by umccullough@…

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 Changed 13 years ago by umccullough@…

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 Changed 13 years ago by mmlr

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 Changed 13 years ago by koki@…

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 Changed 13 years ago by mmlr

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:10 Changed 13 years ago by umccullough@…

Maybe we just change the Summary and re-assign to Axel?

comment:11 Changed 13 years ago by umccullough@…

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 Changed 13 years ago by umccullough@…

Owner: changed from mmlr to bonefish

comment:13 Changed 13 years ago by umccullough@…

Summary: [Vision] can't unflatten R5 BMessage: VisionSettings[Vision] doesn't load/save settings: BNode Lock()/Unlock() not fully implemented

comment:14 Changed 13 years ago by umccullough@…

Owner: changed from bonefish to axeld

comment:15 Changed 13 years ago by umccullough@…

Component: KitsKernel

comment:16 Changed 13 years ago by axeld

Summary: [Vision] doesn't load/save settings: BNode Lock()/Unlock() not fully implementedBNode Lock()/Unlock() not implemented

comment:17 Changed 13 years ago by axeld

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 Changed 13 years ago by axeld

Status: newclosed

comment:19 Changed 13 years ago by axeld

Resolution: fixed

comment:20 Changed 13 years ago by axeld

Implemented in hrev17697.

Note: See TracTickets for help on using tickets.