# Error in memory allocation when using Wine built by myself



## Adrien2002 (Jan 3, 2018)

Hi guys !

So I'm trying to understand why most of my games aren't running or are crashing after a while when I use the Wine built by myself. I downloaded the sources by myself and am using a 32 bit chroot with a base from FreeBSD/i386 and 32 bit packages installed within the chroot.

The Wine from Ports and the one from repos doesn't have this problem. The patches available in the ports packages of Wine (emulators/wine & emulators/wine-devel) aren't fixing it so I believe it's something about the Makefile but I'm not an expert of it 

I tried Mafia on my Wine and I have this :


```
wine: Unhandled page fault on read access to 0xd5555d83 at address 0x6fb69cd0 (thread 0009), starting debugger...
Unhandled exception: page fault on read access to 0xd5555d83 in 32-bit code (0x6fb69cd0).
wineserver: file_set_error() can't map error: Cannot allocate memory
```

And this problem happens on a lot of games I play.
Mafia is perfectly working when I use the repository's Wine (and other games like Assassin's Creed for instance).
The only difference between the "official" FreeBSD's Wine and mine is the way it is built so the solution MUST be in there : https://svnweb.freebsd.org/ports/head/emulators/wine-devel/Makefile?view=co

Any idea ? I would love to understand how Gerald (and possibly other maintainers) succeed to fix this.
Thank you very much !

I'm using Wine i386, I forgot to say that I already know about 32 bits applications of Windows needing a 32 bits Wine to run so I did, it's not a problem. I can play GTA San Andreas for example with my own Wine.


----------

