<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-NZ style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Thank you all for your help have managed to find the problem and at least the app starts to load and give reasonable feed back<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-NZ style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Tracked it down with breaks on the initialisation sections and found a file pulling in the non Unicode version of gnugettext.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-NZ style='font-size:11.0pt;font-family:"Calibri",sans-serif'>After I renamed the path so the complier/ linker couldn’t find it we started to progress<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-NZ style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-NZ style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Thanks again all<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-NZ style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-NZ style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Ian Fear<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-NZ style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> delphi-bounces@listserver.123.net.nz [mailto:delphi-bounces@listserver.123.net.nz] <b>On Behalf Of </b>Jolyon Direnko-Smith<br><b>Sent:</b> Wednesday, April 12, 2017 7:24 AM<br><b>To:</b> NZ Borland Developers Group - Delphi List <delphi@listserver.123.net.nz><br><b>Subject:</b> Re: [DUG] How to find Access Violation in the Initilization of Project<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>There's no such thing as a "$C0000005 access violation" as such. What you have is an access violation with the $C0000005 address involved. That address could be the location in memory of the instruction at which the AV occurred, or it could be the address of the memory than an instruction attempted to access.<br><br>The difference is important and can help identify the problem but it's difficult to say which address this represents from the way you describe it.<br><br>A typical AV exception will read something like "Access violation at $AAAAAAAA attempting to read/write/access address $MMMMMMMM".<br><br>$AAAAAAAA is rarely of any use, although if you are very lucky you can use it with "Goto address" in the IDE to take you to the line of source code corresponding to that address. To do that the debug build in the IDE has to be IDENTICAL to the build in which the AV occurs, and the build needs to be running, but "paused" under the IDE. If the build isn't identical then the source code you find at that address is unlikely to be the actual instruction at which the AV occurred, and even if the buid is identical it isn't always reliable (though I've never quite figured out why).<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The value of $MMMMMMMM is usually more useful and can be a first indicator of what's going wrong. e.g. if the problem is a NIL object reference or pointer than $MMMMMMMM will be $00000000 (nil). If it is an extremeley low value such as $00000004 or $00000012 etc, then this too indicates a nil pointer or object reference, where the actual memory access is at some offset from the nil pointer. e.g. a property or member variable reference using a nil object or an array access using a nil pointer. The lower the value, the more likely it is to be a member variable reference.<br><br>If $MMMMMMMM is anything significantly greater than nil then this usually indicates an uninitialized pointer or an access to an already destroyed object.<br><br><br>Other than that, if the problem is occurring during initialization then you need to find all your initialization sections and debug those. But this will be harder if the problem is in an RTL or VCL unit. You will need to compile with Use Debug DCU's enabled, but if you do that and can reproduce the AV under the debugger then all you should need to do is run the build under the debugger.<br><br>Make sure that "Break on exceptions" is enabled in the debugger and also that EAccessViolation is not on the "ignore" list in the debugger options.<br><br><br>Hope that helps.<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On 10 April 2017 at 10:09, Todd Martin <<a href="mailto:todd.martin.nz@gmail.com" target="_blank">todd.martin.nz@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p class=MsoNormal>Hi Ian<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Search through all the files in your project and look for the <b>initialization</b> keyword. Put a break point wherever you find code. Then run the application and see where it dies.<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal>On 10 Apr 2017 6:56 a.m., "Ian Fear" <<a href="mailto:I_J_Fear@xtra.co.nz" target="_blank">I_J_Fear@xtra.co.nz</a>> wrote:<o:p></o:p></p></div></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>I am in the process of Moving a Project from D2007 to D XE10 berlin.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>After some grief I have the Project Compiling in XE10. </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>When the project loads I Get a $C0000005 access violation in the Projects Initialization section before I get to any breakpoints on main form Create etc</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>On following it thru the CPU window it Happens at vcl.AxCtls or 4 lines later Tpicture.loadFileFormats</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>Would appreciate any hints on how to track this down. It May be trying to call in a FMX unit but cant figure out how to track it Down</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>Any Hints or suggestions greatly appreciated</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>Thanks in advance</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>Regards</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>Ian </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>Ian Fear</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>B Agr Sc (Lincoln)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>GDip InfSys(Massey)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>Fear Consulting Ltd</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>405 Old Taupo Road</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>Rotorua</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>Home /work 07 347 6015</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ>Mobile 027 474 2772</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-NZ> </span><o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal>_______________________________________________<br>NZ Borland Developers Group - Delphi mailing list<br>Post: <a href="mailto:delphi@listserver.123.net.nz" target="_blank">delphi@listserver.123.net.nz</a><br>Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz" target="_blank">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe<o:p></o:p></p></blockquote></div></div><p class=MsoNormal><br>_______________________________________________<br>NZ Borland Developers Group - Delphi mailing list<br>Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe<o:p></o:p></p></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>