MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

peter ferrie
MAME Fan
Reged: 10/06/10
Posts: 46
Send PM


MAME 0.193 -verifyroms crash/out of memory
#235726 - 10/06/10 07:30 AM


Run MAME 0.193 (including 0.193u3) with -verifyroms

carnevil1 and gauntdl24 display "out of memory"

gamecst2 causes MAME (mame.exe, but mamepp.exe is also affected) to crash in this way:
-----------------------------------------------------
Exception at EIP=0169BF61 (not found): ACCESS VIOLATION
While attempting to write memory at 0587D940
-----------------------------------------------------
EAX=0586A6F0 EBX=00000000 ECX=0000ED52 EDX=0586EBC0
ESI=02AB2A6D EDI=00010000 EBP=0022F918 ESP=0022F908
-----------------------------------------------------
Stack crawl:
0022F918: 0169BF61 (not found)
0022F9F8: 0138FEA9 (not found)
0022FA28: 013900EB (not found)
0022FB98: 01538A1D (not found)
0022FBE8: 014EB9AC (not found)
0022FD28: 014EB500 (not found)
0022FEB8: 00D28B44 (not found)
0022FEF8: 016E269E (not found)
0022FF88: 004013D1 (not found)
0022FF94: 76291194 (BaseThreadInitThunk+0x0012)
0022FFD4: 77BEB495 (RtlInitializeExceptionChain+0x0063)
0022FFEC: 77BEB468 (RtlInitializeExceptionChain+0x0036)



Pernod
Lurker
Reged: 01/12/04
Posts: 82
Loc: UK
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: peter ferrie]
#235729 - 10/06/10 08:15 AM


> Run MAME 0.193 (including 0.193u3) with -verifyroms
>
> carnevil1 and gauntdl24 display "out of memory"
>

Firstly, there is no MAME 0.193 so I must assume you are referring to MAME 0.139?

The "out of memory" error would suggest, not surprisingly, that you do not have enough memory. How much RAM do you have on this PC? The games you mention use large CHD's so would expect you to need at least 2GB RAM to run them, more the better.



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4453
Loc: Melbourne, Australia
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: peter ferrie]
#235737 - 10/06/10 11:59 AM


You don't have a CHD inside a ZIP, do you? That's bad.



DMala
Sleep is overrated
Reged: 05/09/05
Posts: 3989
Loc: Waltham, MA
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: Pernod]
#235770 - 10/06/10 06:42 PM


> The "out of memory" error would suggest, not surprisingly, that you do not have
> enough memory.

Actually, that's pretty rarely the case. Memory in Windows is virtual, so unless you've turned off your swap file or are out of space on the drive where it's located, you pretty much can't run out, particularly in 64-bit Windows. It'll thrash the heck out of your drive once you run out of physical RAM, but it takes quite a bit to actually hit the wall.

I have no idea about this specific case, but in my experience "out of memory" errors are usually due to runaway allocation or some other error condition in the app.



Naoki
Reged: 11/10/09
Posts: 1998
Loc: United Kingdom
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: DMala]
#235788 - 10/06/10 08:37 PM


If so, then why could I not run Confidential Mission on Naomi GD-ROM in MAME until I had shut down loads of other programs (Including windows Explorer) until I had roughly 180~~~~ bytes/Mbs of pyschical RAM?

Edited by Naoki (10/06/10 08:38 PM)



----
On a quest for Digital 573 and Dancing Stage EuroMix 2

By gods I've found it!



CrapBoardSoftware
My real name is banned dickhead
Reged: 01/03/06
Posts: 1250
Loc: Wisconsin
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: Naoki]
#235790 - 10/06/10 08:49 PM


> If so, then why could I not run Confidential Mission on Naomi GD-ROM in MAME until I
> had shut down loads of other programs (Including windows Explorer) until I had
> roughly 180~~~~ bytes/Mbs of pyschical RAM?

Maybe it's because of memory fragmentation.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9711
Loc: ECV-197 The Orville
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: Pernod]
#235791 - 10/06/10 09:05 PM


> The "out of memory" error would suggest, not surprisingly, that you do not have
> enough memory. How much RAM do you have on this PC? The games you mention use large
> CHD's so would expect you to need at least 2GB RAM to run them, more the better.

It also suggests he's doing something horrifically bad like zipping up the CHDs for those games. (Yes, MAME will actually work that way if you have enough RAM, but that defeats the entire point of the CHD system).



