Opened 16 years ago

Closed 16 years ago

#4422 closed patch (fixed)

when linking errors occur while loading plugins, the errors are not displayed correctly

Reported by: bradley.kite@… Owned by: Anduin Withers
Priority: minor Milestone: unknown
Component: mythtv Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

dlerror() is called twice if loading a libmythplugin.so fails - the first call clears the error so the actual error displayed doesnt contain the reason.

Patch attached.

Attachments (4)

dlerror.patch (760 bytes) - added by bradley.kite@… 16 years ago.
display dlerror() correctly
dlerr.win.patch (974 bytes) - added by Nigel 16 years ago.
Working MinGW dlerror() ?
dlerr.win.2.patch (1.3 KB) - added by Nigel 16 years ago.
Use snprintf, include stdio.h
dlerr.win.3.patch (396 bytes) - added by jaymode@… 16 years ago.
New patch to fix multiple definition errors

Download all attachments as: .zip

Change History (13)

comment:1 Changed 16 years ago by Joe Ripley <vitaminjoe@…>

I think you forgot to attach the patch file...

-- Joe Ripley vitaminjoe@…

Changed 16 years ago by bradley.kite@…

Attachment: dlerror.patch added

display dlerror() correctly

comment:2 Changed 16 years ago by bradley.kite@…

Indeed - trac created the ticket before I attached the file - I thought it would only create the ticket once I had attached it...

comment:3 Changed 16 years ago by Anduin Withers

Owner: changed from Isaac Richards to Anduin Withers
Status: newaccepted

comment:4 Changed 16 years ago by Anduin Withers

Resolution: fixed
Status: acceptedclosed

(In [15322]) Closes #4422

Stop erasing dlerror() by calling it twice. Missing symbols in plugins will now be displayed.

Patch courtesy of Bradley Kite.

comment:5 Changed 16 years ago by Simon Kenyon <simon@…>

Resolution: fixed
Status: closednew

methinks this broke the build (well it does on windows) here is the error message:

mythplugin.cpp: In member function `int MythPlugin::init(const char*)':

mythplugin.cpp:39: error: call of overloaded `QString(DWORD)' is ambiguous

C:/MSys/1.0/qt-3.3.x-p8/include/qstring.h:409: note: candidates are:

QString::QString(const std::string&) <near match>

C:/MSys/1.0/qt-3.3.x-p8/include/qstring.h:406: note:

QString::QString(const char*) <near match>

C:/MSys/1.0/qt-3.3.x-p8/include/qstring.h:403: note:

QString::QString(const QByteArray&)

C:/MSys/1.0/qt-3.3.x-p8/include/qstring.h:402: note:

QString::QString(const QString&) <near match>

C:/MSys/1.0/qt-3.3.x-p8/include/qstring.h:401: note:

QString::QString(QChar)

Changed 16 years ago by Nigel

Attachment: dlerr.win.patch added

Working MinGW dlerror() ?

comment:6 Changed 16 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

dlerr.win.patch tested with both SVN 15336 and 15340(HEAD):

./mpegts.o: In function `dlerror': c:/mythtv/mythtv/libs/libavformat/../libmyth/compat.h:205: undefined reference to `sprintf_is_forbidden_due_to_security_issues_use_snprintf' collect2: ld returned 1 exit status

Changed 16 years ago by Nigel

Attachment: dlerr.win.2.patch added

Use snprintf, include stdio.h

comment:7 Changed 16 years ago by Nigel

Resolution: fixed
Status: newclosed

Verified by Jay Modi. Applied in [15356]

Changed 16 years ago by jaymode@…

Attachment: dlerr.win.3.patch added

New patch to fix multiple definition errors

comment:8 Changed 16 years ago by jaymode@…

Resolution: fixed
Status: closednew

Attached patch to fix a multiple definition error of dlerror

comment:9 Changed 16 years ago by Nigel

Resolution: fixed
Status: newclosed

(In [15365]) MinGW C compiler doesn't allow inline functions in C, so disable inline dlerror() there and replace with harmless(?) string. Slightly modified version of patch by Jay Mode. Closes #4422 (again :-)

Note: See TracTickets for help on using tickets.