Heap Overruns are a thing of the past!

Incredible discovery by CarLuver69

User avatar
BUGATTIMAN253MPH
MM2X Very Active User
MM2X Very Active User
Posts: 1295
Joined: Wed Mar 09, 2011 1:00 am
Location: Ireland
Contact:

Postby BUGATTIMAN253MPH » Thu May 12, 2016 1:06 am

Image
I just chucked a bunch of random cars into my directory along with my upcoming mod and it still works witout issue. :aplausos: :aplausos: I guess the future has finally arrived then. :D
Image
Best Midtown Madness 2 car converter of the year
Best Midtown Madness 2 car converter of the year
Author of the best Midtown Madness 2 car add-on of the year
Best active member Midtown Madness 1 screenshot-er

Image
Best active member avatar
Best Midtown Madness 2 breakout of the year
Funniest active member

User avatar
mm2mm1fan
MM2X Very Active User
MM2X Very Active User
Posts: 1208
Joined: Mon Jul 08, 2013 2:00 am
Location: USA
Contact:

Postby mm2mm1fan » Thu May 12, 2016 1:49 am

It didn't work for me, it said it's not a valid Win32 application after I saved it. :?
Mostly retired from modifying Midtown Madness games. Nowadays mods Crashday Redline Edition.

Image

User avatar
CarLuver69
MM2X Active User
MM2X Active User
Posts: 934
Joined: Sun Mar 18, 2007 1:00 am
Location: California, USA
Contact:

Postby CarLuver69 » Thu May 12, 2016 12:26 pm

Hey guys, I've successfully patched the EXE to do the following:

- Increased default heap size to 128MB
- New "heapsize" parameter to allow for custom heap sizes!

To use a custom heap size, pass "-heapsize [size in mb]" to MM2. For example, to have a 1024MB heap, pass "-heapsize 1024" to MM2. So 256MB would be "-heapsize 256", and so on. However, due to extremely limited space, I was unable to implement any sort of error checking. I strongly recommend not to go below 32MB, and don't pass an empty parameter!

Download: https://goo.gl/CYsWYD

Backup your old one before replacing it! Enjoy!

EDIT: I've been informed that the EXE I patched does not include Diatosta's EXE patch. I'll see what I can do about this.
[img]https://img59.imageshack.us/img59/2562/2010mm2cawardssilver.png[/img] [color=orange]Best MM2 Innovation - Author of best car of the year[/color]
[color=silver][i]Proud supporter of MM2X[/i][/color]

[color=#CCCCCC]How do I love thee MM2? Let me count the add-ons...
[size=134][b]Are my pictures not showing up? [url=https://photobucket.com/CL69MM2]CLICK HERE![/url][/b][/size][/color]

User avatar
COOLGUY200
MM2X Active User
MM2X Active User
Posts: 586
Joined: Tue Mar 08, 2011 1:00 am
Location: tiny shed in detroit

Postby COOLGUY200 » Thu May 12, 2016 1:55 pm

Great discovery! :)
Image

User avatar
Diatosta
MM2X Active User
MM2X Active User
Posts: 783
Joined: Tue Jun 26, 2012 2:00 am
Location: Portugal? Maybe...
Contact:

Postby Diatosta » Thu May 12, 2016 2:33 pm

If you want I can try to patch my .exe, and even include error checking if I'm able to :P
[color=white]MM2 lover! Yeah![/color]
[color=white]diatosta.pt[/color]

[color=white]Also, gotta love when people don't publicize their work or ask for support in their signatures. Also don't forget to check my unfinished mods and donate to my Paypal

Also, one of my trucks[/color]
[img][/img]

User avatar
Kunal2045
MM2X Very Active User
MM2X Very Active User
Posts: 1185
Joined: Sat Aug 29, 2009 2:00 am
Location: New Zealand

Postby Kunal2045 » Sat May 14, 2016 4:54 am

This is quite an achievement! Amazing find guys. Since then I have been doing nothing more but cruising on New York with all three on max density. Never had this much fun.
While its great so see a patch, I'll wait for Diatosta's EXE patch. ;) Now if only the veterans were here to witness this. (Riva and Stan to name a few)

EDIT: 10 cops as maximum is fine with me. Just need to know how to do that
Last edited by Kunal2045 on Sat May 14, 2016 5:59 am, edited 1 time in total.
[align=center][color=black]Sig[/color]
[img]https://www.imgweave.com/view/4838.png[/img][/align]

User avatar
FXANBSS
MM2X Active User
MM2X Active User
Posts: 685
Joined: Sun Mar 10, 2013 1:00 am
Location: Midtown Club, Discord
Likes received: 4 likes

Postby FXANBSS » Sat May 14, 2016 5:34 am

Diatosta's EXE has a annoying crash, if you have over 10 cops chasing you, put 10 cops as maximun and it will fix it.


If you want more than 10 cops without crashes, then use this:
https://mmarchive.com/file_details.php?file_id=2248

The behavior of the cops are more friendly though.

User avatar
SuperSecret
MM2X Junior User
MM2X Junior User
Posts: 127
Joined: Mon Dec 08, 2008 1:00 am
Location: Italy

Postby SuperSecret » Sat May 14, 2016 2:22 pm

I made a patcher (download: compiled and source code), to use it just drag and drop midtown2.exe on the program.
Since then I have been doing nothing more but cruising on New York with all three on max density. Never had this much fun.
Beware, New York is still quite unstable under certain conditions (the Heap Overruns are gone, but sometimes it just crashes with a generic "FindHeap failed" error)
ImageAuthor of best MM2 track add-on of the year (2014) - Best Programmer (2015)
ImageBest programmer (2013 - 2014) - Best MM2 innovation of the year (2014)
ImageAuthor of best MM2 mod of the year (2013)

User avatar
FXANBSS
MM2X Active User
MM2X Active User
Posts: 685
Joined: Sun Mar 10, 2013 1:00 am
Location: Midtown Club, Discord
Likes received: 4 likes

Postby FXANBSS » Sat May 14, 2016 3:52 pm

What about merge this one?

https://www.mm2x.com/modules.php?name=Forum ... pic&t=5409

Every EXE in the universe and then make the Ultimate EXE, with no crashes.

And of course do Beta Testing, i hate the cops crash.

User avatar
Kunal2045
MM2X Very Active User
MM2X Very Active User
Posts: 1185
Joined: Sat Aug 29, 2009 2:00 am
Location: New Zealand

Postby Kunal2045 » Sun May 15, 2016 12:49 pm

Beware, New York is still quite unstable under certain conditions (the Heap Overruns are gone, but sometimes it just crashes with a generic "FindHeap failed" error)
I haven't come across that error yet, but thanks for the heads up. Good work with the patcher btw. ;)
[align=center][color=black]Sig[/color]
[img]https://www.imgweave.com/view/4838.png[/img][/align]

User avatar
Diatosta
MM2X Active User
MM2X Active User
Posts: 783
Joined: Tue Jun 26, 2012 2:00 am
Location: Portugal? Maybe...
Contact:

Postby Diatosta » Mon May 16, 2016 12:23 am

So I finally finished the damn .exe mod. It's my modified .exe, but with the -heapsize argument, as in Mark's. But this one includes some error checking. Like, if you try to put something lower than 32, and it'll throw you an fancy error :P

Anyway, here it is:
https://mega.nz/#!U11TUL6L!Qz7vR2AaPMi0 ... duCsan1LAM

Thanks to Mark for finding this out and by giving me some help over at Facebook :P
[color=white]MM2 lover! Yeah![/color]
[color=white]diatosta.pt[/color]

[color=white]Also, gotta love when people don't publicize their work or ask for support in their signatures. Also don't forget to check my unfinished mods and donate to my Paypal

Also, one of my trucks[/color]
[img][/img]

User avatar
mm2mm1fan
MM2X Very Active User
MM2X Very Active User
Posts: 1208
Joined: Mon Jul 08, 2013 2:00 am
Location: USA
Contact:

Postby mm2mm1fan » Mon May 16, 2016 4:11 am

Your guys patches worked, thanks :D
Mostly retired from modifying Midtown Madness games. Nowadays mods Crashday Redline Edition.

Image

User avatar
sajmon14
MM2X VIP Member
MM2X VIP Member
Posts: 5319
Joined: Wed Feb 13, 2008 1:00 am
Location: Poland
Contact:

Postby sajmon14 » Mon May 16, 2016 8:28 am

Great work :)

User avatar
dummiesboy
MM2X Super Active User
MM2X Super Active User
Posts: 2426
Joined: Thu Jul 24, 2008 2:00 am
Location: ´Murca
Likes received: 1 like

Postby dummiesboy » Tue May 17, 2016 10:45 pm

I see that Supersecret's patcher has been uploaded to the site. Great to see this tweak being brought to the general public. :)
Image

User avatar
Franch88
MM2X Admin
MM2X Admin
Posts: 15703
Joined: Thu May 31, 2007 2:00 am
Location: Italy
Likes received: 1 like
Contact:

Postby Franch88 » Tue May 17, 2016 11:19 pm

It really had to be published and brought to the public, and more, was me who suggested the implementing of a patcher to SuperSecret, so to apply it to any Midtown2.exe file out there. :wink:
Fiat 500 = Italian motorization. Franch88, MM2 eXtreme forum and website Administrator.
|Franch88's MM2 Releases|