Opened 14 years ago

Last modified 12 years ago

#1436 closed defect

Ajax View: Cannot preview the basic web layout — at Version 2

Reported by: hubu Owned by: hubu
Priority: high Milestone: 2.3
Component: General Version: 2.2.0
Severity: blocker Keywords: haspatch
Cc: brucedechant External ID: 1345494

Description (last modified by brucedechant)

When open a basic Web layout, we will encounter a error: Configuration exception: C:\Program Files\Autodesk\!MapGuideEnterprise2011\WebServerExtensions\www\mapviewernet\../webconfig.ini

Comments: This is due to the ACE upgrade to 5.8.0

Change History (3)

by hubu, 14 years ago

Attachment: #1436.patch added

Fix for this ticket

comment:1 by hubu, 14 years ago

This is caused by ACE 5.8.0 integration. in the ACE_Configuration_Heap::open() function, there are some new lines to detect whether the allocator_ is null like this

if (this->allocator_ != 0)

{

errno = EBUSY; return -1;

}

The function ACE_Configuration_Heap::open() is invoked when open the webconfig.ini (by m_config.open()). The first time we open the webconfig.ini, everything works fine. If the webconfig.ini has been already opened, the value of allocator_ is not null. At this time, if we try to open it again, we will get ACE EBUSY status and return -1. Then the m_config.Open() will fail.

In MapGuide, the MgConfiguration::LoadConfiguration() function, we have following code

m_fileLoaded = false; ;solution #1, remove this line m_fileName = fileName if(m_config.Open()) {

if(m_config.ImportConfig(fileName)) {

m_fileLoaded = true;

} ……………

} else {

ACE_ERROR((LM_ERROR, ACE_TEXT("%p\n"), ACE_TEXT("MgConfiguration::LoadConfiguration()")));

}

The varable "m_fileLoaded" is used to indicate whether the webconfig.ini is loaded. When the config.Open() failed, the m_fileLoaded is false, however the webconfig.ini is loaded actually in the first time. The incorrect m_fileLoaded will block the basic web layout to display.

Solution #1: Remove the statement "m_fileLoaded = false;" before config.Open(). Then the value of m_fileLoaded is correct. But this solution will result in MG can't reload the configure file. I am afraid this solution will affect the GeoRest(Seems GeoRest will load a configure file other than webconfig.ini). I have attached #1436.patch for this solution.

Solution #2: Remove the new lines from the ACE source code. Maybe this solution will some affect ACE functions.

Solution #3: Reset the allocator_ to null before call config.open(), by destructing the m_config and constructing a new instance. Side effect of this solution still unknown.

comment:2 by brucedechant, 14 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.