DMala
Sleep is overrated
Reged: 05/09/05
Posts: 3989
Loc: Waltham, MA
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: Naoki]
#235794 - 10/06/10 09:41 PM


> If so, then why could I not run Confidential Mission on Naomi GD-ROM in MAME until I
> had shut down loads of other programs (Including windows Explorer) until I had
> roughly 180~~~~ bytes/Mbs of physical RAM?

I dunno, once you get into heavy disk swapping, performance goes in the toilet and any number of things can go wrong. Were you getting an actual "out of memory" error message?

Maybe you really were legitimately running out of memory. Like I said, I know very little about what MAME does under the hood. I was just saying that "out of memory" more often than not is indicative of some other problem in an app, rather than it legitimately running out of memory.



Naoki
Reged: 11/10/09
Posts: 1998
Loc: United Kingdom
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: DMala]
#235863 - 10/07/10 06:58 PM


Well, Naomi CHDs, and correct me if I'm wrong, i think get loaded similar to a Zip, since the Naomi does this aswell. And your statment suggested that if i ran out of Pyshical RAM, windows would still continue loading the CHD, but it didn't.



----
On a quest for Digital 573 and Dancing Stage EuroMix 2

By gods I've found it!



Naoki
Reged: 11/10/09
Posts: 1998
Loc: United Kingdom
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: CrapBoardSoftware]
#235864 - 10/07/10 06:59 PM


But when i cleared enough RAM, the game loaded fine, unless I'm not understanding your post correctly.



----
On a quest for Digital 573 and Dancing Stage EuroMix 2

By gods I've found it!



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9711
Loc: ECV-197 The Orville
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: Naoki]
#235876 - 10/07/10 09:03 PM


> Well, Naomi CHDs, and correct me if I'm wrong, i think get loaded similar to a Zip,
> since the Naomi does this aswell. And your statment suggested that if i ran out of
> Pyshical RAM, windows would still continue loading the CHD, but it didn't.

Can "Pyshical RAM" predict the future? *rimshot*

If you run out of physical RAM and you don't have sufficient space free on whatever HDD your swap file is on Windows will die and say "out of memory".



Naoki
Reged: 11/10/09
Posts: 1998
Loc: United Kingdom
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: R. Belmont]
#235881 - 10/07/10 10:24 PM


But despite the occasional "You are running low on space on C:\", which i still have roughl 1.5~2GB. So that makes roughly 3.5 availible RAM



----
On a quest for Digital 573 and Dancing Stage EuroMix 2

By gods I've found it!



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9711
Loc: ECV-197 The Orville
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: Naoki]
#235882 - 10/07/10 10:39 PM


> But despite the occasional "You are running low on space on C:\", which i still have
> roughl 1.5~2GB. So that makes roughly 3.5 availible RAM

Naomi GD-ROM games allocate 1 GB in a single block for decrypting the disc, which doesn't leave Windows many options in most cases. And that's on top of all the memory Naomi itself needs.



Naoki
Reged: 11/10/09
Posts: 1998
Loc: United Kingdom
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: R. Belmont]
#235885 - 10/07/10 11:33 PM


oh right



----
On a quest for Digital 573 and Dancing Stage EuroMix 2

By gods I've found it!



peter ferrie
MAME Fan
Reged: 10/06/10
Posts: 46
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: Pernod]
#237660 - 10/29/10 07:41 PM


Yes, I meant 0.139, and the "out of memory" problem was that I had stored the CHDs in ZIP files (because some of them compress really well), and I had forgotten to extract them first.
However, the crash indicates that MAME is vulnerable to memory corruption that could result in the execution of arbitrary code. In the gamecstl case, there's a memory allocation overflow condition when the .zip file size exceeds 4Gb, but you don't need such a large file to demonstrate problems in the zip handling.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9711
Loc: ECV-197 The Orville
Send PM


Re: MAME 0.193 -verifyroms crash/out of memory new [Re: peter ferrie]
#237671 - 10/29/10 09:02 PM


> However, the crash indicates that MAME is vulnerable to memory corruption that could
> result in the execution of arbitrary code.

Yes, and if you are running MAME as admin (Windows) / root (*IX) you get to keep all the pieces when you get owned. MAMEdev has at various times clearly communicated that MAME is not security-audited and should not be used in any kind of security-intensive situation.


Pages: 1

MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
1 registered and 21 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 6070