<div dir="ltr">Hi Klaus,<div><br></div><div>> Did you by any chance extend the CPUCTX struct or any other data<br>> structure which might be used by the recompiler? Just hours ago we<br>> tracked down a MingW gcc bug in the very same area which smells very<br>> similar...<br><div class="gmail_extra"><br></div><div class="gmail_extra">No, they only thing I've done is provided an IFramebuffer implementation, I haven't touched any internals. I mean, so far all I was doing was based on the SDK API, the init call now is the first thing I'm using from the actual source tree. But something very bad could be wrong with my implementation that could cause this, as I said, the weirdest thing is that when running under Windows with a debug build VirtualBox frontends never hit the recompiler but my code does. Now that I have found a solution for Linux I'll do full testing and see if it works fine - if it does , the issue is Windows only, if not, I should be able to debug. Simply for me it's really hard to understand what is going on in the recompiler code under Windows since I'm not familiar with Qemu. I don't know if you had time to look at it - but I at least posted the longjmp stack trace here <a href="https://www.virtualbox.org/pipermail/vbox-dev/2015-February/012872.html">https://www.virtualbox.org/pipermail/vbox-dev/2015-February/012872.html</a>, is it similar to what you have found?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><span class="im" style="font-size:12.8000001907349px"><br></span><span style="font-size:12.8000001907349px">> "Regular" API clients don't need this, they can happily live with the</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> implicit, delayed initialization which disables some functionality.</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> That's why it makes no sense to talk about it in tstVBoxAPIXPCOM.cpp -</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> it's happily working.</span><br></div><div class="gmail_extra"><span style="font-size:12.8000001907349px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8000001907349px">Sorry,I did not quite understand - so the fact I was running fine without it on Windows is because it is needed only for XPCOM and not COM or was I just lucky?</span></div><div class="gmail_extra"><span style="font-size:12.8000001907349px"><br></span></div><div class="gmail_extra"><br></div><div class="gmail_extra">Best Regards,</div><div class="gmail_extra">Rudolfs Bundulis</div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-31 16:16 GMT+03:00 Klaus Espenlaub <span dir="ltr"><<a href="mailto:klaus.espenlaub@oracle.com" target="_blank">klaus.espenlaub@oracle.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Rūdolfs,<br>
<span class=""><br>
On 31.03.2015 13:22, Rūdolfs Bundulis wrote:<br>
> Hi,<br>
><br>
> ok I found the root issue - my code did not call  RTR3InitExe(argc,<br>
> &argv, 0) since I built the application only from looking at the API<br>
> interfaces and was not aware that I need to do this (actually maybe it<br>
> makes sense to include a comment int the xpcom tstVBoxAPIXPCOM.cpp<br>
> sample about this?).<br>
<br>
</span>"Regular" API clients don't need this, they can happily live with the<br>
implicit, delayed initialization which disables some functionality.<br>
That's why it makes no sense to talk about it in tstVBoxAPIXPCOM.cpp -<br>
it's happily working.<br>
<br>
Only API clients actually running VMs inside them absolutely need the<br>
full initialization as the very first thing, otherwise they won't work.<br>
<span class=""><br>
> Now after I've taken a closer look to the frontends<br>
> I see that all them call the initialization function the first thing. I<br>
> added it and my IFrambuffer implementation started to get invocations.<br>
<br>
</span>Pretty sure that e.g. VBoxManage.cpp only does it because in uses quite<br>
some runtime functionality, and doesn't want to run any risk (in the old<br>
days it was far less "optional" to do the initialization).<br>
<span class=""><br>
> Since my Windows code worked fine without it - should I add it to<br>
> Windows as well? Any chance it is responsible for the weird recompiler<br>
> longjmp crash I get? Thanks in advance.<br>
<br>
</span>Did you by any chance extend the CPUCTX struct or any other data<br>
structure which might be used by the recompiler? Just hours ago we<br>
tracked down a MingW gcc bug in the very same area which smells very<br>
similar...<br>
<br>
Regards<br>
Klaus<br>
<span class="">><br>
> Best Regards,<br>
> Rudolfs Bundulis<br>
><br>
><br>
><br>
> <a href="tel:2015-03-30" value="+37120150330">2015-03-30</a> 2:42 GMT+03:00 Rūdolfs Bundulis <<a href="mailto:rudolfs.bundulis@gmail.com">rudolfs.bundulis@gmail.com</a><br>
</span>> <mailto:<a href="mailto:rudolfs.bundulis@gmail.com">rudolfs.bundulis@gmail.com</a>>>:<br>
<div class=""><div class="h5">><br>
>     Hi,<br>
><br>
>     I compiled debug version of 4.3.26 and tried my code against it -<br>
>     now the log has a much nicer assert message just before it ends:<br>
><br>
>     00:00:55.619996 TM: GIP - u32Mode=1 (SyncTSC) u32UpdateHz=83<br>
>     00:00:55.652313 TM: cTSCTicksPerSecond=0xa0861eba (2 693 144 250)<br>
>     fTSCVirtualized=true  fTSCUseRealTSC=false<br>
>     00:00:55.652322 TM: fMaybeUseOffsettedHostTSC=true<br>
>     TSCTiedToExecution=false TSCNotTiedToHalt=false<br>
>     00:00:55.652373<br>
>     00:00:55.652376 !!Assertion Failed!!<br>
>     00:00:55.652378 Expression: <NULL><br>
>     00:00:55.652380 Location  :<br>
>     /home/rudolfs/VirtualBox-4.3.26/src/VBox/VMM/VMMR3/TM.cpp(576) int<br>
>     TMR3Init(PVM)<br>
>     00:00:55.652508 Failed to create timer, u32Millies=10<br>
>     rc=VERR_NOT_SUPPORTED.<br>
><br>
>     I put a breakpoint in TM.cpp:576, and it seems that I am failing<br>
>     because of the code in RTTimerCreateEx():<br>
><br>
>          /*<br>
>           * We need the signal masks to be set correctly, which they<br>
>     won't be in<br>
>           * unobtrusive mode.<br>
>           */<br>
>          if (RTR3InitIsUnobtrusive())<br>
>              return VERR_NOT_SUPPORTED;<br>
><br>
>     What is unobtrusive mode and what signal masks do I need to set?<br>
>     I'll have a look at what is done in the frontends, but I guess that<br>
>     you guys here can explain it in more detail.<br>
><br>
>     Best Reagrds,<br>
>     Rudolfs Bundulis<br>
<br>
</div></div><div class=""><div class="h5">_______________________________________________<br>
vbox-dev mailing list<br>
<a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br>
<a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br>
</div></div></blockquote></div><br></div></div></div>