On 04/04/11 23:56, Claudio Valderrama C. wrote: >> Claudio, please try this patch. It should fix this bug. >> And can you please also provide full stacktrace for this case? For me >> cleanup member was never left uninitialized cause all modules >> were doing >> setCleanup(). I wonder what module caused this. > Ok, here's the full call stack: > >> fbclient.dll!Firebird::`anonymous > namespace'::PluginModule::~PluginModule() Line 335 + 0xc bytes C++ > fbclient.dll!Firebird::`anonymous namespace'::PluginModule::`scalar > deleting destructor'() + 0x16 bytes C++ > fbclient.dll!Firebird::RefCounted::release() Line 46 + 0x23 bytes > C++ > fbclient.dll!Firebird::RefPtr<Firebird::`anonymous > namespace'::PluginModule>::~RefPtr<Firebird::`anonymous > namespace'::PluginModule>() Line 115 + 0x13 bytes C++ > msvcr90d.dll!_CallSettingFrame(unsigned long funclet=1229040, > unsigned long pRN=259, unsigned long dwInCode=2342670505) Line 73 Asm > msvcr90d.dll!__FrameUnwindToState(EHRegistrationNode * > pRN=0x0012c0f0, void * pDC=0x0012b6fc, const _s_FuncInfo * > pFuncInfo=0x101096cc, int targetState=-1) Line 1151 C++ > msvcr90d.dll!__InternalCxxFrameHandler(EHExceptionRecord * > pExcept=0x0012bbec, EHRegistrationNode * pRN=0x0012c0f0, _CONTEXT * > pContext=0x0012b708, void * pDC=0x0012b6fc, const _s_FuncInfo * > pFuncInfo=0x101096cc, int CatchDepth=0, EHRegistrationNode * > pMarkerRN=0x00000000, unsigned char recursive=0) Line 479 + 0x13 bytes > C++ > msvcr90d.dll!__CxxFrameHandler3(EHExceptionRecord * > pExcept=0x0012c0f0, EHRegistrationNode * pRN=0x0012b708, void * > pContext=0x0012b6fc, void * pDC=0x0012c0f0) Line 311 + 0x1f bytes C++ > ntdll.dll!7c9032a8() > [Frames below may be incorrect and/or missing, no symbols loaded for > ntdll.dll] > ntdll.dll!7c90327a() > ntdll.dll!7c92ab81() > ntdll.dll!7c90e48a() > kernel32.dll!7c812afb() > kernel32.dll!7c812afb() > kernel32.dll!7c812afb() > msvcr90d.dll!_CxxThrowException(void * pExceptionObject=0x0012bf80, > const _s__ThrowInfo * pThrowInfo=0x1010f8d8) Line 161 C++ > fbclient.dll!Firebird::status_exception::raise(const > Firebird::Arg::StatusVector & statusVector={...}) Line 137 C++ > fbclient.dll!Firebird::Arg::StatusVector::raise() Line 179 + 0x9 > bytes C++ > fbclient.dll!Firebird::`anonymous > namespace'::PluginSet::loadError(const Firebird::Arg::StatusVector & > error={...}) Line 649 C++ > fbclient.dll!Firebird::`anonymous > namespace'::PluginSet::loadModule(const > Firebird::StringBase<Firebird::PathNameComparator> & asIsModuleName={...}) > Line 759 + 0x3e bytes C++ > fbclient.dll!Firebird::`anonymous namespace'::PluginSet::next() > Line 702 + 0x13 bytes C++ > fbclient.dll!Firebird::`anonymous > namespace'::PluginSet::PluginSet(unsigned int pinterfaceType=15, const char > * pnamesList=0x01856a84, int pdesiredVersion=21, void * > pmissingFunctionClass=0x0012c5e8, Firebird::IFirebirdConf * > fbConf=0x00000000) Line 617 + 0x9 bytes C++ > fbclient.dll!Firebird::PluginManager::getPlugins(unsigned int > interfaceType=15, const char * namesList=0x01856a84, int desiredVersion=21, > void * missingFunctionClass=0x0012c5e8, Firebird::IFirebirdConf * > firebirdConf=0x00000000) Line 856 + 0x36 bytes C++ > engine12.dll!Firebird::GetPlugins<TraceFactory,`anonymous > namespace'::IgnoreMissing>::GetPlugins<TraceFactory,`anonymous > namespace'::IgnoreMissing>(unsigned int interfaceType=15, unsigned int > desiredVersion=21, const char * namesList=0x00000000) Line 57 + 0xe2 bytes > C++ > engine12.dll!Jrd::TraceManager::load_plugins() Line 159 + 0xe bytes > C++ > engine12.dll!Jrd::TraceManager::init() Line 141 C++ > engine12.dll!Jrd::TraceManager::TraceManager(Jrd::Attachment * > in_att=0x00d10020) Line 112 C++ > engine12.dll!Jrd::Attachment::Attachment(Firebird::MemoryPool * > pool=0x00d01370, Jrd::Database * dbb=0x00d00020, void * > publicHandle=0x00000000) Line 162 + 0x216 bytes C++ > engine12.dll!Jrd::Attachment::create(Jrd::Database * dbb=0x00d00020, > void * publicHandle=0x00000000) Line 57 + 0x3b bytes C++ > engine12.dll!Jrd::Provider::attachDatabase(Firebird::Status * > user_status=0x0012d474, Firebird::IAttachment * * handle=0x0012d42c, void * > public_handle=0x00000000, const char * filename=0x00aa3464, unsigned int > dpb_length=64, const unsigned char * dpb=0x0012d2bc) Line 1176 + 0x10 bytes > C++ > fbclient.dll!`anonymous > namespace'::Dispatcher::attachDatabase(Firebird::Status * status=0x0012d474, > Firebird::IAttachment * * attachment=0x0012d42c, void * __formal=0x00000000, > const char * filename=0x00aa2c64, unsigned int dpbLength=10, const unsigned > char * dpb=0x0012d650) Line 4998 + 0x6b bytes C++ > fbclient.dll!isc_attach_database(int * userStatus=0x0046cf08, short > fileLength=0, const char * filename=0x00aa0b78, void * * > publicHandle=0x0012d608, short dpbLength=10, const char * dpb=0x0012d650) > Line 1494 + 0x38 bytes C++ > fbclient.dll!PREPARSE_execute(int * user_status=0x0046cf08, void * * > db_handle=0x0046d470, void * * __formal=0x0046cf00, unsigned short > stmt_length=68, const char * stmt=0x00aa2c24, bool * stmt_eaten=0x0012d85f, > unsigned short dialect=3) Line 264 + 0x5b bytes C++ > fbclient.dll!isc_dsql_exec_immed2_m(int * userStatus=0x0046cf08, > void * * dbHandle=0x0046d470, void * * traHandle=0x0046cf00, unsigned short > stmtLength=0, const char * sqlStmt=0x00aa2be0, unsigned short dialect=3, > unsigned short inBlrLength=0, char * inBlr=0x00000000, unsigned short > inMsgType=0, unsigned short inMsgLength=0, const char * inMsg=0x00000000, > unsigned short outBlrLength=0, char * outBlr=0x00000000, unsigned short > outMsgType=0, unsigned short outMsgLength=0, char * outMsg=0x00000000) Line > 2276 + 0x28 bytes C++ > fbclient.dll!isc_dsql_exec_immed2(int * userStatus=0x0046cf08, void > * * dbHandle=0x0046d470, void * * traHandle=0x0046cf00, unsigned short > stmtLength=0, const char * sqlStmt=0x00aa2be0, unsigned short dialect=3, > const XSQLDA * inSqlda=0x00000000, const XSQLDA * outSqlda=0x00000000) Line > 2228 + 0xc0 bytes C++ > fbclient.dll!isc_dsql_execute_immediate(int * userStatus=0x0046cf08, > void * * dbHandle=0x0046d470, void * * traHandle=0x0046cf00, unsigned short > stmtLength=0, const char * sqlStmt=0x00aa2be0, unsigned short dialect=3, > const XSQLDA * sqlda=0x00000000) Line 2193 C++ > isql.exe!create_db(const char * statement=0x00af0020, char * > d_name=0x00aa2b10) Line 5341 + 0x24 bytes C++ > isql.exe!frontend(const char * statement=0x00af0020) Line 6206 + > 0x13 bytes C++ > isql.exe!get_statement(char * const statement=0x00af0020, const > unsigned int bufsize=65535, const char * statement_prompt=0x00456f5c) Line > 7054 + 0x9 bytes C++ > isql.exe!do_isql() Line 5624 + 0x18 bytes C++ > isql.exe!ISQL_main(int argc=2, char * * argv=0x00a43340) Line 1532 > C++ > isql.exe!main(int argc=2, char * * argv=0x00a43340) Line 1404 + 0xd > bytes C++ > isql.exe!__tmainCRTStartup() Line 586 + 0x19 bytes C > isql.exe!mainCRTStartup() Line 403 C > kernel32.dll!7c817077() >
Well, I see, this happened due to error loading fbtrace. > After the fix, at least it doesn't crash inside isql, but I get this: > Certainly, it's better to have diagnostics instead segfault :) > Building isql (Win32\debug)... > > Microsoft (R) Visual Studio Version 9.0.30729.1. > Copyright (C) Microsoft Corp. All rights reserved. > 1>------ Build started: Project: isql, Configuration: Debug Win32 ------ > 1>Compiling... > .... > 1>isql - 0 error(s), 0 warning(s) > ========== Build: 1 succeeded, 0 failed, 3 up-to-date, 0 skipped ========== > > Statement failed, SQLSTATE = 39000 > Entrypoint of plugin > F:\fb3dev\fbbuild\firebird30\temp\Win32\debug\firebird\plugins/fbtrace does > not > exist > Statement failed, SQLSTATE = 39000 > Entrypoint of plugin > F:\fb3dev\fbbuild\firebird30\temp\Win32\debug\firebird\plugins/fbtrace does > not > exist > After line 0 in file F:\fb3dev\fbbuild\firebird30\src\dbs\security.sql > gbak: ERROR:Entrypoint of plugin > F:\fb3dev\fbbuild\firebird30\temp\Win32\debug\firebird\plugins/fbtr > ace does not exist Well, please take a look at this function (in PluginManager.cpp): RefPtr<PluginModule> PluginSet::loadModule(const PathName& asIsModuleName) It tries to load a module, but if fails - checks, if file is loadable from mod_loader POV. And if yes, but failed to load, reports an error. In you case it looks like fbtrace is loadable, but anyway can't be loaded. I.e. something like unresolved external reference in it. ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel