<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Maratis.exe portability problem [SOLVED]]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=323&amp;type=atom"/>
	<updated>2012-03-12T12:35:57Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=323</id>
		<entry>
			<title type="html"><![CDATA[Re: Maratis.exe portability problem [SOLVED]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1610#p1610"/>
			<content type="html"><![CDATA[<p>Probably a cleanup of MGui will be needed at some point,<br />MCore and MEngine has been checked and checked again, but not MGui and Maratis editor code,<br />I was missing time when I did the first release.</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-03-12T12:35:57Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1610#p1610</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Maratis.exe portability problem [SOLVED]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1609#p1609"/>
			<content type="html"><![CDATA[<p>I only know that even a simple: if(varType == M_VAR_BOOL) crashed it. It was like varType was not readable at all, and caused a segment fault. The crash occured always after a call to some function of user32.dll, so I thought there was going on something instable. Of course the real leak might be somewhere else, but when code crashes which shouldn&#039;t crash, it&#039;s very hard to debug it. I&#039;ve seen this before also in BlendELF, and there also a printf(&quot;&quot;) fixed the crash.</p>]]></content>
			<author>
				<name><![CDATA[Lumooja]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=642</uri>
			</author>
			<updated>2012-03-12T11:57:34Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1609#p1609</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Maratis.exe portability problem [SOLVED]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1607#p1607"/>
			<content type="html"><![CDATA[<p>wow ?<br />what is that ? any idea how to trace the leak ?</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-03-12T11:25:41Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1607#p1607</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Maratis.exe portability problem [SOLVED]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1601#p1601"/>
			<content type="html"><![CDATA[<p>The new MString.cpp didn&#039;t help. But adding a MessageBoxA() or printf() to access the varType parameter fixed the crashing:<br /></p><div class="codebox"><pre><code>void MaratisUI::addValue(MGuiWindow * window, const char * valueName, M_VAR_TYPE varType, void * pointer, MVector2 * position)
{
    float size = 16;
    float ySpace = 15;
    MVector4 color(1, 1, 1, 1);
    MVector4 valueColor(1.0f, 0.95f, 0.45f, 0.85f); // 1.0 0.97 0.33
    MVector4 variableColor(0.66f, 0.76f, 0.87f, 1.0f);

    printf(&quot;%d&quot;,varType);   // wierd bug fix!

    if(varType == M_VAR_BOOL)</code></pre></div><p>There must be somekind of memory leak going on in the user32.dll or somewhere, when these kind of wierd fixes stabilize it.<br />Everything works fine now, and this hack doesn&#039;t take any performance either, because it&#039;s only called 4 times when &quot;add camera&quot;, &quot;add light&quot;, etc... is pressed in Editor.</p>]]></content>
			<author>
				<name><![CDATA[Lumooja]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=642</uri>
			</author>
			<updated>2012-03-11T20:20:44Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1601#p1601</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Maratis.exe portability problem [SOLVED]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1598#p1598"/>
			<content type="html"><![CDATA[<p>I realized something on my computer was more recent than svn, it can be related,<br />try to update the svn code, only one file changed : MString.cpp in MCore</p><p>I think it can be that, because I&#039;m not able to reproduce the bug</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-03-11T15:25:05Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1598#p1598</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Maratis.exe portability problem [SOLVED]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1597#p1597"/>
			<content type="html"><![CDATA[<p>Oh well, I found a funny bug fix: just disable the whole MaratisUI::addValue() method and everything works and doesn&#039;t crash anymore:<br /></p><div class="codebox"><pre><code>void MaratisUI::addValue(MGuiWindow * window, const char * valueName, M_VAR_TYPE varType, void * pointer, MVector2 * position)
{
    return;    // funny bug fix!
    float size = 16;
    float ySpace = 15;</code></pre></div><p>Surely this function must do something useful, what could it be?</p><p>EDIT: Ok, it seems to be a useful function after all, because it&#039;s needed for example for changing texts. But now it should be quite easy to find out on which line it crashes.</p>]]></content>
			<author>
				<name><![CDATA[Lumooja]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=642</uri>
			</author>
			<updated>2012-03-11T14:31:22Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1597#p1597</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Maratis.exe portability problem [SOLVED]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1596#p1596"/>
			<content type="html"><![CDATA[<p>I get this kind of disassembly when I run in debug mode and click on &quot;add camera&quot; icon in Maratis:<br /><a href="https://sites.google.com/site/maratis3d/editorcrash1.png">https://sites.google.com/site/maratis3d &#133; crash1.png</a></p>]]></content>
			<author>
				<name><![CDATA[Lumooja]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=642</uri>
			</author>
			<updated>2012-03-11T13:26:16Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1596#p1596</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Maratis.exe portability problem [SOLVED]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1595#p1595"/>
			<content type="html"><![CDATA[<p>Thank you,<br />I&#039;ll take a look, but I never had this bug,<br />can you trace it in debug mode ?</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-03-11T12:25:42Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1595#p1595</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Maratis.exe portability problem [SOLVED]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=1591#p1591"/>
			<content type="html"><![CDATA[<p>I wrote this on the Maratis for MinGW webpage:</p><p><span style="color: #FF0000">Support issue: Maratis Editor crashes when trying to add entities. As workaround, you can load the demo project, then click on an entity on the left side list, and after that it doesn&#039;t crash anymore. It must be some issue with missing NULL initializations in the MGui code, which MinGW elegantly optimizes.</span></p><p>I hope this helps to find the bug in the source code.</p>]]></content>
			<author>
				<name><![CDATA[Lumooja]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=642</uri>
			</author>
			<updated>2012-03-11T02:00:42Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=1591#p1591</id>
		</entry>
</feed>
