Opened 5 years ago
Last modified 5 years ago
#15533 new bug
[scripting] Incorrect reply to InternalName property in Tracker
Reported by: | X512 | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/Application Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This is hrev53618 gcc2hybrid.
At least one Tracker window should be opened.
When executing command
hey "application/x-vnd.Be-TRAK" GET InternalName of View 0 of Window 2
, reply is
Reply BMessage(B_REPLY): "error" (B_INT32_TYPE) : 0 (0x00000000)
, but "result" field containing name string should be present.
Change History (4)
comment:1 by , 5 years ago
Component: | Kits/libtracker.so → Kits/Application Kit |
---|
comment:2 by , 5 years ago
BeOS returns empty B_REPLY message in this case, "error" field is also missing.
I think that it's strange that NULL is a valid name for BHandler. At least "" (empty string) name should be used. I don't know can it cause compatability issues.
comment:3 by , 5 years ago
Sorry, I'm not following you. When BeOS has the same behavior, where is the bug?
comment:4 by , 5 years ago
I have not checked BeOS behavior when I create this ticket. In terms of BeOS compatibility this is not a bug, but behavior looks weird.
The first view is probably a BGroupView: https://git.haiku-os.org/haiku/tree/src/kits/tracker/ContainerWindow.cpp#n619 which isn't given a name. The BHandler which handles the "InternalName" request tries to add the name to the BMessage at https://git.haiku-os.org/haiku/tree/src/kits/app/Handler.cpp#n243 BMessage ignores the call, being passed a NULL value. It seems one can't add a NULL "result" field in a BMessage, and the failure B_BAD_VALUE is ignored in BHandler::MessageReceived().
In the end, the right question is what should be the correct reply. B_BAD_VALUE as a error isn't nice too.