{"action":"created","issue":{"url":"https://api.github.com/repos/vszakats/harbour-core/issues/149","labels_url":"https://api.github.com/repos/vszakats/harbour-core/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/vszakats/harbour-core/issues/149/comments","events_url":"https://api.github.com/repos/vszakats/harbour-core/issues/149/events","html_url":"https://github.com/vszakats/harbour-core/issues/149","id":97410705,"number":149,"title":"Static initializer error","user":{"login":"emazv72","id":5381288,"avatar_url":"https://avatars.githubusercontent.com/u/5381288?v=3","gravatar_id":"","url":"https://api.github.com/users/emazv72","html_url":"https://github.com/emazv72","followers_url":"https://api.github.com/users/emazv72/followers","following_url":"https://api.github.com/users/emazv72/following{/other_user}","gists_url":"https://api.github.com/users/emazv72/gists{/gist_id}","starred_url":"https://api.github.com/users/emazv72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emazv72/subscriptions","organizations_url":"https://api.github.com/users/emazv72/orgs","repos_url":"https://api.github.com/users/emazv72/repos","events_url":"https://api.github.com/users/emazv72/events{/privacy}","received_events_url":"https://api.github.com/users/emazv72/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-27T08:24:46Z","updated_at":"2015-07-27T08:36:14Z","closed_at":null,"body":"\r\nHi Viktor,\r\n\r\nAfter applying the latest trunk and recompiling my app I get this error ( works fine on 3.2.0)\r\n\r\nCalled from (_INITSTATICS00001)(0)\r\nCalled from HB_LIBLOAD(0)\r\nCalled from LIBMGR:LOAD(67)\r\nCalled from LOADSTANDARDLIBS(77)\r\nCalled from MAIN(101)\r\n------------------------------------------------------------------------\r\nUnrecoverable error 6005: Exception error:\r\n\r\n    Exception Code:C0000005 ACCESS_VIOLATION\r\n\r\nI understand it's some static initializers used  in early startup code but I can't figure out where.\r\nLast line of code executed ( caught via HB_TR_LEVEL=debug and output redirected to a file) seems to be\r\n\r\n----------------------------------------------------------------------------------------\r\nhvm.c:1766: HB_TR_INFO Opcode: HB_P_LINE: LOGINIT (395)\r\nhvm.c:6906: HB_TR_DEBUG hb_vmPushSymbol(0038A0A0)\r\nhvm.c:7119: HB_TR_DEBUG hb_vmPushLocal(1)\r\nitemapi.c:1574: HB_TR_DEBUG hb_itemCopy(00367464, 003673EC)\r\nhvm.c:5868: HB_TR_DEBUG hb_vmProc(1)\r\nmemvars.c:280: HB_TR_DEBUG hb_memvarGetPrivatesBase()\r\nextend.c:212: HB_TR_DEBUG hb_parc(1)\r\nhvm.c:9072: HB_TR_DEBUG hb_vmIsReady()\r\nfm.c:676: HB_TR_DEBUG hb_xgrab(168)\r\nhvm.c:9072: HB_TR_DEBUG hb_vmIsReady()\r\nfm.c:676: HB_TR_DEBUG hb_xgrab(4)\r\nfm.c:898: HB_TR_DEBUG hb_xfree(0036DEBC)\r\nfm.c:898: HB_TR_DEBUG hb_xfree(00369B34)\r\n\r\nUnrecoverable error 6005: Exception error:\r\nException Code:C0000005 ACCESS_VIOLATION\r\n---------------------------------------------------------------------    \r\nWhich executes :\r\n\r\nHB_TRACEFLUSH(.T.)\r\n\r\nI can hardly think such a line GPFs the whole thing.\r\n\r\nI did some gdb-ing and backtrace shows:\r\n\r\n#1  0x6426e17e in hb_vmProc (uiParams=uiParams@entry=0)\r\n    at ../../../../hvm.c:5895\r\n#2  0x6426fa9a in hb_vmInitSymbolGroup (hNewDynLib=hNewDynLib@entry=0x0,\r\n    argc=argc@entry=0, argv=argv@entry=0x0) at ../../../../hvm.c:7787\r\n#3  0x64212566 in hb_libLoad (pLibName=0x3f75cc, pArgs=pArgs@entry=0x0)\r\n    at ../../../../dynlibhb.c:150\r\n#4  0x64212796 in HB_FUN_HB_LIBLOAD () at ../../../../dynlibhb.c:241\r\n#5  0x6426e17e in hb_vmProc (uiParams=1) at ../../../../hvm.c:5895\r\n#6  0x6423510b in hb_vmExecute (pCode=<optimized out>, pSymbols=0x38a140)\r\n\r\nWhich is not consistent with the trace above.\r\n\r\nI also recompiled all 3d party libs  ( currently openssl + libcurl, icu added) with the same compiler to avoid inconsistencies.\r\n\r\nQuestion is: is there any breaking change or side effect in static initializer?\r\n\r\nHope to help to find a bug, if any.\r\n\r\nRegards,\r\nEmanuele\r\n"},"comment":{"url":"https://api.github.com/repos/vszakats/harbour-core/issues/comments/125127203","html_url":"https://github.com/vszakats/harbour-core/issues/149#issuecomment-125127203","issue_url":"https://api.github.com/repos/vszakats/harbour-core/issues/149","id":125127203,"user":{"login":"vszakats","id":1446897,"avatar_url":"https://avatars.githubusercontent.com/u/1446897?v=3","gravatar_id":"","url":"https://api.github.com/users/vszakats","html_url":"https://github.com/vszakats","followers_url":"https://api.github.com/users/vszakats/followers","following_url":"https://api.github.com/users/vszakats/following{/other_user}","gists_url":"https://api.github.com/users/vszakats/gists{/gist_id}","starred_url":"https://api.github.com/users/vszakats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vszakats/subscriptions","organizations_url":"https://api.github.com/users/vszakats/orgs","repos_url":"https://api.github.com/users/vszakats/repos","events_url":"https://api.github.com/users/vszakats/events{/privacy}","received_events_url":"https://api.github.com/users/vszakats/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T08:36:14Z","updated_at":"2015-07-27T08:36:14Z","body":"The only thing that changed recently was the `LoadLibrary()` to `LoadLibraryEx()` update in https://github.com/vszakats/harbour-core/commit/deb65a33070115cfc2db9d638e470130735ba342.\r\nThe other recent one is this: 4cf37742294f21f8cbfe18af41280f92d85a5c7d\r\n\r\nCan you try to revert them one by one and see which fixes the issue?\r\n\r\nBTW, what is the reason you need dynamically loaded Harbour (pcode) `.dll`s instead of portable `.hrb` files?"}}