My delphi program sometimes crashes when closing.
(he's designed to close itself with an instruction)
My goal is simply to bypass that Crash error (so the program closes itself WITHOUT displaying the nasty error message box that prevents the application to close).
I guess I need a global exception handler for that.
I know I should track the bug that raises that error, but I need to make something quick&dirty so just preventing that error message box is a valid solution for now.
Any clue is welcome.
Nom d’événement de problème: APPCRASH
Nom de l’application: AutomateBuilder.exe
Version de l’application: 1.0.0.0
Horodatage de l’application: 2a425e19
Nom du module par défaut: KERNELBASE.dll
Version du module par défaut: 6.1.7601.17965
Horodateur du module par défaut: 506dbe50
Code de l’exception: 0eedfade
Décalage de l’exception: 0000c41f
Version du système: 6.1.7601.2.1.0.1296.17
Identificateur de paramètres régionaux: 1036
Information supplémentaire n° 1: c360
Information supplémentaire n° 2: c3603bb720f34381cd4463c13e515373
Information supplémentaire n° 3: 04ba
Information supplémentaire n° 4: 04ba20d4fba8ec9ad3a49cccf38783e
see SetErrorMode
Controls whether the system will handle the specified types of serious
errors or whether the process will handle them.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680621%28v=vs.85%29.aspx
Related
I have Delphi XE7 installed on a Windows Server 2012 R2 (64 bit).
One week ago, it started crashing on startup, while displaying the welcome page with the following error message:
Firma problema:
Nome evento problema: APPCRASH
Nome applicazione: bds.exe
Versione applicazione: 21.0.17707.5020
Timestamp applicazione: 545bd62a
Nome modulo con errori: jscript9.dll
Versione modulo con errori: 11.0.9600.19375
Timestamp modulo con errori: 5cde2a32
Codice eccezione: c0000005
Offset eccezione: 0009192c
Versione SO: 6.3.9600.2.0.0.272.33
ID impostazioni locali: 1040
Informazioni aggiuntive 1: 04c1
Ulteriori informazioni 2: 04c17c6483616026b1d827b0895ca47b
Ulteriori informazioni 3: 5521
Ulteriori informazioni 4: 55212a802421f833061c5f852796fd1e
Leggere l'informativa sulla privacy online:
http://go.microsoft.com/fwlink/?linkid=280262
Se l'informativa sulla privacy online non è disponibile, leggere quella offline:
C:\Windows\system32\it-IT\erofflps.txt
I didn't understood the real cause of the problem, I've searched for jscript9.dll and found that it could have been something related to the welcome page, so I've disabled the WelcomePage from the registry and temporarly avoided the problem.
Today it has started to crash again, with a very similar error, on displaying the functions hint.
Firma problema:
Nome evento problema: APPCRASH
Nome applicazione: bds.exe
Versione applicazione: 21.0.17707.5020
Timestamp applicazione: 545bd62a
Nome modulo con errori: jscript9.dll
Versione modulo con errori: 11.0.9600.19375
Timestamp modulo con errori: 5cde2a32
Codice eccezione: c0000005
Offset eccezione: 00091922
Versione SO: 6.3.9600.2.0.0.272.33
ID impostazioni locali: 1040
Informazioni aggiuntive 1: 220c
Ulteriori informazioni 2: 220c472d49ca3d9cceee350b34da06ab
Ulteriori informazioni 3: debe
Ulteriori informazioni 4: debe032f4e197ddaae37ab48b079ef65
Both errors also happen on a new project, created running the ide with the -r parameter:
bds.exe -r foo
Using Process Monitor, it seems that something is going wrong with internet explorer (?):
I found a way to avoid the IDE crash, but I'm still looking for a real solution...
In Tools -> Options -> Editor Options -> Code Insight:
I've disabled the "Tooltip help insight" checkbox and the crash has been avoided (But obviously, I have no tooltip now....)
I'm a beginner at LUA so I'm having some trouble with it. I'm using the code for a Minecraft mod called Computercraft, but to me it's a great introduction to programming.
I've been searching the web to find out why my code of not even 26 lines is failing, but I couldn't find it sadly.
Here's the code:
monitor = peripheral.wrap("right")
monitor.clear()
monitor.setCursorPos(1,1)
monitor.setTextScale(1)
monitor.print("Current mode:")
monitor.setCursorPos(1,3)
monitor.print("Dust gaat naar furnace")
redstone.setOutput(back,false)
print("Dust gaat automatisch naar de furnace toe")
print("Wil je dat de dust naar de chest gaat in plaats van de furnace?")
write()
while input == ja
do
print("Oke :)")
redstone.setOutput(back,true)
monitor.clear()
monitor.setCursorPos(1,1)
monitor.print("Current mode:")
monitor.setCursorPos(1,3)
monitor.print("Dust gaat naar chest")
end
else
print("Okeuu dan niet jongee")
end
I know that I have used 'end' 2 times. This is because I get an error when I remove one.
The error I get when I run the program is:
bios:14: [string ".temp"]:22: '<eof>' expected.
The error I get when I remove the first 'end'.
The error I get when I remove the second 'end'.
EDIT
Okay well after some advice i managed to get rid of the error.
Thanks to all the people that responded! c:
Now i got an other error though lol.
As suggested i made a new post about it: Basic LUA problems
The :22: is telling you that the error has occurred around line 22 of the script, which is the else. If you have a look at the Lua reference guide you will see that else belongs with an if statement, not a while statement.
Your code should probably be as follows, as a while doesn't make sense here
if input == ja
then
... code ...
else
... other code ...
end
At work I use Visual Studio 2010 on Windows XP. The only extension installed was ASP.NET MVC 3 and the stuff bundled with it. For some reason VS works fine until it suddenly crashes, then it will crash when opening a file most of the time, and when it doesn't crash the Webserver process crashes when I try to run my MVC project from VS (with debug or not).
The first time this happened was when I was trying to look up online templates, then after it was reinstalled it worked fine until I included a JQuery library to the project. Running in safe mode doesn't seem to fix this and the logs don't say anything.
Is there any way to stop VS from falling apart like this? I need to work on MVC 3 but I'm worried my boss looks bad at me since I'm the only one whose VS breaks down for no reason.
EDIT: This is the error I´m getting on ActivityLog.xml:
Construction of frame content failed. Frame identifier: ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057} Frame caption: Propiedades Exception details: System.ArgumentException: La fuente 'Tahoma' no es compatible con el estilo 'Regular'. en System.Drawing.Font.CreateNativeFont() en System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont) en System.Drawing.Font..ctor(FontFamily family, Single emSize) en System.Drawing.SystemFonts.get_DefaultFont() en System.Windows.Forms.Control.get_DefaultFont() en System.Windows.Forms.Control.get_Font() en System.Windows.Forms.ComboBox.get_PreferredHeight() en System.Windows.Forms.ComboBox.get_DefaultSize() en System.Windows.Forms.Control..ctor(Boolean autoInstallSyncContext) en System.Windows.Forms.ComboBox..ctor() en Microsoft.VisualStudio.PropertyBrowser.MSOComboBox..ctor(IUIService uiService) en Microsoft.VisualStudio.PropertyBrowser.PBComboBox..ctor(IUIService uiService) en Microsoft.VisualStudio.PropertyBrowser.PropertyBrowser.CreateUI() en Microsoft.VisualStudio.PropertyBrowser.PropertyBrowser..ctor(IServiceProvider serviceProvider) en Microsoft.VisualStudio.PropertyBrowser.PropertyBrowserService.get_PropertyBrowser() en Microsoft.VisualStudio.PropertyBrowser.PropertyBrowserService.get_Window() en Microsoft.VisualStudio.Shell.WindowPane.Microsoft.VisualStudio.Shell.Interop.IVsUIElementPane.CreateUIElementPane(Object& uiElement) en Microsoft.VisualStudio.Platform.WindowManagement.UIElementDocumentObject.Init(Boolean initSize) en Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.InitializeDocumentObject(Object punkView) en Microsoft.VisualStudio.Platform.WindowManagement.PropertyBrowserSwitcher.OnQuerySwitchPane(FrameMoniker frameMoniker) en Microsoft.VisualStudio.Platform.WindowManagement.ContextSwitchFrame.QuerySwitchPane(FrameMoniker frameMoniker) en Microsoft.VisualStudio.Platform.WindowManagement.ContextSwitchFrame.OnElementValueChanged(UInt32 elementid, Object varValueOld, Object varValueNew) en Microsoft.VisualStudio.Platform.WindowManagement.ContextSwitchFrame.OnToolWindowCreated() en Microsoft.VisualStudio.Platform.WindowManagement.PropertyBrowserSwitcher.OnToolWindowCreated() en Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, ProvideToolWindowAttribute tool) en Microsoft.VisualStudio.Shell.Package.FindToolWindow(Type toolWindowType, Int32 id, Boolean create, ProvideToolWindowAttribute tool) en Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsToolWindowFactory.CreateToolWindow(Guid& toolWindowType, UInt32 id) en Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
Watch here
http://www.visualstudio.com/it-it/products/visual-studio-ultimate-with-msdn-vs#Fragment_SystemRequirements
You can use Visual Studio 2010 without problem on Windows XP (with SP3), since it is an officially supported OS (see http://go.microsoft.com/fwlink/?LinkId=133421).
However, in order to develop personal opinion WinXp is too outdated ... but you know that already:-)
It turns out that VS couldn´t find Tahoma regular. I fixed the problem by reinstalling Tahoma.
I have Install new instance of sql server in the server and Now the TFS2010 not working with error :
TF30065 An unhandled exception occurred
I can't found the real error to fix it, how I know the error detail or how I fix this ! there's many project in it and I have to fix it
edit: I found the error log of the error
Message d'exception : Échec du chargement du fichier Msxmlsql.dll.
L'instruction préparée avec le handle 0 est introuvable.
sp_xml_removedocument : la valeur fournie pour le paramètre numéro 1
n'est pas valide.
WIN-Server\SQLEXPRESS.Tfs_Configuration..prc_QueryCatalogNodes:
Database Statement Failure - Error %error="8179";% executing INSERT
statement for #pathSpec L'instruction a été arrêtée. (type
SqlException)
I have remove the second sql instance but the same error, then I have upgrade the first instnace from 10.0 to 10.50 the same of the new instance installed and it work now
I'm here again to ask for a help to you. This time I believe that few will respond given the great particularity of the problem which I will relate. I'm starting in the world of DataSnap, and still have things I do not understand how this error I will relate.
My Delphi is XE (version 1, Update1). I am using Postgres which generates error messages in Portuguese (Portuguese Brazil) and for this reason the error messages have accents. The connection components are ZeosLib package.
I am using a dialog box "reconcile error" to display errors arising from the application of updates and to test, I tried to insert a record that already existed, thus violating a unique key and thus displaying the reconcile error dialog.
In the memo of the dialog, the message that appears is truncated, ie cut. Check it out:
ERRO: duplicar valor da chave viola a restrição de unicidade "uc_usu_va_login"
DETAIL: Chave (va_login)=(admin) já existe.
CONTEXT: comando SQL "INSERT INTO USUARIOS (VA_NOME
,VA_LOGIN
,CH
But actually what should be returned is this:
ERRO: duplicar valor da chave viola a restrição de unicidade "uc_usu_va_login"
DETAIL: Chave (va_login)=(admin) já existe.
CONTEXT: comando SQL "INSERT INTO USUARIOS (VA_NOME
,VA_LOGIN
,CH_SENHA
,VA_EMAIL)
VALUES (pVA_NOME
,pVA_LOGIN
,pCH_SENHA
,pVA_EMAIL)"
PL/pgSQL function "idu_usuarios" line 7 at comando SQL
I have done a debug on the server to see if the problem is ZeosLib, but I found that the error message generated on the server is complete, proving that ZeosLib does not truncate the message. Everything is unicode. All strings are WideString (the default) on both my program and in ZeosLib.
As you know, to be thrown on the server, the exception is forwarded to the client, roughly speaking, by DataSnap, and on the client, the Reconcile method of TClientDataSet verify if there were problems and then throw the famous exception EReconcileError that can be handled in the OnReconcileError event of TClientDataSet, therefore I believe that the message is being truncated by DataSnap.
On the client I debug the Reconcile method (DBClient.pas) and immediately before the exception is thrown the flow enters a function within a cpp source code that I think part of the library midas.dll, MidasLib.obj more specifically, since I am using this strategy, not to have to distribute the DLL with my application.
Check(FDSBase.Reconcile_MD(FReconcileDataSet.FDSBase, FDeltaPacket, VarToDataPacket(Results), Integer(Self), RCB));
This call is done at line 1952 of the unit DBClient.pas on Delphi XE Update1. Pressing F7, the debugger enters a source C++ (cpp), so I believe it is within the midaslib.obj. How I do not understand C++ well, I press Shift-F8 to exit the current method and return the next instruction, that is already inside the event OnReconcileError!! Therefore, the truncation must be done within the function I mentioned, within a cpp source, within midaslib.
My intention is to make the Reconcile Error dialog a tool not only for the final user but to support personals, providing separately information of Error, Details and Context. This helps a lot to discover a problem.
The problem now is to make the message appear in full. Has anyone had this kind of problem with messages being truncated by midas?
Also another point DSClient.pas I could extract the error message as it is passed to the exception:
'Erro SQL: ERRO: duplicar valor da chave viola a restrição de unicidade "uc_usu_va_login"'#$A'DETAIL: Chave (va_login)=(admin) já existe.'#$A'CONTEXT: comando SQL "INSERT INTO USUARIOS (VA_NOME'#$A' ,VA_LOGIN'#$A' ,CH'
If you remove the quotes and replace #$A (1 character) by a white space (one character), you will see that the string has exactly 255 characters!!
I also discovered that the "GetErrorString" in dspickle.cpp uses the constant DBIMAXMSGLEN which is defined in bdetypes.h as 127 (half of 255). As we are in the world of Unicode, it would not be a question of increasing this value to 255 in order to have two bytes per character? This is only a guess...
I leave the question in the air because I lack the knowledge to understand C++ :) Who can help, just look at the function implementation "GetErrorString" in dspickle.cpp. There is this:
LoadString((HINSTANCE)hDll, iErrCode, pString, DBIMAXMSGLEN)
pString is the error message and DBIMAXMSGLEN = 127.
Contradicting the opinion of others I decided to tweak further and finally figured out how to increase the number of characters in the "Reconcile" error message. As I thought the problem was in midas.dll, or more specifically the sources that make up the midas dll because the same set of sources can create MidasLib, which does not require a midas dll. To resolve I had to install the Delphi C++ personality to compile the midas.
After finding the line of the error, I discovered that there is even a request for repairs to the QC (http://qc.embarcadero.com/wc/qcmain.aspx?d=84960) which seems to have been ignored by the staff of Embarcadero, as that the "Resolution" as is "Deferred to Next Rel" (Deferred to Next Release) but the request is from 2010 and I'm using Delphi XE which in my opinion should have the solution but here I am correcting by myself ;)
The problem is inside the method "Clone" of the "DSBASE" class, inside source "ds.cpp" at line 2133 (Delphi XE, Update1). Below is the code block. The red line is the problematic line:
// Set the third field for the error string.
LdStrCpy((pCHAR)pFldDes->szName, szdsERRMESSAGE);
pFldDes->iFldType = fldZSTRING;
pFldDes->iUnits1 = 255; // Increased on request.. DBIMAXMSGLEN;
pFldDes++;
Note that it is very interesting the problem line. It has a constant value of 255, which limits the size of the error messages and a comment "Increased on request". Also note that next to the comment, there is a constant DBIMAXMSGLEN, which I had found and already suspected as being responsible for the problem, but as it was not being used I changed the value of DBIMAXMSGLEN but the error message always came without changes. It is worth mentioning that there is a semicolon (;) after DBIMAXMSGLEN which leads me to think that before (I do not know when) this line was one that was just after my fix:
pFldDes->iUnits1 = DBIMAXMSGLEN;
It's as if someone had deliberately set the field value to 255, removing the previous implementation that was really dynamic and seemingly more correct. After performing the replacement of the line I increased the value of DBIMAXMSGLEN to 1024. DBIMAXMSGLEN is declared "bdetypes.h" as a define. After correcting the line went like this:
#define DBIMAXMSGLEN 1024 // Max message len
After these two changes in "ds.cpp" and "bdetypes.h" I build, test, and the result was as expected: the error message was presented in full in the Reconcile dialog.
To the brave who want to try if they have seen this problem, you need the sources of MIDAS, which comes with Delphi from 2010 if I remember correctly. Good luck to all.