de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
Author Message
 Re: getImage() causing hang on new Mac OS
PostPosted: Mon Jul 30, 2018 3:05 pm 
Offline
Site Admin
User avatar
The function getFile has a mandatory argument with the message (String), can you check if it works with something like this ?
Code:
def test = null
test = getFile("File ?")
sendImage(test)


The corresponding code (use of JFileChooser) is mostly identical to the one that allow you to choose a script (open, save), there's no problem with those windows (in the main frame and the editor frame) ?


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Tue Jul 31, 2018 2:07 am 
Offline
Veteran
User avatar
doti wrote:
The function getFile has a mandatory argument with the message (String), can you check if it works with something like this ?


Hi doti, even with the message argument, the result is the same. I ran it again with your example, and the script hangs. It's almost like the dialog is blocked or rendered invisibly, so the only option is to force quit. It's been like this for as long as I can remember, and is really noticeable in scripts like courtroom. Maybe it's an OS X security thing?


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Tue Sep 25, 2018 3:21 am 
Offline
Veteran
User avatar
@lifeinplymouth, did you ever find a work-around to this? I've got my finger on the upgrade button to Mojave, but would hate to lose the ability to develop for/use sexscripts. Hopefully there's a way forward...


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Sat Sep 29, 2018 3:05 pm 
Offline
Site Admin
User avatar
I could test and see some Freeze on Mac Os Sierra + Java 8.

Today's update of SexScripts may resolve the problems.

