We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 359 - Bad BeOS loadso error messages...
Summary: Bad BeOS loadso error messages...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: loadso (show other bugs)
Version: HG 1.2
Hardware: x86 BeOS
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-07 06:53 UTC by Ryan C. Gordon
Modified: 2006-11-07 10:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan C. Gordon 2006-11-07 06:53:34 UTC
BeOS's loadso backend just reports "BeOS error" via SDL_GetError() if loading a shared library fails, and "Symbol not found" if symbol lookup fails.

This is due to incorrect documentation in The Be Book, which says these functions return B_ERROR on failure...however, load_add_on() actually returns a negative number that can be pushed through strerror() to find out what went wrong (get_image_symbol() may, too, but B_ERROR will work in strerror, too, so it doesn't hurt).

Also: since load_add_on() doesn't actually return B_ERROR, the current test in SDL will return a bogus library handle on failure and call it success.

---ryan.
Comment 1 Ryan C. Gordon 2006-11-07 10:38:59 UTC
Fixed in svn revision #2904 for 1.2 branch and #2905 for 1.3 branch.

--ryan.