Opened 10 years ago

Closed 10 years ago

#2397 closed defect (fixed)

Mapguide aborted if cannot find a session db it is trying to wipe

Reported by: gabrimonfa Owned by:
Priority: low Milestone:
Component: General Version: 2.5.0
Severity: trivial Keywords:
Cc: External ID:

Description

Due to an error I've removed some active session db and dbxml from a living MapGuide server (2.5.2). Mapguide then aborted logging

15d375d0-7c65-11e3-8000-5254006ae79a_en_MTI3LjAuMC4x0AFC0AFB0AFA.db: unable to flush: No such file or directory
15d375d0-7c65-11e3-8000-5254006ae79a_en_MTI3LjAuMC4x0AFC0AFB0AFA.dbxml: unable to flush: No such file or directory
mgserver: DbEnvironment.cpp:239: virtual MgDbEnvironment::~MgDbEnvironment(): Assertion `false' failed.
./mgserver.sh: line 8: 24225 Aborted                ./mgserver run

The relevant code in 2.5 branch is

http://trac.osgeo.org/mapguide/browser/branches/2.5/MgDev/Server/src/Services/Resource/DbEnvironment.cpp

229	MgDbEnvironment::~MgDbEnvironment()
230	{
231	    if (m_opened)
232	    {
233	        try
234	        {
235	            m_dbEnv.close(0);
236	        }
237	        catch (...)
238	        {
239	            assert(false);
240	        }
241	    }
242	}

While the problem is an error on my side, I would suggest to make MapGuide more robust, logging the error and continuing instead of asserting and aborting.

Change History (3)

comment:1 by jng, 10 years ago

Aren't asserts noops in non-debug builds?

comment:2 by jng, 10 years ago

I'm observing this with aggressive zooming in/out and selection. Will do some more testing without the assert()

comment:3 by jng, 10 years ago

Resolution: fixed
Status: newclosed

Fixed trunk (r8098) and 2.6 (r8100)

Note: See TracTickets for help on using tickets.