Nothig about the webcam (couldn't test), still desactivated through application.webcam.index=-1


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Sun Sep 30, 2018 6:32 am 
Offline
Veteran
User avatar
doti wrote:
I could test and see some Freeze on Mac Os Sierra + Java 8.

Today's update of SexScripts may resolve the problems.

Nothig about the webcam (couldn't test), still desactivated through application.webcam.index=-1


Hi @doti, I'd be happy to test, but am afraid of losing the webcam ability after upgrading. Can I just turn on application.webcam.index, or do you know that it will fail?


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Sun Sep 30, 2018 9:45 am 
Offline
Site Admin
User avatar
I don't know if the webcam will work. application.webcam.index=-1 is only usefull to avoid webcam hanging, but it only ignores it (replacing it by getFile())


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Tue Oct 02, 2018 4:05 pm 
Offline
Veteran
User avatar
I'll try it once I have a backup method of using a webcam through another computer. Unless anyone can report that Mojave already works for them...


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Wed Oct 31, 2018 2:18 pm 
Offline
Veteran
User avatar
Hi @doti, I've been afraid to upgrade my Mac after the issues @lifeinplymouth reported. However, I couldn't wait any longer and finally upgraded to 10.14.1 today. At the same time, I also upgraded to Java 8 build 191.

Unfortunately, I have the exact same error message as he did, and I no longer can use/develop webcam features in SexScripts. I tried with both the internal webcam, and an external USB webcam with the same results.

A bit of good news is that after a few minutes I am prompted to upload a picture, and that part seems to be working now. I'd be happy to help debug this. Let me know if there's anything you need me to try. Here is my error log:

Code:
[Thread-3] INFO com.github.sarxos.webcam.Webcam - WebcamDefaultDriver capture driver will be used
[atomic-processor-1] INFO com.github.sarxos.webcam.ds.cgt.WebcamOpenTask - Opening webcam HD Webcam C615 0x14200000046d082c
[frames-refresher-[0x14200000046d082c]] ERROR com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Timeout when requesting image!
[atomic-processor-1] WARN com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Null array pointer found instead of image
[atomic-processor-1] ERROR com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Images bytes buffer is null!
[frames-refresher-[0x14200000046d082c]] ERROR com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Timeout when requesting image!
[frames-refresher-[0x14200000046d082c]] ERROR com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Timeout when requesting image!
[frames-refresher-[0x14200000046d082c]] ERROR com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Timeout when requesting image!
[frames-refresher-[0x14200000046d082c]] ERROR com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Timeout when requesting image!
[frames-refresher-[0x14200000046d082c]] ERROR com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Timeout when requesting image!
[frames-refresher-[0x14200000046d082c]] ERROR com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Timeout when requesting image!
[frames-refresher-[0x14200000046d082c]] ERROR com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Timeout when requesting image!
[atomic-processor-1] INFO com.github.sarxos.webcam.ds.cgt.WebcamCloseTask - Closing HD Webcam C615 0x14200000046d082c


One thing new to the latest OS is that it has much higher privacy protections, and apps must get permission to use the camera. Maybe that's related? Though the OS seems to automatically prompt for that with other apps. Anyway, let me know if you have any idea.


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Thu Nov 01, 2018 11:41 am 
Offline
Site Admin
User avatar
I'll try to post a test program in a few days, probably is is related to the permission system.


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Thu Nov 01, 2018 1:25 pm 
Offline
Veteran
User avatar
Thanks @doti! I also tried the nightly build of sarxos.webcam, but it seems I need to update the jar, and I don't have the JDE installed at the moment.

One other note: older Mac apps that are definitely not updated for Mojave still seem to work with the webcam. The system just asks first before allowing access. So I'd be surprised if you had to code any kind of permission request.

It's also completely possible that there's a Java setting that needs to be configured, as I don't see anyone else outside of SexScripts complaining about Mojave and sarxos.

Let me know if/when you need something tested.


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Sat Nov 03, 2018 2:05 pm 
Offline
Veteran
User avatar
Good News! After many hours of testing and debugging today, I finally got SexScripts working on macOS Mojave! At the same time, I found that getFile() is still problematic. Here's some details of what I found.

The webcam error, as I suspected, was a security precaution. It seems that something is blocking the "Jar Launcher" application from prompting for webcam permission. Here's the exact error I found in the system logs:

Code:
Policy disallows prompt for RESP:{ID: com.apple.JarLauncher, PID[20268], auid: 501, euid: 501, responsible path: '/System/Library/CoreServices/Jar Launcher.app/Contents/MacOS/Jar Launcher', binary path: '/System/Library/CoreServices/Jar Launcher.app/Contents/MacOS/Jar Launcher'}, ACC:{ID: net.java.openjdk.cmd, PID[20269], auid: 501, euid: 501, binary path: '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java'}, REQ:{ID: com.apple.tccd, PID[252], auid: 0, euid: 0, binary path: '/System/Library/PrivateFrameworks/TCC.framework/Versions/A/Resources/tccd'}; access to kTCCServiceCamera denied


There are two work-arounds, but both are basically the same thing: run SexScripts from the command line in terminal, or create an Automator program, so that you can just double click on an icon as usual.

Here's the terminal command:

Code:
java -jar sexscripts.jar


For automator (which is what I'm using) add a "Run Shell Script" action with the following code:

Code:
cd sexscripts
java -jar sexscripts.jar


(You'll want to include the full path to the sexscripts home directory.)

The first time you run a script that uses the webcam, you'll be prompted to allow access. After that, everything works as before. Whew!

However, in the process of researching all this, I also found that getFile() doesn't work reliably. Nor can I find any error messages or logs related to what's happening--it just stops. In previous versions of macOS, getFile() didn't work at all. It still doesn't really work if the webcam is missing. However, if you explicitly call it, it works the first time. After that, it's hit or miss.

It *seems* to be more reliable if you wait a while between calls. However, adding waits and buttons didn't really seem to have an effect. Perhaps the wait needs to be longer, or perhaps I just got lucky a few times, who knows.

It would be nice to have getFile() working in the even a webcam isn't available, and also for scripts like Courtroom that require the occasional file upload.

Anyway, if there are other Mac users waiting to upgrade, it looks like SexScripts is usable with a webcam again now.


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Sun Nov 04, 2018 2:42 pm 
Offline
Site Admin
User avatar
Webcam :
Does it works if you rename "sexcripts.sh" to "sexscripts.command" and make it runnable ? Mainly, I'd like to provide a launcher like sexcripts.sh but for MacOS (and if possible, inside, avoiding having a line "cd xxxx" thats depends on the user.

getFile()
Was it the same thing on previous MacOS versions ? (the last update, SexScripts 1.28.3, was released to correct this problem)


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Mon Nov 05, 2018 12:59 pm 
Offline
Veteran
User avatar
doti wrote:
Webcam :
Does it works if you rename "sexcripts.sh" to "sexscripts.command" and make it runnable ? Mainly, I'd like to provide a launcher like sexcripts.sh but for MacOS (and if possible, inside, avoiding having a line "cd xxxx" thats depends on the user.


No, command doesn't work. I would think an Automator program would be the easiest way. I can make a universal one for you if needed.

doti wrote:
getFile()
Was it the same thing on previous MacOS versions ? (the last update, SexScripts 1.28.3, was released to correct this problem)

It's definitely better than before, but still fails fairly regularly. I spent quite a bit of time trying to figure out if delays, user input, etc could stabilize it, but no luck. Also no error messages as a direct result of the problem. There were some String/URI messages early on, but I tried casting and overloading in every possible combination with no luck...


Top
 Profile Send private message 
 
 Re: getImage() causing hang on new Mac OS
PostPosted: Mon Nov 05, 2018 1:08 pm 
Offline
Site Admin
User avatar
ptdw wrote:
doti wrote:
Webcam :
Does it works if you rename "sexcripts.sh" to "sexscripts.command" and make it runnable ? Mainly, I'd like to provide a launcher like sexcripts.sh but for MacOS (and if possible, inside, avoiding having a line "cd xxxx" thats depends on the user.


No, command doesn't work. I would think an Automator program would be the easiest way. I can make a universal one for you if needed.


Well it would be great, I must say I don't really understand how Automator works, if it can save an automation task as an universal distributable file.


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010, 2015
This website uses session cookies only.