Opened 19 years ago

Closed 19 years ago

Last modified 19 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:
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@… 19 years ago.
flattened BMessage VisionSettings file from R5

Download all attachments as: .zip

Change History (21)

comment:1 by umccullough@…, 19 years ago

Cc: koki@… added

comment:2 by axeld, 19 years ago

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

comment:3 by axeld, 19 years ago

Owner: changed from axeld to mmlr

by umccullough@…, 19 years ago

Attachment: VisionSettings added

flattened BMessage VisionSettings file from R5

comment:4 by mmlr, 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 umccullough@…, 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 umccullough@…, 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 mmlr, 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 koki@…, 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 mmlr, 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:10 by umccullough@…, 19 years ago

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

comment:11 by umccullough@…, 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 umccullough@…, 19 years ago

Owner: changed from mmlr to bonefish

comment:13 by umccullough@…, 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 umccullough@…, 19 years ago

Owner: changed from bonefish to axeld

comment:15 by umccullough@…, 19 years ago

Component: KitsKernel

comment:16 by axeld, 19 years ago

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

comment:17 by axeld, 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 axeld, 19 years ago

Status: newclosed

comment:19 by axeld, 19 years ago

Resolution: fixed

comment:20 by axeld, 19 years ago

Implemented in hrev17697.

Note: See TracTickets for help on using tickets.