I'm just looking for a bit of help, plus a suggestion (this "feature" I add should be put in XQuartz) I add something to my custom build (WineskinX11) thats very minor thats not normally in XQuartz, but you should really add it. My problem is that the current way I have it working, it has always worked fine in 10.6 and 10.7, but fails in 10.8... What I have added is to make Cmd+Opt+A be able to toggle back to captured fullscreen. Normally in XQuartz if you want to multitask in a locked fullscreen its a major pain, but you can Cmd+Opt+A to get out of fullscreen mode.... but then often your stuck not being able to get back into it. What I did to change the code was basically make it so Cmd+Opt+A wasn't disabled in Rootless mode, and in quartzRandR.c added in a variable... QuartzModeInfo wsLastUsedMode; then down in QuartzRandRToggleFullscreen(void) When it toggles to rootless on the Cmd+Opt+A key combo I added a line... wsLastUsedMode = pQuartzScreen->currentMode; Added in right before it calls QuartzRandRSetFakeRootless() In the code there if it was already in Rootless it normally just say that its ignoring a change because its in rootless, but I changed that to run... QuartzRandRSetMode(pScreen, &wsLastUsedMode, TRUE); This has worked fine for a long time.. on 10.5, 10.6 and 10.7... but on 10.8 its a different story. Cmd+Opt+A out of captured fullscreen works ok, but going back in... if its not having to change resolutions (like 1280x800 desktop and 1280x800 fullscreen) it occasionally works... but if the fullscreen was any lower res, the X server always crashes... I put a crashlog here... http://pastebin.com/W4uJ6S5b That was a test build Wineskin wrapper of course running a game in Wine and crashed trying to do the changed Cmd+Opt+A back into fullscreen. its xorg-server 1.12.99.905 as you can see in the log, but I've tested with multiple 1.12 versions and some earlier, and it happens in 10.8 on all of them. This build runs fine on 10.6 for me. as a test, I opened an xterm and used xrandr to change back, but it crashes too... so I don't think my code change is causing the crash specifically. Now if I launch a normal XQuartz 2.7.2, and Cmd+Opt+A out and use xrandr to get back to fullscreen it doesn't crash though... so I'm a bit at a loss of why its happening, as I don't have any changes to the code for resolution switching other than this one thing... I used to, but now that RandR and screen capturing is working good in XQuartz, I took all my code out that did that stuff. Any thoughts anyone has would be appreciated, and I really think this would be a useful feature to add to XQuartz anyways, so people can toggle out and back in to the captured fullscreen for multitasking without having to use in game options to adjust resolutions or launch xterm to use xrandr.
I've only *quickly* looked at this, but the crash log does strike me as potentially a bug in CoreGraphics. Could you please file a radar (http://bugreport.apple.com) with the crash log. Also, would you mind posting the patches that you described, so I can try it out on my system? It doesn't matter if they're not generalized enough to be integrated yet... as long as I can use them to trigger the bug. Thanks, Jeremy On Aug 26, 2012, at 05:47, doh123 <doh123@doh123.com> wrote:
I'm just looking for a bit of help, plus a suggestion (this "feature" I add should be put in XQuartz)
I add something to my custom build (WineskinX11) thats very minor thats not normally in XQuartz, but you should really add it. My problem is that the current way I have it working, it has always worked fine in 10.6 and 10.7, but fails in 10.8...
What I have added is to make Cmd+Opt+A be able to toggle back to captured fullscreen. Normally in XQuartz if you want to multitask in a locked fullscreen its a major pain, but you can Cmd+Opt+A to get out of fullscreen mode.... but then often your stuck not being able to get back into it. What I did to change the code was basically make it so Cmd+Opt+A wasn't disabled in Rootless mode, and in quartzRandR.c added in a variable...
QuartzModeInfo wsLastUsedMode;
then down in QuartzRandRToggleFullscreen(void) When it toggles to rootless on the Cmd+Opt+A key combo I added a line... wsLastUsedMode = pQuartzScreen->currentMode; Added in right before it calls QuartzRandRSetFakeRootless()
In the code there if it was already in Rootless it normally just say that its ignoring a change because its in rootless, but I changed that to run... QuartzRandRSetMode(pScreen, &wsLastUsedMode, TRUE);
This has worked fine for a long time.. on 10.5, 10.6 and 10.7... but on 10.8 its a different story. Cmd+Opt+A out of captured fullscreen works ok, but going back in... if its not having to change resolutions (like 1280x800 desktop and 1280x800 fullscreen) it occasionally works... but if the fullscreen was any lower res, the X server always crashes...
I put a crashlog here... http://pastebin.com/W4uJ6S5b
That was a test build Wineskin wrapper of course running a game in Wine and crashed trying to do the changed Cmd+Opt+A back into fullscreen. its xorg-server 1.12.99.905 as you can see in the log, but I've tested with multiple 1.12 versions and some earlier, and it happens in 10.8 on all of them. This build runs fine on 10.6 for me.
as a test, I opened an xterm and used xrandr to change back, but it crashes too... so I don't think my code change is causing the crash specifically. Now if I launch a normal XQuartz 2.7.2, and Cmd+Opt+A out and use xrandr to get back to fullscreen it doesn't crash though... so I'm a bit at a loss of why its happening, as I don't have any changes to the code for resolution switching other than this one thing... I used to, but now that RandR and screen capturing is working good in XQuartz, I took all my code out that did that stuff.
Any thoughts anyone has would be appreciated, and I really think this would be a useful feature to add to XQuartz anyways, so people can toggle out and back in to the captured fullscreen for multitasking without having to use in game options to adjust resolutions or launch xterm to use xrandr.
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev
I'll put together a patch when I get time, it's only a few lines changed to get the toggle working, so no big deal... Also on further thought I recall testing it last week some and if I disabled the Display Capture I believe it wasn't crashing at all either. I'll play with it more tonight and give you a patch. On Aug 27, 2012, at 1:21 PM, Jeremy Huddleston Sequoia <jeremyhu@apple.com> wrote:
I've only *quickly* looked at this, but the crash log does strike me as potentially a bug in CoreGraphics. Could you please file a radar (http://bugreport.apple.com) with the crash log.
Also, would you mind posting the patches that you described, so I can try it out on my system? It doesn't matter if they're not generalized enough to be integrated yet... as long as I can use them to trigger the bug.
Thanks, Jeremy
On Aug 26, 2012, at 05:47, doh123 <doh123@doh123.com> wrote:
I'm just looking for a bit of help, plus a suggestion (this "feature" I add should be put in XQuartz)
I add something to my custom build (WineskinX11) thats very minor thats not normally in XQuartz, but you should really add it. My problem is that the current way I have it working, it has always worked fine in 10.6 and 10.7, but fails in 10.8...
What I have added is to make Cmd+Opt+A be able to toggle back to captured fullscreen. Normally in XQuartz if you want to multitask in a locked fullscreen its a major pain, but you can Cmd+Opt+A to get out of fullscreen mode.... but then often your stuck not being able to get back into it. What I did to change the code was basically make it so Cmd+Opt+A wasn't disabled in Rootless mode, and in quartzRandR.c added in a variable...
QuartzModeInfo wsLastUsedMode;
then down in QuartzRandRToggleFullscreen(void) When it toggles to rootless on the Cmd+Opt+A key combo I added a line... wsLastUsedMode = pQuartzScreen->currentMode; Added in right before it calls QuartzRandRSetFakeRootless()
In the code there if it was already in Rootless it normally just say that its ignoring a change because its in rootless, but I changed that to run... QuartzRandRSetMode(pScreen, &wsLastUsedMode, TRUE);
This has worked fine for a long time.. on 10.5, 10.6 and 10.7... but on 10.8 its a different story. Cmd+Opt+A out of captured fullscreen works ok, but going back in... if its not having to change resolutions (like 1280x800 desktop and 1280x800 fullscreen) it occasionally works... but if the fullscreen was any lower res, the X server always crashes...
I put a crashlog here... http://pastebin.com/W4uJ6S5b
That was a test build Wineskin wrapper of course running a game in Wine and crashed trying to do the changed Cmd+Opt+A back into fullscreen. its xorg-server 1.12.99.905 as you can see in the log, but I've tested with multiple 1.12 versions and some earlier, and it happens in 10.8 on all of them. This build runs fine on 10.6 for me.
as a test, I opened an xterm and used xrandr to change back, but it crashes too... so I don't think my code change is causing the crash specifically. Now if I launch a normal XQuartz 2.7.2, and Cmd+Opt+A out and use xrandr to get back to fullscreen it doesn't crash though... so I'm a bit at a loss of why its happening, as I don't have any changes to the code for resolution switching other than this one thing... I used to, but now that RandR and screen capturing is working good in XQuartz, I took all my code out that did that stuff.
Any thoughts anyone has would be appreciated, and I really think this would be a useful feature to add to XQuartz anyways, so people can toggle out and back in to the captured fullscreen for multitasking without having to use in game options to adjust resolutions or launch xterm to use xrandr.
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev
I *think* this is all i did to get it working... but I haven't tested this. I believe its all the changes I did to get the toggle working on 10.5 - 10.7 fine. I keep my stuff in patch files anyways, but all of this wasn't in the same one so I had to go through and find all the right parts, but If I got it right, it adds CMD+Opt+A toggle back into fullscreen, just something changed with 10.8, and I think its something actually with the actual capturing the display, but I may be wrong... or it may add some other issues I've never run in to... because I'm not sure why this was all set to disabled in the first place. On Aug 27, 2012, at 1:21 PM, Jeremy Huddleston Sequoia <jeremyhu@apple.com> wrote:
I've only *quickly* looked at this, but the crash log does strike me as potentially a bug in CoreGraphics. Could you please file a radar (http://bugreport.apple.com) with the crash log.
Also, would you mind posting the patches that you described, so I can try it out on my system? It doesn't matter if they're not generalized enough to be integrated yet... as long as I can use them to trigger the bug.
Thanks, Jeremy
On Aug 26, 2012, at 05:47, doh123 <doh123@doh123.com> wrote:
I'm just looking for a bit of help, plus a suggestion (this "feature" I add should be put in XQuartz)
I add something to my custom build (WineskinX11) thats very minor thats not normally in XQuartz, but you should really add it. My problem is that the current way I have it working, it has always worked fine in 10.6 and 10.7, but fails in 10.8...
What I have added is to make Cmd+Opt+A be able to toggle back to captured fullscreen. Normally in XQuartz if you want to multitask in a locked fullscreen its a major pain, but you can Cmd+Opt+A to get out of fullscreen mode.... but then often your stuck not being able to get back into it. What I did to change the code was basically make it so Cmd+Opt+A wasn't disabled in Rootless mode, and in quartzRandR.c added in a variable...
QuartzModeInfo wsLastUsedMode;
then down in QuartzRandRToggleFullscreen(void) When it toggles to rootless on the Cmd+Opt+A key combo I added a line... wsLastUsedMode = pQuartzScreen->currentMode; Added in right before it calls QuartzRandRSetFakeRootless()
In the code there if it was already in Rootless it normally just say that its ignoring a change because its in rootless, but I changed that to run... QuartzRandRSetMode(pScreen, &wsLastUsedMode, TRUE);
This has worked fine for a long time.. on 10.5, 10.6 and 10.7... but on 10.8 its a different story. Cmd+Opt+A out of captured fullscreen works ok, but going back in... if its not having to change resolutions (like 1280x800 desktop and 1280x800 fullscreen) it occasionally works... but if the fullscreen was any lower res, the X server always crashes...
I put a crashlog here... http://pastebin.com/W4uJ6S5b
That was a test build Wineskin wrapper of course running a game in Wine and crashed trying to do the changed Cmd+Opt+A back into fullscreen. its xorg-server 1.12.99.905 as you can see in the log, but I've tested with multiple 1.12 versions and some earlier, and it happens in 10.8 on all of them. This build runs fine on 10.6 for me.
as a test, I opened an xterm and used xrandr to change back, but it crashes too... so I don't think my code change is causing the crash specifically. Now if I launch a normal XQuartz 2.7.2, and Cmd+Opt+A out and use xrandr to get back to fullscreen it doesn't crash though... so I'm a bit at a loss of why its happening, as I don't have any changes to the code for resolution switching other than this one thing... I used to, but now that RandR and screen capturing is working good in XQuartz, I took all my code out that did that stuff.
Any thoughts anyone has would be appreciated, and I really think this would be a useful feature to add to XQuartz anyways, so people can toggle out and back in to the captured fullscreen for multitasking without having to use in game options to adjust resolutions or launch xterm to use xrandr.
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev
+QuartzModeInfoPtr *lastUsedMode; ... + QuartzRandRSetMode(pScreen, &lastUsedMode, TRUE); That won't work. You should see a warning from the compiler telling you that you're passing incompatible pointer types. Seeing that warning should be a huge red flag that something is wrong. You probably want this for lastUsedMode: QuartzModeInfo lastUsedMode; --- It also looks like you may be using lastUsedMode uninitialized. It was probably the case that CG just returned an error in Lion and is crashing now in ML. That crash is a bug in CG, but it's exposed by a bug in your code. --Jeremy On 2012-08-27 18:46, doh123 wrote:
I *think* this is all i did to get it working... but I haven't tested this. I believe its all the changes I did to get the toggle working on 10.5 - 10.7 fine. I keep my stuff in patch files anyways, but all of this wasn't in the same one so I had to go through and find all the right parts, but If I got it right, it adds CMD+Opt+A toggle back into fullscreen, just something changed with 10.8, and I think its something actually with the actual capturing the display, but I may be wrong... or it may add some other issues I've never run in to... because I'm not sure why this was all set to disabled in the first place.
On 2012-08-27 21:29, Jeremy Huddleston Sequoia wrote:
+QuartzModeInfoPtr *lastUsedMode; ... + QuartzRandRSetMode(pScreen, &lastUsedMode, TRUE);
That won't work. You should see a warning from the compiler telling you that you're passing incompatible pointer types. Seeing that warning should be a huge red flag that something is wrong.
You probably want this for lastUsedMode:
QuartzModeInfo lastUsedMode;
In reading the body of your email, it looks like you are doing this correctly, but your patch was just wrong, so I'll assume this is not the issue. It is possible that the mode is being released out from under you because you never retained your reference to it. Try doing something like this when you set your lastUsedMode: if (lastUsedMode.ref) CFRelease(lastUsedMode.ref); lastUsedMode = pQuartzScreen->currentMode; CFRetain(lastUsedMode.ref)
---
It also looks like you may be using lastUsedMode uninitialized.
It was probably the case that CG just returned an error in Lion and is crashing now in ML. That crash is a bug in CG, but it's exposed by a bug in your code.
--Jeremy
On 2012-08-27 18:46, doh123 wrote:
I *think* this is all i did to get it working... but I haven't tested this. I believe its all the changes I did to get the toggle working on 10.5 - 10.7 fine. I keep my stuff in patch files anyways, but all of this wasn't in the same one so I had to go through and find all the right parts, but If I got it right, it adds CMD+Opt+A toggle back into fullscreen, just something changed with 10.8, and I think its something actually with the actual capturing the display, but I may be wrong... or it may add some other issues I've never run in to... because I'm not sure why this was all set to disabled in the first place.
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev
sorry about the pointer... I was just typing stuff in for the patch and screwed that up... no I wasn't using a pointer there, it won't even compile :-) for the good news, it seems like my inexperience caused the issue... the CFRetain seems to fix the issue as far as I can see, so I doubt its a problem in CoreGraphics. Its kind of funny the problem never happened on 10.5, 10.6 and 10.7... guess I got lucky before. I'm guessing from looking that stops garbage collection from trashing it... and maybe the garbage collection with 10.8 is more aggressive. Thanks for the help... and hopefully you'll add it in to main XQuartz as its nice to be able to switch out and then back in to fullscreen captured mode easily. On Aug 27, 2012, at 11:34 PM, Jeremy Huddleston Sequoia <jeremyhu@freedesktop.org> wrote:
On 2012-08-27 21:29, Jeremy Huddleston Sequoia wrote:
+QuartzModeInfoPtr *lastUsedMode; ... + QuartzRandRSetMode(pScreen, &lastUsedMode, TRUE);
That won't work. You should see a warning from the compiler telling you that you're passing incompatible pointer types. Seeing that warning should be a huge red flag that something is wrong.
You probably want this for lastUsedMode:
QuartzModeInfo lastUsedMode;
In reading the body of your email, it looks like you are doing this correctly, but your patch was just wrong, so I'll assume this is not the issue.
It is possible that the mode is being released out from under you because you never retained your reference to it. Try doing something like this when you set your lastUsedMode:
if (lastUsedMode.ref) CFRelease(lastUsedMode.ref); lastUsedMode = pQuartzScreen->currentMode; CFRetain(lastUsedMode.ref)
---
It also looks like you may be using lastUsedMode uninitialized.
It was probably the case that CG just returned an error in Lion and is crashing now in ML. That crash is a bug in CG, but it's exposed by a bug in your code.
--Jeremy
On 2012-08-27 18:46, doh123 wrote:
I *think* this is all i did to get it working... but I haven't tested this. I believe its all the changes I did to get the toggle working on 10.5 - 10.7 fine. I keep my stuff in patch files anyways, but all of this wasn't in the same one so I had to go through and find all the right parts, but If I got it right, it adds CMD+Opt+A toggle back into fullscreen, just something changed with 10.8, and I think its something actually with the actual capturing the display, but I may be wrong... or it may add some other issues I've never run in to... because I'm not sure why this was all set to disabled in the first place.
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev
On 2012-08-28 05:07, doh123 wrote:
sorry about the pointer... I was just typing stuff in for the patch and screwed that up... no I wasn't using a pointer there, it won't even compile :-)
for the good news, it seems like my inexperience caused the issue... the CFRetain seems to fix the issue as far as I can see, so I doubt its a problem in CoreGraphics. Its kind of funny the problem never happened on 10.5, 10.6 and 10.7... guess I got lucky before. I'm guessing from looking that stops garbage collection from trashing it... and maybe the garbage collection with 10.8 is more aggressive.
There is no garbage collection involved. It's just reference counting. Releasing the last time will free() the memory. You probably got lucky in the past by having your memory not written over by a new owner.
Thanks for the help... and hopefully you'll add it in to main XQuartz as its nice to be able to switch out and then back in to fullscreen captured mode easily.
No worries. I'm glad it was easy =)
On Aug 27, 2012, at 11:34 PM, Jeremy Huddleston Sequoia <jeremyhu@freedesktop.org> wrote:
On 2012-08-27 21:29, Jeremy Huddleston Sequoia wrote:
+QuartzModeInfoPtr *lastUsedMode; ... + QuartzRandRSetMode(pScreen, &lastUsedMode, TRUE); That won't work. You should see a warning from the compiler telling you that you're passing incompatible pointer types. Seeing that warning should be a huge red flag that something is wrong. You probably want this for lastUsedMode: QuartzModeInfo lastUsedMode; In reading the body of your email, it looks like you are doing this correctly, but your patch was just wrong, so I'll assume this is not the issue. It is possible that the mode is being released out from under you because you never retained your reference to it. Try doing something like this when you set your lastUsedMode: if (lastUsedMode.ref) CFRelease(lastUsedMode.ref); lastUsedMode = pQuartzScreen->currentMode; CFRetain(lastUsedMode.ref)
--- It also looks like you may be using lastUsedMode uninitialized. It was probably the case that CG just returned an error in Lion and is crashing now in ML. That crash is a bug in CG, but it's exposed by a bug in your code. --Jeremy On 2012-08-27 18:46, doh123 wrote:
I *think* this is all i did to get it working... but I haven't tested this. I believe its all the changes I did to get the toggle working on 10.5 - 10.7 fine. I keep my stuff in patch files anyways, but all of this wasn't in the same one so I had to go through and find all the right parts, but If I got it right, it adds CMD+Opt+A toggle back into fullscreen, just something changed with 10.8, and I think its something actually with the actual capturing the display, but I may be wrong... or it may add some other issues I've never run in to... because I'm not sure why this was all set to disabled in the first place. _______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org [1] http://lists.macosforge.org/mailman/listinfo/xquartz-dev [2] _______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org [3] http://lists.macosforge.org/mailman/listinfo/xquartz-dev [4]
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev
Links: ------ [1] mailto:Xquartz-dev@lists.macosforge.org [2] http://lists.macosforge.org/mailman/listinfo/xquartz-dev [3] mailto:Xquartz-dev@lists.macosforge.org [4] http://lists.macosforge.org/mailman/listinfo/xquartz-dev
participants (3)
-
doh123
-
Jeremy Huddleston Sequoia
-
Jeremy Huddleston Sequoia