<div dir="ltr"><div>Ah yes, thanks, I tried QEMU via homebrew, but couldn't have it installing ubuntu, nor starting my already initialized images... Maybe 4.2.0 is too recent? I give up for now.</div><div><br></div><div>Since we do not have to wait long for crash, I just used traditional trial and restart with hardware watchpoints.</div><div><br></div><div>What happens is that loadObjectsFrom: is overwriting the textures...</div><div>(lldb) p state<br>(B3DRasterizerState) $12 = {<br>  faceAlloc = 0x0000000108fbb6c8<br>  edgeAlloc = 0x0000000108fdb6d8<br>  attrAlloc = 0x0000000108feb6e8<br>  aet = 0x0000000108fef6f8<br>  addedEdges = 0x0000000108ff3708<br>  fillList = 0x0000000108ff7710<br>  nObjects = 1111<br>  objects = 0x000000010920af98<br>  nTextures = 1<br>  textures = 0x000000010920c100<br>  spanSize = 2048<br>  spanBuffer = 0x0000000108ff7998<br>  spanDrawer = 0x0000000100479960 (Squeak`copyBitsFromtoat at BitBltPlugin.c:1359)<br>}</div><div><br></div><div>There is just  4456 bytes offset between objects and textures addresses...</div><div>But we pretend we are going to store 1111 pointers to B3DPrimitiveObject into this objects field...</div><div>Obviously, that ain't gonna work on a 64bits VM.</div><div><br></div><div>Let's take a look at B3DPrimitiveRasterizerData>>initObjects: nObjects<br>     objects _ B3DPrimitiveRasterizerData new: nObjects</div><div><div><br></div><div>B3DPrimitiveRasterizerData is variableWordSubclass: so it needs to allocate twice more words on a 64 bits VM...</div><div>With a bit of luck, we can fix it at image side...<br></div></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 27 févr. 2020 à 19:44, Paul DeBruicker <<a href="mailto:pdebruic@gmail.com">pdebruic@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
libvirt & qemu are supported on macos (<a href="https://libvirt.org/platforms.html" rel="noreferrer" target="_blank">https://libvirt.org/platforms.html</a>) &<br>
can use PMU<br>
(<a href="https://stackoverflow.com/questions/46490857/how-to-enable-pmu-in-kvm-guest" rel="noreferrer" target="_blank">https://stackoverflow.com/questions/46490857/how-to-enable-pmu-in-kvm-guest</a>)<br>
<br>
You can use homebrew to install libvirt & qemu<br>
<br>
  brew install libvirt qemu<br>
<br>
virt-manager & virt-viewer (<a href="https://virt-manager.org/" rel="noreferrer" target="_blank">https://virt-manager.org/</a>) are GUI tools<br>
create/manage/view KVM virtual machines. Macos support and install<br>
instructions are here:<br>
<br>
<a href="https://github.com/jeffreywildman/homebrew-virt-manager" rel="noreferrer" target="_blank">https://github.com/jeffreywildman/homebrew-virt-manager</a><br>
<br>
Or instead of virt-manager you can just use the command line and then<br>
install VNC on the vm:<br>
<br>
<a href="https://linuxconfig.org/how-to-create-and-manage-kvm-virtual-machines-from-cli#h9-create-the-new-virtual-machine" rel="noreferrer" target="_blank">https://linuxconfig.org/how-to-create-and-manage-kvm-virtual-machines-from-cli#h9-create-the-new-virtual-machine</a><br>
<br>
<br>
<br>
Nicolas Cellier wrote<br>
> Well, I've tried to install rr and all its dependencies on Ubuntu 16...<br>
> But...<br>
> I have no available machine to run linux natively.<br>
> <br>
> To run rr inside a virtual machine, virtualization of perf counters needs<br>
> to be enabled...<br>
> <a href="https://github.com/mozilla/rr/wiki/Building-And-Installing" rel="noreferrer" target="_blank">https://github.com/mozilla/rr/wiki/Building-And-Installing</a><br>
> <br>
> I'm using parallels, but not the Pro version, because I don't like the<br>
> annual pricing model, for personal use it's just too much.<br>
> Unfortunately, only pro edition supports PMU virtualization<br>
> <a href="https://download.parallels.com/desktop/v11/docs/en_US/Parallels%20Desktop%20User%27s%20Guide/37830.htm" rel="noreferrer" target="_blank">https://download.parallels.com/desktop/v11/docs/en_US/Parallels%20Desktop%20User%27s%20Guide/37830.htm</a><br>
> <br>
> Maybe it's time to change of VM provider, but for now, that's too many<br>
> hurdles, I give up...<br>
> <br>
> Le mer. 26 févr. 2020 à 22:04, Nicolas Cellier <<br>
<br>
> nicolas.cellier.aka.nice@<br>
<br>
>> a écrit :<br>
> <br>
>><br>
>><br>
>> Le mer. 26 févr. 2020 à 21:56, Nicolas Cellier <<br>
>> <br>
<br>
> nicolas.cellier.aka.nice@<br>
<br>
>> a écrit :<br>
>><br>
>>> Hi Stephane,<br>
>>> this is the worse game for VM developers ;)<br>
>>><br>
>> Hem, I meant the worst ever, even worse than my globish dialect ;)<br>
>><br>
>> No just kidding, very good game for finding our own bugs!<br>
>>><br>
>>> I just ran in debugger, and it crash in b3dDrawSTWRGB<br>
>>> But it seems like the function received an already corrupted texture...<br>
>>><br>
>>> (lldb) p *texture<br>
>>> (B3DTexture) $10 = {<br>
>>>   width = 152691968<br>
>>>   height = 1<br>
>>>   depth = 152842368<br>
>>>   rowLength = 1<br>
>>>   sMask = 152740096<br>
>>>   sShift = 1<br>
>>>   tMask = 152789728<br>
>>>   tShift = 1<br>
>>>   cmSize = 152890496<br>
>>>   colormap = 0x000000010916dd80<br>
>>>   data = 0x0000000109179f60<br>
>>> }<br>
>>><br>
>>> The width, depth and color map size are insane.<br>
>>> (lldb) p/x texture->width<br>
>>> (int) $5 = 0x0919e500<br>
>>> (lldb) p/x texture->depth<br>
>>> (int) $6 = 0x091c3080<br>
>>> (lldb) p/x texture->sMask<br>
>>> (int) $7 = 0x091aa100<br>
>>> (lldb) p/x texture->tMask<br>
>>> (int) $8 = 0x091b62e0<br>
>>> (lldb) p/x texture->cmSize<br>
>>> (int) $9 = 0x091cec80<br>
>>><br>
>>> Now it remains to discover how this got corrupted...<br>
>>> I wish I could run the debugger backward in time...<br>
>>> Maybe it's time to learn a new skill and explore the rr capability on<br>
>>> linux as recommended once by Jan Vrany.<br>
>>><br>
>>><br>
>>> Le mer. 26 févr. 2020 à 10:35, Stéphane Rollandin &lt;<br>
<br>
> lecteur@<br>
<br>
> &gt;<br>
>>> a écrit :<br>
>>><br>
>>>> > <a href="http://files.squeak.org/5.3rc1/Squeak5.3rc1-19414-64bit/" rel="noreferrer" target="_blank">http://files.squeak.org/5.3rc1/Squeak5.3rc1-19414-64bit/</a><br>
>>>> > Please give them a try and report any issues here on the mailing<br>
>>>> list.<br>
>>>> The Guardians game does not run in the 64bit version - it crashes<br>
>>>> immediately.<br>
>>>><br>
>>>> Guardians:<br>
>>>> <a href="http://www.zogotounga.net/comp/guardians.htm" rel="noreferrer" target="_blank">http://www.zogotounga.net/comp/guardians.htm</a><br>
>>>><br>
>>>> Code:<br>
>>>><br>
>>>> <a href="http://www.zogotounga.net/comp/squeak/guardians/Guardians-builder-0.94.sar" rel="noreferrer" target="_blank">http://www.zogotounga.net/comp/squeak/guardians/Guardians-builder-0.94.sar</a><br>
>>>><br>
>>>> (to see the crash, just install the above sar and follow the<br>
>>>> instructions for starting the game)<br>
>>>><br>
>>>><br>
>>>> Stef<br>
>>>><br>
>>>><br>
<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://forum.world.st/Squeak-VM-f104410.html" rel="noreferrer" target="_blank">http://forum.world.st/Squeak-VM-f104410.html</a><br>
</blockquote></div>