<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — SIGSEGV - segmentation fault, only when debugging]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=385</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=385&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in SIGSEGV - segmentation fault, only when debugging.]]></description>
		<lastBuildDate>Tue, 10 Feb 2015 12:51:45 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1894#p1894</link>
			<description><![CDATA[<p>You are a grafter, Jeff, that&#039;s for sure!<br />I&#039;ll look forward to receiving it.</p><p>If you really have succeeded (and I do not hold you to it), then I&#039;m sure that everyone in your forum will be extremely interested in what exactly this problem has been, how you diagnosed it and how on earth you managed to cure it.<br />---<br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Tue, 10 Feb 2015 12:51:45 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1894#p1894</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1893#p1893</link>
			<description><![CDATA[<p>John,</p><p>I think I&#039;ve got the debugger-only crashing fixed in regards to the file dialog. I&#039;ll send you an email sometime today with the new WFDialogs library to try out.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 10 Feb 2015 12:37:24 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1893#p1893</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1850#p1850</link>
			<description><![CDATA[<p>John,</p><p>I&#039;ve sent you an email with a possibly fixed version of the <a href="http://packages.simplyfortran.com/package/72.html">Windows Fortran Dialogs</a>&nbsp; package that might eliminate the debugger-only crash circumstance.&nbsp; I&#039;m hopeful it works.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 28 Jan 2015 15:01:15 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1850#p1850</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1625#p1625</link>
			<description><![CDATA[<p>That&#039;s very encouraging.&nbsp; So nice to know I&#039;m not the only one!<br />I hope you manage to solve yet another problem that no-one else has managed to fix.<br />It&#039;s a real nuisance not to be able to use the debugger! <br />-- <br />J.</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Tue, 25 Nov 2014 00:24:14 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1625#p1625</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1624#p1624</link>
			<description><![CDATA[<p>John,</p><p>Some searching on the Internet shows that there are quite a few people experience crashes when calling <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms646927%28v=vs.85%29.aspx">GetOpenFileName</a> or <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms646928%28v=vs.85%29.aspx">GetSaveFileName</a> (the functions that actually opens a file dialog in Windows) in programs being debugged in the GNU Debugger (Simply Fortran&#039;s underlying debugging engine).&nbsp; I&#039;ll see what solutions I can find.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 24 Nov 2014 18:09:44 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1624#p1624</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1623#p1623</link>
			<description><![CDATA[<p>Alas I have no ideas I can suggest, although a possible clue might be that Helmut Michels was apparently able to run a test program using his debugger, without this causing a crash.<br />--- <br />J.</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Mon, 24 Nov 2014 15:41:36 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1623#p1623</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1622#p1622</link>
			<description><![CDATA[<p>John,</p><p>It sounds like the core of the issue is that using standard Windows file dialogs in conjunction with Simply Fortran&#039;s debugger causes a crash in the program being debugged.&nbsp; I was able to replicate the crash on my system originally, so I&#039;ll try to investigate more.&nbsp; I don&#039;t have an immediate guess as to what&#039;s occurring, though.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 24 Nov 2014 14:27:01 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1622#p1622</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1621#p1621</link>
			<description><![CDATA[<p>It crashes to a SIGSEGV fault when trying to execute the statement at label 10 in the code fragment below:</p><div class="codebox"><pre><code>      SUBROUTINE GetFileName(ChangePath)
C     ----------------------------------
C     jw / 25-07-12  1st draft started
C     jw / 15-02-14  last rev.

C     On returning from this subroutine:

C The INPUT file pathname should be stored in
C TRIM(F%Path)//TRIM(F%Name)//&#039;.&#039;//TRIM(F%I%Ext).

C     F%I%Exists should indicate whether 
C     the INPUT file already exists.
C     F%I%OPEN should indicate whether 
C     it is already open.

C     F%bakExists should indicate whether
C     a BAK file already exists.
C     (It should not be open).

C     F%O%Exists should indicate whether 
C    the OUTPUT file already exists.
C     F%O%OPEN should indicate whether 
C     it is already open.

      USE Dislin
      USE Files
      USE wfdialogs
      LOGICAL EXISTS, ChangePath

C     IF(F%Named) RETURN

C     Input filename not yet known
      F%Path = (&#039;      &#039;)
      F%Name = (&#039; &#039;)
      F%I%Exists = .FALSE.
      F%I%OPEN = .FALSE.
      F%BAKexists = .FALSE.
      F%BAKdeletable = .FALSE.

      CALL SWGOPT(&#039;STANDARD&#039;,&#039;DIALOG&#039;) !Use STANDARD file dialog boxes
C     Prompt user for a data input Path\filename.ext
      F%Path = &#039; &#039;

10    IF(RequestOpenFile(F%Path,
     +&#039;Default DATA file type&#039;,&#039;*.ins&#039;,
     + &#039;Enter or select a structure DATA filename&#039;)) THEN
          CALL SWGOPT(&#039;TOP&#039;,&#039;DIALOG&#039;)!Keep all other dialog boxes on top

          CALL ParsePath(F%PATH,F%Name,F%I%Ext)
          IF(LEN_TRIM(F%I%Ext).EQ.0) F%I%Ext=&#039;ins&#039;
          F%O%Ext = &#039;rtf&#039;
          F%Named = .TRUE.

C         Set the current directory to that of the chosen file
          IF(ChangePath) CALL CHDIR(F%Path,iDone)
          :
          :
          : {more}
          :
          :
          :</code></pre></div><p>The crash happens mid-way through the process of drawing and populating the filename requester dialog box.&nbsp; At first, it managed only to draw the box outline and insert the title-bar caption, &#039;Enter or select a structure DATA filename&#039;, but the box was empty.&nbsp; When I commented out the next line, viz,<br /></p><div class="codebox"><pre><code>          CALL SWGOPT(&#039;TOP&#039;,&#039;DIALOG&#039;)!Keep all other dialog boxes on top</code></pre></div><p>this enabled the dialog box to start to fill, with about 30% of its normal content being written into it before the crash.</p><p>The crash does not happen when running outside the debugger.</p><p>If you have time to look into this any further and would like the latest version of my project code, please let me know and I&#039;ll send it.<br />--- <br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Mon, 24 Nov 2014 13:19:24 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1621#p1621</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1615#p1615</link>
			<description><![CDATA[<p>John,</p><p>At what point does the program crash now?&nbsp; Is it when the file dialog is opened?</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Sat, 22 Nov 2014 00:09:19 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1615#p1615</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1614#p1614</link>
			<description><![CDATA[<p>SitRep:</p><p>I am still getting this SIGSEGV fault on a project whenever I use the debugger, on a program which compiles, links, loads and runs without error when not debugging.&nbsp; This is after switching away from DISLIN for filename requester dialogs and using Jeff&#039;s very neat routines instead.</p><p>If anyone else has the same experience, it might be helpful to hear about it.</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Fri, 21 Nov 2014 11:06:33 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1614#p1614</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1600#p1600</link>
			<description><![CDATA[<p>Thanks Jeff.&nbsp; <br />Works perfectly.</p><p>I see the Package Manager mentions that is 32/64.&nbsp; I should have noticed that.<br />This is an extremely helpful development for SF.<br />I do hope you can continue to add to this library.&nbsp; <br />I think you should also mention it in SF &quot;news&quot;.<br />--- <br />J.</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Fri, 07 Nov 2014 19:03:25 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1600#p1600</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1599#p1599</link>
			<description><![CDATA[<p>John,</p><p>I&#039;ve added the file dialog title argument like you suggested.&nbsp; Also, it now allows requesting text entry or selection from a list via simple calls.&nbsp; The latest version is available in the <a href="http://packages.simplyfortran.com/package/72.html">Package Manager</a>.</p><p>It already supports 64-bit projects.&nbsp; Just switch your project to 64-bit and compile.&nbsp; It should work fine.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 07 Nov 2014 16:38:45 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1599#p1599</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1598#p1598</link>
			<description><![CDATA[<p>I Like this new library very much, Jeff.<br />Might you be adding to it gradually?</p><p>I&#039;d appreciate also a 64bit version.</p><p>I like the way that, as well as accepting a filename extension filter, the the filename requester dialog also accepts a string for naming or describing the default file type.</p><p>Small suggestion:<br />The filename requester dialog box could benefit from a text string parameter that can be passed to it, to display in the top bar.&nbsp; I was using this in the DISLIN version to display a prompt.<br />---<br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Fri, 07 Nov 2014 11:22:35 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1598#p1598</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1597#p1597</link>
			<description><![CDATA[<p>John,</p><p>If you&#039;re interested in trying, I&#039;ve built a small library that provides a file open and save dialog from Fortran that doesn&#039;t seem to crash.&nbsp; It is not an exact replica of DISLIN&#039;s functions, but it is similar enough:</p><p><a href="http://packages.simplyfortran.com/package/72.html">http://packages.simplyfortran.com/package/72.html</a></p><p>There is no example project included, but the documentation can be viewed at:</p><p><a href="https://bitbucket.org/ArmstrongJ/wfdialogs/overview">https://bitbucket.org/ArmstrongJ/wfdialogs/overview</a></p><p>and an example program can be seen at:</p><p><a href="https://bitbucket.org/ArmstrongJ/wfdialogs/src/5b916bf422be83dc59ccbf7d82e9c77a17cad2d7/driver.f90?at=master">https://bitbucket.org/ArmstrongJ/wfdial … ?at=master</a></p><p>When linking, you&#039;ll need to remember to add the flags:</p><div class="codebox"><pre><code>-lwfdialogs -lcomdlg32</code></pre></div><p>Hopefully you can just use these calls rather than the problematic DISLIN call.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Thu, 06 Nov 2014 22:04:10 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1597#p1597</guid>
		</item>
		<item>
			<title><![CDATA[Re: SIGSEGV - segmentation fault, only when debugging]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1596#p1596</link>
			<description><![CDATA[<p>If we were using different compilers, then we were doubtless using different linkers, which are part of the &quot;binutils&quot; package.&nbsp; I&#039;m not sure what version we&#039;re shipping at the moment.&nbsp; However, I doubt that would cause the issue.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Thu, 06 Nov 2014 20:43:56 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1596#p1596</guid>
		</item>
	</channel>
</rss>
