View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022105 | Open CASCADE | OCCT:Visualization | public | 2010-11-03 18:20 | 2012-03-29 17:26 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | trivial | ||
Status | closed | Resolution | fixed | ||
OS | All | ||||
Fixed in Version | 6.5.1 | ||||
Summary | 0022105: Suspicious call to XOpenDisplay() in OSD_FontMgr class | ||||
Description | In OSD_FontMgr::InitFontDataBase() the following line results in a crash of an application using 3D viewer through a remote connection to Cygwin X server: Display * disp = XOpenDisplay("localhost:0.0"); Xlib manual for XOpenDisplay() says that: ============================================= Syntax Display *XOpenDisplay(display_name) char *display_name; Arguments display_name Specifies the hardware display name, which determines the display and communications domain to be used. On a POSIX-conformant system, if the display_name is NULL, it defaults to the value of the DISPLAY environment variable. ============================================= The font manager should collect the fonts available to the X server used by the application. Therefore it is necessary at least to try to call XOpenDisplay(NULL) and check if text rendering works well for both local and remote connections to X servers (both Linux and Windows X servers should be checked). | ||||
Additional information and documentation updates | Documentation remark, added by APL 2011-03-24 12:55:50: Changes: There are following changes in packages: OSD package: 1) The OSD_FontManager::InitFontDataBase method algorithm corrected. Now there is connection to client's display with XOpenDisplay("localhost:0.0") call at first, and then, if it is failed, with XOpenDisplay(":0.0") call. OpenGl package: 1) The OpenGl_TextRender::RenderText corrected. There was an uncontrolled memory allocation if the OSD_FontManager's font database was empty. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
2011-03-24 14:31
|
apl-OCC22105-v1.tar.gz (7,828 bytes) |
|
See message on the forum thread http://www.opencascade.org/org/forum/thread_21351/ by Denis Barbier: > see http://www.opencascade.org/org/forum/thread_20101/ for instance, they applied a wrong fix in OCCT 6.5.1 I guess he means that using NULL would be better than ":0.0" -- Sergey and Anton, what is your idea? |
|
Hello Andrey, The reason why we cannot use XOpenDisplay( NULL ) call in OSD_FontMgr is that we need to enumerate the font files located on the machine where the application is executed - that is, on the "localhost" in terms of code execution. NULL argument value implies that the existing X connection is used. There is no difference when an application is run locally. However, if an application is run remotely, the existing X connection usually leads us to the wrong machine: a GUI application normally has the X display on the local machine, while the application code is executed on a remote machine. As a result, we obtain the wrong font files (located on the X server side!), which cannot be accessed later by FreeType and FTGL from the localhost machine. Best regards, Sergey |
|
Reminder sent to: Hello ATP, Could you please copy the text of 0022105:0017926 and post it as the answer in the OCCT forum post in http://www.opencascade.org/org/forum/thread_21351/ by Denis Barbier of 2011/08/05 14:41? Thanks in advance! Sergey |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-11-03 18:21 |
|
CC | => vsr |
2010-11-10 11:59 | bugmaster | Assigned To | bugmaster => psn |
2010-11-10 11:59 | bugmaster | Status | new => assigned |
2010-11-12 17:38 |
|
Status | assigned => resolved |
2011-02-10 14:58 | bugmaster | Assigned To | psn => san |
2011-02-10 14:58 | bugmaster | Status | resolved => assigned |
2011-03-11 12:04 |
|
Assigned To | san => apl |
2011-03-24 14:56 |
|
Status | assigned => resolved |
2011-04-06 18:57 |
|
Status | resolved => tested |
2011-04-28 19:04 | bugmaster | Status | tested => verified |
2011-08-02 11:24 | bugmaster | Category | OCCT:VIZ => OCCT:Visualization |
2011-08-05 17:11 |
|
Note Added: 0017924 | |
2011-08-05 19:14 |
|
Note Added: 0017926 | |
2011-08-05 19:22 |
|
Note Added: 0017927 | |
2011-12-26 18:11 |
|
Description Updated | |
2011-12-26 18:11 |
|
Additional Information Updated | |
2011-12-26 18:12 |
|
Note Edited: 0017927 | |
2012-03-29 17:26 | bugmaster | Changeset attached | => occt master 28e85034 |