<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/17312" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2009-11-14T09:52:16-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/17312</id>

		<entry>
		<author><name><![CDATA[kulpae]]></name></author>
		<updated>2009-11-14T09:52:16-04:00</updated>

		<published>2009-11-14T09:52:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90907#p90907</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90907#p90907"/>
		<title type="html"><![CDATA[MegaHal 2.7 and Eggdrop v1.6.20+bindmodecase]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90907#p90907"><![CDATA[
Okay, had to fix some bugs in megahal.<br><br>the solution for this warnings:<div class="codebox"><p>Code: </p><pre><code>[02:15] *** ATTEMPTING TO FREE NON-MALLOC'D PTR: megahal:megahal.c (1094) </code></pre></div>is to replace all <em class="text-italics">realloc</em> calls in megahal.c with <strong class="text-strong">nrealloc</strong>.<br><br>And on my system (64bit) there were also a compiler warning, that I ignored first (something like: read size parameter is bigger than buffer length). <br>I checked it, and found out that int has the size of 4 on my machine, but BYTE4 has the size of 8!<br>so I went to megahal.h and changed <div class="codebox"><p>Code: </p><pre><code>#define BYTE4 unsigned long</code></pre></div>to<div class="codebox"><p>Code: </p><pre><code>#define BYTE4 unsigned int</code></pre></div>then configured with --enable-tcl-threads, <br>make iconfig, make &amp;&amp; make install. done <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>Now I can restart the bot, without this annoying Buffer Overflow Errors.<br><br>And I've increased the MEMTBLSIZE constant again to 200000, as the megahal brain grows...<br><br>thanks for showing me the way... <br><br>bb, kulpae<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10948">kulpae</a> — Sat Nov 14, 2009 9:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kulpae]]></name></author>
		<updated>2009-11-14T07:34:33-04:00</updated>

		<published>2009-11-14T07:34:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90906#p90906</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90906#p90906"/>
		<title type="html"><![CDATA[MegaHal 2.7 and Eggdrop v1.6.20+bindmodecase]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90906#p90906"><![CDATA[
Yeah, thank you!<br>I can start eggdrop with megahal now (but have to remove the brain anyways, trying to fix that now...).<br><br>The solution was to increase the MEMTBLSIZE constant in src/mem.c from 25000 to 100000.<br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br>I don't know how elegant this solution is, but it works <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>Now I'm looking, how to start megahal with an existing brain (without removing it every time)<br><br>bb, kulpae<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10948">kulpae</a> — Sat Nov 14, 2009 7:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-11-13T21:58:22-04:00</updated>

		<published>2009-11-13T21:58:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90902#p90902</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90902#p90902"/>
		<title type="html"><![CDATA[MegaHal 2.7 and Eggdrop v1.6.20+bindmodecase]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90902#p90902"><![CDATA[
It's not that it's trying to nfree a null-pointer, but a memory address that was not allocated using nmalloc() (memory-tracking version of malloc()).<br><br>There's probably no major change since the 1.6.19 eggie you are experiencing, but that you have actually compiled your eggie with memory debugging enabled. It's possible they've broken the nmalloc/nfree algorithms, I suppose, but I'd have to check recent changelogs to see if they've touched that (or the global export table).<br>You'd find this code in src/mem.c if you'd like to have a look yourself.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Nov 13, 2009 9:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kulpae]]></name></author>
		<updated>2009-11-13T21:27:05-04:00</updated>

		<published>2009-11-13T21:27:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90900#p90900</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90900#p90900"/>
		<title type="html"><![CDATA[MegaHal 2.7 and Eggdrop v1.6.20+bindmodecase]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90900#p90900"><![CDATA[
Hello guys,<br>I just tried to run the latest eggdrop from the cvs repo and got weird memory errors from megahal module. But before (with Eggdrop 1.6.19+ctcpfix) everything worked, even megaHal.<br><br>this is what I get, when running eggdrop:<div class="codebox"><p>Code: </p><pre><code>[02:15] *** ATTEMPTING TO FREE NON-MALLOC'D PTR: megahal:megahal.c (1094)[02:15] *** ATTEMPTING TO FREE NON-MALLOC'D PTR: megahal:megahal.c (1094)(absolutely the same message several times)[02:15] *** ATTEMPTING TO FREE NON-MALLOC'D PTR: megahal:megahal.c (1094)[02:15] *** MEMORY TABLE FULL: megahal:megahal.c (1275)</code></pre></div>more about my sys:<br>ubuntu server 8.10 x86_64<br>MegaHal from <a href="http://www.barkerjr.net/irc/eggdrop/modules/megahal/" class="postlink">here</a><br><br>what has changed since Eggdrop 1.6.19+ctcpfix? <br>The first error is really weird, since at line 1094 of megaHal.c nfree is called on a non-NULL ptr...<br>As I said before, the same megaHal version worked nicely with 1.6.19 (okay, I had to remove the brain in order to start eggdrop...)<br><br>hopefully someone can help me,<br>bb, kulpae<br><br>edit: I need the cvs revision because of the "bind out" feature...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10948">kulpae</a> — Fri Nov 13, 2009 9:27 pm</p><hr />
]]></content>
	</entry>
	</feed>
