<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Assertion failed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632222#M726396</link>
    <description>If you don't have the source code to the program, use "tusc" to obtain a system call trace.  This will give you more information on why the fgets is returning NULL - whether it is an end of file condition or a read error.  You can obtain tusc from &lt;A href="http://hpux.connect.org.uk/" target="_blank"&gt;http://hpux.connect.org.uk/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you have source code, I would recommend removing the assertion from around the fgets and replacing it with something like:&lt;BR /&gt;&lt;BR /&gt;if (fgets(hardwareAddr, (STRLEN-1), fstream) == NULL) {&lt;BR /&gt;  if (!feof(fstream)) {&lt;BR /&gt;    perror("fgets");&lt;BR /&gt;    abort();&lt;BR /&gt;  } else {&lt;BR /&gt;    printf("end of file\n");&lt;BR /&gt;    fclose(fstream);&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
    <pubDate>Tue, 18 Dec 2001 11:00:16 GMT</pubDate>
    <dc:creator>Steven Gillard_2</dc:creator>
    <dc:date>2001-12-18T11:00:16Z</dc:date>
    <item>
      <title>Assertion failed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632221#M726395</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;We have a program running on HP-UX 10.20 that throws the next message at run-time:&lt;BR /&gt;&lt;BR /&gt;"Assertion failed: !(fgets(hardwareAddr, (STRLEN-1), fstream) == NULL), file snlui.c, line 1251"&lt;BR /&gt;&lt;BR /&gt;The problem is that sometimes the program works well.&lt;BR /&gt;&lt;BR /&gt;The Oracle version is 8.0.6.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Pedro.&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Dec 2001 10:44:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632221#M726395</guid>
      <dc:creator>Pedro_5</dc:creator>
      <dc:date>2001-12-18T10:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Assertion failed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632222#M726396</link>
      <description>If you don't have the source code to the program, use "tusc" to obtain a system call trace.  This will give you more information on why the fgets is returning NULL - whether it is an end of file condition or a read error.  You can obtain tusc from &lt;A href="http://hpux.connect.org.uk/" target="_blank"&gt;http://hpux.connect.org.uk/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you have source code, I would recommend removing the assertion from around the fgets and replacing it with something like:&lt;BR /&gt;&lt;BR /&gt;if (fgets(hardwareAddr, (STRLEN-1), fstream) == NULL) {&lt;BR /&gt;  if (!feof(fstream)) {&lt;BR /&gt;    perror("fgets");&lt;BR /&gt;    abort();&lt;BR /&gt;  } else {&lt;BR /&gt;    printf("end of file\n");&lt;BR /&gt;    fclose(fstream);&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
      <pubDate>Tue, 18 Dec 2001 11:00:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632222#M726396</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2001-12-18T11:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Assertion failed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632223#M726397</link>
      <description>Oops, just noticed you're running 10.20.  Use "trace" instead, which is the 10.20 equivalent of tusc.  You can get it at the same place.</description>
      <pubDate>Tue, 18 Dec 2001 11:02:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632223#M726397</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2001-12-18T11:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Assertion failed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632224#M726398</link>
      <description>I don't have the source code to the program. I have used "trace", but I don't have idea why the program fails. &lt;BR /&gt; &lt;BR /&gt;Any suggestions?&lt;BR /&gt; &lt;BR /&gt;Regards,&lt;BR /&gt;Pedro.&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Dec 2001 11:10:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632224#M726398</guid>
      <dc:creator>Pedro_5</dc:creator>
      <dc:date>2001-12-20T11:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Assertion failed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632225#M726399</link>
      <description>Can you post the trace output?  If its large just post the last 100 lines or so.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 20 Dec 2001 11:16:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/assertion-failed/m-p/2632225#M726399</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2001-12-20T11:16:40Z</dc:date>
    </item>
  </channel>
</rss>

