Not enough memory error since new patch...

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Not enough memory error since new patch...

#21 Post by Administrator » Sat Sep 14, 2013 11:46 am

I had made the change yesterday but did not update the zip that I uploaded. I did that just now so that users won't have to do it manually.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Not enough memory error since new patch...

#22 Post by rock5 » Sat Sep 14, 2013 1:19 pm

I found another bug with 1.03 b2. memoryReadUStringPtr crashes MM. This is the command I was using.

Code: Select all

memoryReadUStringPtr(getProc(),0xEEE44EB8,4))
I tested it with the current version of MM 1.03 on the main page and it works, so it's something that was changed since then. memoryReadUString still works.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Not enough memory error since new patch...

#23 Post by Administrator » Sat Sep 14, 2013 2:33 pm

Good catch, fixed it and re-uploaded the package.

This is what happens when you have (void*)&readBuffer as opposed to (void*)readBuffer.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Not enough memory error since new patch...

#24 Post by rock5 » Sat Sep 14, 2013 3:33 pm

That works but...

Code: Select all

if fw ~= getHwnd() and ( ah == 0 or fw ~= ah ) and (__targetWindow or __targetWindow ~= fw) then
Close but not close enough. :D Supposed to be

Code: Select all

if fw ~= getHwnd() and ( ah == 0 or fw ~= ah ) and (__targetWindow == nil or __targetWindow ~= fw) then
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Not enough memory error since new patch...

#25 Post by rock5 » Mon Sep 16, 2013 2:00 am

I've been thinking about this a bit.

Can foregroundWindow() ever be 'nil'? If not then if __targetWindow == nil then it won't equal fw. Therefore we could simplify it further like this

Code: Select all

if fw ~= getHwnd() and ( ah == 0 or fw ~= ah ) and (__targetWindow ~= fw) then
For that matter can fw ever equal 0? If not we could simplify it even further.

Code: Select all

if fw ~= getHwnd() and ( fw ~= ah ) and (__targetWindow ~= fw) then
ANd because we use ah only once we should probably write it like this so it doesn't do the "getAttachedHwnd()" unless it really has to.

Code: Select all

if fw ~= getHwnd() and (__targetWindow ~= fw) and (getAttachedHwnd() ~= fw) then
I've tested it a bit with 2 clients and 2 MMs and it still works correctly.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Not enough memory error since new patch...

#26 Post by Administrator » Mon Sep 16, 2013 8:03 pm

It should never return nil, but may return 0 in some (mostly undocumented) instances (note: NULL is 0, not nil).

s018mes
Posts: 79
Joined: Sun Jan 16, 2011 11:14 am

Re: Not enough memory error since new patch...

#27 Post by s018mes » Mon Oct 07, 2013 4:47 pm

I am getting this error. It cause the bot to stop and then in mid-battle I die.

I have 8 gigs of ram. Is it normal for micromacro.exe to use 1.4 to 1.8 gigs of ram? That seems extremely excessive. Runes of magic only uses 900k ram.

s018mes
Posts: 79
Joined: Sun Jan 16, 2011 11:14 am

Re: Not enough memory error since new patch...

#28 Post by s018mes » Tue Oct 08, 2013 8:51 am

I am continuing to have this problem. I can no longer bot past a few hours. When I watch the processes on my computer I see that micromacro.exe starts out with 15k memory and then over time it grows well past 1.5 gigs! At that point the program just crashes. Yes, I do run 2 instances of micromacro, but I always have. I use to be able to run it for day or more with no problems. Is there a plan on how to fix this in future releases?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Not enough memory error since new patch...

#29 Post by rock5 » Tue Oct 08, 2013 11:49 am

What version of MM are you using? Try the latest beta version which is also available on the micromacro download page. That might help.
http://www.solarstrike.net/micromacro
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

s018mes
Posts: 79
Joined: Sun Jan 16, 2011 11:14 am

Re: Not enough memory error since new patch...

#30 Post by s018mes » Tue Oct 08, 2013 2:45 pm

Yes, I didn't know there was a new version of Micromacro. That has SOLVED the issue. Thanks so much.

trinity1
Posts: 17
Joined: Thu Oct 10, 2013 12:07 pm

Re: Not enough memory error since new patch...

#31 Post by trinity1 » Thu Oct 10, 2013 12:41 pm

just updated to the new beta and svn everything is working except it gives a error because of my onload

here is my onload

Code: Select all

<onLoad> 
	-- Change Profile Option 
	changeProfileOption("ANTI_KS", true) 
	changeProfileOption("MAX_TARGET_DIST", 150) 
	changeProfileOption("INV_AUTOSELL_QUALITY", "white,green,blue")
	</onLoad>
and here is the error

10:34am - C:/Users/User/Desktop/micromacro/scripts/rom/functions.lua:1183: C:/Us
ers/User/Desktop/micromacro/lib/mods/cli.lua:72: attempt to call global 'tostrin
g' (a nil value)

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Not enough memory error since new patch...

#32 Post by Administrator » Thu Oct 10, 2013 1:01 pm

Either grab the stable (non-beta) version, or you can add add this:

Code: Select all

local tostring = global.tostring;
to micromacro/lib/mods/cli.lua at line 28 (just below all the similar lines).

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Not enough memory error since new patch...

#33 Post by rock5 » Thu Oct 10, 2013 1:08 pm

That's a strange one. I don't know how tostring, definitely an existing function, could be nil. I can make a couple of suggestions though.

Having the micromacro folder on the desktop has been reported as causing problems. I don't know if this is related but I suggest you put it somewhere such as the "Program Files" folder or in the root directory and just have a shortcut to the folder on your desktop.

Make sure there were no corrupt rombot files after your last svn update. If any of the files have red or yellow icons next to them then do an svn revert on the 'rom' folder.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

trinity1
Posts: 17
Joined: Thu Oct 10, 2013 12:07 pm

Re: Not enough memory error since new patch...

#34 Post by trinity1 » Thu Oct 10, 2013 1:52 pm

ok made the change that administrator said and that worked only thing it don't print the changes in the onload like the old one used too but it works

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Not enough memory error since new patch...

#35 Post by Administrator » Thu Oct 10, 2013 3:19 pm

rock5 wrote:That's a strange one. I don't know how tostring, definitely an existing function, could be nil. I can make a couple of suggestions though.
It is because I moved sprintf() to the cli module. Inside the module, it does not default to global scope so you need to explicitly call global functions through the _G table.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 5 guests