I have Raspberry Pi 4 (aarch64 Cortex-A72) with OS Ubuntu 22.04 LTS 64-bit installed. I try read frame from webcam Intel RealSense ID Solution F455.
buffer V4lNode::Read()
{
buffer res;
struct v4l2_buffer buf = {0};
struct timeval tv = {0};
tv.tv_sec = 0; // max time to wait for next frame
tv.tv_usec =100;
buf.type = _type;
buf.memory = V4L2_MEMORY_MMAP;
buf.index = 0;
fd_set fds;
FD_ZERO(&fds);
FD_SET(_fd, &fds);
ThrowIfFailed("wait for frame", select(_fd, &fds, NULL, NULL, &tv));
if (ioctl(_fd, VIDIOC_DQBUF, &buf) == FAILED_V4L){ // dequeue frame from buffer.
std::cout << "V4lNode failed dequeue frame from buffer: " << strerror(errno) << std::endl;
return res; //returns zero-length buffer
}
res = _buffers[buf.index];
res.size = buf.bytesused;
buf.type = _type;
buf.memory = V4L2_MEMORY_MMAP;
ThrowIfFailed("qbuffer", ioctl(_fd, VIDIOC_QBUF, &buf)); // queue next frame
return res;
}
When I run this code:
if (ioctl(fd, VIDIOC_DQBUF, &buf) < 0) {
std::cout << "V4lNode failed dequeue frame from buffer: " << strerror(errno) << std::endl;
}
I get output result:
V4lNode failed dequeue frame from buffer: Resource temporarily unavailable
But device opened success:
fd = open(path.c_str(), O_RDWR | O_NONBLOCK, 0);
std::cout << "V4lNode open files discription: " << strerror(errno) << std::endl;
Output result:
V4lNode open files discription: Success
When I run this command in terminal:
pi#pi:~$ v4l2-compliance
v4l2-compliance 1.22.1, 64 bits, 64-bit time_t
Compliance test for uvcvideo device /dev/video0:
I get error:
Control ioctls (Input 0):
fail: v4l2-test-controls.cpp(246): missing control class for class 00980000
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
Full tets output:
pi#pi:~$ v4l2-compliance
v4l2-compliance 1.22.1, 64 bits, 64-bit time_t
Compliance test for uvcvideo device /dev/video0:
Driver Info:
Driver name : uvcvideo
Card type : Intel F450
Bus info : usb-0000:01:00.0-1.1
Driver version : 5.15.39
Capabilities : 0x84a00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : uvcvideo
Model : Intel F450
Serial : 00.00.01
Bus info : usb-0000:01:00.0-1.1
Media version : 5.15.39
Hardware revision: 0x00000100 (256)
Driver version : 5.15.39
Interface Info:
ID : 0x03000002
Type : V4L Video
Entity Info:
ID : 0x00000001 (1)
Name : Intel F450
Function : V4L2 I/O
Flags : default
Pad 0x01000007 : 0: Sink
Link 0x02000010: from remote pad 0x100000a of entity 'Extension 3' (Video Pixel Formatter): Data, Enabled, Immutable
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
test invalid ioctls: OK
Allow for multiple opens:
test second /dev/video0 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls (Input 0):
fail: v4l2-test-controls.cpp(246): missing control class for class 00980000
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
warn: v4l2-test-controls.cpp(757): g_ext_ctrls(0) invalid error_idx 0
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 1 Private Controls: 0
Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
warn: v4l2-test-formats.cpp(1036): Could not set fmt2
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK (Not Supported)
Total for uvcvideo device /dev/video0: 46, Succeeded: 45, Failed: 1, Warnings: 2
Confuses a lot notes (Not Supported).
UPD:
Outputs formats:
pi#pi:~$ v4l2-ctl --list-formats
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'YUYV' (YUYV 4:2:2)
Output dmesg errors:
[ 0.823576] zswap: compressor zstd not available, using default lzo
[ 0.829609] zswap: zpool z3fold not available, using default zbud
[ 102.238315] uvcvideo 1-1.1:1.1: Failed to resubmit video URB (-1).
[ 102.238626] uvcvideo 1-1.1:1.1: Failed to resubmit video URB (-1).
[ 5822.239686] usb 1-1.1: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2).
[ 5822.249854] usb 1-1.1: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2).
[ 5822.259913] usb 1-1.1: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2).
[ 5822.269949] usb 1-1.1: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2).
[ 5822.280057] usb 1-1.1: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2).
[ 5822.290139] usb 1-1.1: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2).
[ 5822.391565] usb 1-1.1: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
[ 5822.401637] usb 1-1.1: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
[ 5822.411679] usb 1-1.1: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
[ 5822.421697] usb 1-1.1: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
[ 5822.431779] usb 1-1.1: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
[ 5822.441885] usb 1-1.1: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
[ 5822.532650] usb 1-1.1: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2).
[ 5822.563375] usb 1-1.1: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
[ 5822.622056] usb 1-1.1: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2).
[ 5823.168241] usb 1-1.1: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2).
[ 5823.270367] usb 1-1.1: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2).
I am tried this solution Recording usb cam on raspberry pi with ffmpeg - usb troubleshooting - don't worked
Ubuntu 22 is not supported by realsense yet (setember 7, 2022) acconding to
https://github.com/IntelRealSense/librealsense/issues/10439
I was able to run it on Ubuntu 22 only via docker with this Dockerfile:
FROM python:3.7.4
WORKDIR /home
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Minsk
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install -y \
sudo \
cmake \
git \
curl \
libopencv-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libgtk2.0-dev \
python-numpy \
python-pycurl \
keyboard-configuration \
libgl1-mesa-dev \
libglu1-mesa-dev \
libusb-1.0-0-dev \
libglfw3-dev \
freeglut3 \
at \
freeglut3-dev \
nano \
curl \
libglfw3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
at \
udev \
linux-headers-* \
libusb-1.0-0-dev
#update cmake
RUN sudo apt remove cmake -y && \
wget https://github.com/Kitware/CMake/releases/download/v3.23.0/cmake-3.23.0.tar.gz && \
tar -xf cmake-3.23.0.tar.gz && \
cd cmake-3.23.0 && \
./configure && \
make -j$(nproc) && \
sudo make install -j$(nproc)
#install realsense
RUN git clone https://github.com/IntelRealSense/librealsense && \
cd librealsense && \
git checkout v2.51.1 && \
mkdir -p /etc/udev/rules.d && \
mkdir build && cd build && \
cmake .. && \
make install -j$(nproc) && \
make -j$(nproc)
built as:
docker build -t realsense .
if you need any GUI to be used, run this before running the container:
export DISPLAY=:1
xhost +
(maybe you will need to use DISPLAY=:0 depending on your display index)
and run the container with:
sudo docker run -it --privileged -v /etc/udev/*:/etc/udev/* \
-v /dev/bus/usb:/dev/bus/usb \
-v /dev/:/dev/ \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=$DISPLAY -h $HOSTNAME -v $HOME/.Xauthority:/home/.Xauthority realsense:latest bash
I am using Xcode's test plans with the option 'Retry until failure' and some repetitions. When a test fails but then succeeds, it will still show up in the failed test section when another test is actually consistently failing. This is my code:
import XCTest
class SomeTests: XCTestCase {
func testExampleA() throws {
let random = Int.random(in: 0...10)
// Will always fail
if random != -1 {
XCTFail("fail")
}
}
func testExampleB() throws {
let random = Int.random(in: 0...3)
if random != 1 {
XCTFail("fail")
}
}
}
And I run the test command:
xcodebuild test -project uitest.xcodeproj -scheme unittest -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.5' -only-testing SomeTests
This is the output:
/Users/jaspervisser/Desktop/uitest/dfsdfsff/dfsdfsff.swift:16: error: -[dfsdfsff.SomeTests testExampleA] : failed - fail
Test Case '-[dfsdfsff.SomeTests testExampleA]' failed (0.005 seconds).
Test Case '-[dfsdfsff.SomeTests testExampleA]' started (Iteration 20 of 20).
/Users/jaspervisser/Desktop/uitest/dfsdfsff/dfsdfsff.swift:16: error: -[dfsdfsff.SomeTests testExampleA] : failed - fail
Test Case '-[dfsdfsff.SomeTests testExampleA]' failed (0.005 seconds).
Test Case '-[dfsdfsff.SomeTests testExampleB]' started (Iteration 1 of 20).
/Users/jaspervisser/Desktop/uitest/dfsdfsff/dfsdfsff.swift:24: error: -[dfsdfsff.SomeTests testExampleB] : failed - fail
Test Case '-[dfsdfsff.SomeTests testExampleB]' failed (0.005 seconds).
Test Case '-[dfsdfsff.SomeTests testExampleB]' started (Iteration 2 of 20).
/Users/jaspervisser/Desktop/uitest/dfsdfsff/dfsdfsff.swift:24: error: -[dfsdfsff.SomeTests testExampleB] : failed - fail
Test Case '-[dfsdfsff.SomeTests testExampleB]' failed (0.005 seconds).
Test Case '-[dfsdfsff.SomeTests testExampleB]' started (Iteration 3 of 20).
Test Case '-[dfsdfsff.SomeTests testExampleB]' passed (0.019 seconds).
Test Suite 'SomeTests' failed at 2022-07-04 17:55:03.367.
Executed 23 tests, with 22 failures (0 unexpected) in 0.184 (0.202) seconds
Test Suite 'dfsdfsff.xctest' failed at 2022-07-04 17:55:03.373.
Executed 23 tests, with 22 failures (0 unexpected) in 0.184 (0.209) seconds
Test Suite 'All tests' failed at 2022-07-04 17:55:03.377.
Executed 23 tests, with 22 failures (0 unexpected) in 0.184 (0.217) seconds
2022-07-04 17:55:28.752 xcodebuild[77552:4967879] [MT] IDETestOperationsObserverDebug: 31.789 elapsed -- Testing started completed.
2022-07-04 17:55:28.752 xcodebuild[77552:4967879] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2022-07-04 17:55:28.752 xcodebuild[77552:4967879] [MT] IDETestOperationsObserverDebug: 31.789 sec, +31.789 sec -- end
Test session results, code coverage, and logs:
/Users/jaspervisser/Library/Developer/Xcode/DerivedData/uitest-dthpivieuzigdfgvtdrzgailclme/Logs/Test/Test-unittest-2022.07.04_17-54-56-+0200.xcresult
Failing tests:
dfsdfsff:
SomeTests.testExampleA()
SomeTests.testExampleB()
** TEST FAILED **
You can see that testExampleB has succeeded, but it still pops up in the failing tests section. It takes me so much time in the 'real' CI to find actual consistently failing tests, I don't care about tests that fails and succeeds, I just need to kind consistently failing tests. Is there a way to identify them? Can I filter out tests that succeeds?
I run pytest via PyCharm, and execute a single test:
/home/guettli/projects/lala-env/bin/python /snap/pycharm-professional/230/plugins/python/helpers/pycharm/_jb_pytest_runner.py --target test_models.py::test_address_is_complete
Testing started at 11:53 ...
Launching pytest with arguments test_models.py::test_address_is_complete in /home/guettli/projects/lala-env/src/lala/lala/tests
============================= test session starts ==============================
platform linux -- Python 3.8.5, pytest-6.2.0, py-1.10.0, pluggy-0.13.1 -- /home/guettli/projects/lala-env/bin/python
cachedir: .pytest_cache
django: settings: mysite.settings (from ini)
rootdir: /home/guettli/projects/lala-env/src/lala, configfile: pytest.ini
plugins: django-4.1.0
collecting ... collected 1 item
test_models.py::test_address_is_complete Creating test database for alias 'default' ('test_lala')...
Operations to perform:
Synchronize unmigrated apps: allauth, colorfield, debug_toolbar, google, messages, staticfiles
Apply all migrations: account, admin, auth, contenttypes, lala, sessions, sites, socialaccount
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying account.0001_initial... OK
Applying account.0002_email_max_length... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying lala.0001_initial... OK
Applying lala.0002_offer_price... OK
Applying lala.0003_order_amount... OK
Applying lala.0004_auto_20201215_2043... OK
Applying lala.0005_auto_20201229_2148... OK
Applying lala.0006_auto_20201229_2150... OK
Applying lala.0007_auto_20210117_1632... OK
Applying lala.0008_auto_20210117_1632... OK
Applying lala.0009_add_address... OK
Applying lala.0010_auto_20210117_2102... OK
Applying lala.0011_auto_20210119_1909... OK
Applying lala.0012_allergen_short... OK
Applying lala.0013_auto_20210119_1914... OK
Applying lala.0014_auto_20210120_0734... OK
Applying lala.0015_auto_20210120_0752... OK
Applying lala.0016_auto_20210120_1923... OK
Applying lala.0017_allergenuser... OK
Applying lala.0018_address_place... OK
Applying lala.0019_auto_20210126_2027... OK
Applying lala.0020_auto_20210126_2027... OK
Applying lala.0021_recurringoffer_days... OK
Applying lala.0022_auto_20210126_2129... OK
Applying lala.0023_auto_20210201_2056... OK
Applying lala.0024_globalconfig_navbar_title... OK
Applying lala.0025_activationstate... OK
Applying sessions.0001_initial... OK
Applying sites.0001_initial... OK
Applying sites.0002_alter_domain_unique... OK
Applying socialaccount.0001_initial... OK
Applying socialaccount.0002_token_max_lengths... OK
Applying socialaccount.0003_extra_data_default_dict... OK
Destroying test database for alias 'default' ('test_lala')...
FAILED
lala/tests/test_models.py:18 (test_address_is_complete)
user = <User: Dr. Foo>
def test_address_is_complete(user):
address = user.address
> assert address.is_complete
E assert False
E + where False = <Address: Address object (1)>.is_complete
test_models.py:21: AssertionError
Assertion failed
Assertion failed
=================================== FAILURES ===================================
___________________________ test_address_is_complete ___________________________
user = <User: Dr. Foo>
def test_address_is_complete(user):
address = user.address
> assert address.is_complete
E assert False
E + where False = <Address: Address object (1)>.is_complete
test_models.py:21: AssertionError
=========================== short test summary info ============================
FAILED test_models.py::test_address_is_complete - assert False
============================== 1 failed in 2.88s ===============================
Process finished with exit code 1
Assertion failed
Assertion failed
Why does the exception gets displayed twice?
JavaMail newbie here. I'm trying to figure out what's wrong with a Javamail client that's embeded in a very large system. Sorry I do not have a short, self-contained example, but I'm hoping that someone might be able to give me some tips on how to go about debugging this issue.
It's JavaMail 1.4.3 in Java 7, running on Windows 7. The email server is on a Linux box. The intent of the code is to read all emails in an inbox, delete and expunge them, do some work on the emails, pause for a while, then repeat, looping forever. The problem is that if there are already emails in the inbox when this program starts and the JavaMail client code executes, it does not retrieve them. However, if I send emails to the inbox once the code is running, it retrieves them just fine.
The code gets the inbox with Store.getFolder("INBOX"), opens it with Folder.open(Folder.READ_WRITE) and does a Folder.getMessages(). The getMessages() call always returns no messages when first starting up, but does return the messages sent after the program's been started.
I'm using Pine to verify that the inbox does or does not contains messages, but am not opening the messages in Pine, so they should still be new. And if I use Pine to look at the inbox after running this code, it still contains old messages that were sent before the program was launched, but not any that were sent to it while the program was running (they've been successfully read, deleted and expunged).
The code should also be reading messages that are already in the inbox when it starts. I set mail.debug=true and that output follows. Again, any tips for how to dig into this would be greatly appreciated. Thanks.
// first attempt to read mail when program starts
DEBUG: JavaMail version 1.4.3
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smt
ps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSP
ORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STOR
E,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,
pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,
com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.m
ail.pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,S
un Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=jav
ax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STO
RE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3
SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystem
s, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems,
Inc]
DEBUG: mail.imap.fetchsize: 16384
DEBUG: mail.imap.statuscachetimeout: 1000
DEBUG: mail.imap.appendbuffersize: -1
DEBUG: mail.imap.minidletime: 10
DEBUG: trying to connect to host "10.128.200.85", port 143, isSSL false
* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS STARTTLS AUTH=LOGIN] pristine.ame.xx.com IMAP4rev1 2001.315rh at Mon, 30 Dec 2013 11:15:26 -0500 (EST)
IMAP DEBUG: AUTH: LOGIN
DEBUG: protocolConnect login, host=10.128.200.85, user=venuswmpublic, password=<non-null>
A0 AUTHENTICATE LOGIN
+ VXNlciBOYW1lAA==
dmVudXN3bXB1YmxpYw==
+ UGFzc3dvcmQA
d2VibTEyMzQ=
A0 OK [CAPABILITY IMAP4REV1 IDLE NAMESPACE MAILBOX-REFERRALS SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] User venuswmpublic authenticated
A1 LIST "" INBOX
* LIST (\NoInferiors) NIL INBOX
A1 OK LIST completed
DEBUG: connection available -- size: 1
A2 SELECT INBOX
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1] UID validity status
* OK [UIDNEXT 1] Predicted next UID
* FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS ()] Permanent flags
A2 OK [READ-WRITE] SELECT completed
A3 EXPUNGE
A3 OK EXPUNGE completed
Monitoring incoming email...
* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS STARTTLS AUTH=LOGIN] pristine.ame.xx.com IMAP4rev1 2001.315rh at
Mon, 30 Dec 2013 11:15:38 -0500 (EST)
IMAP DEBUG: AUTH: LOGIN
A0 AUTHENTICATE LOGIN
+ VXNlciBOYW1lAA==
dmVudXN3bXB1YmxpYw==
+ UGFzc3dvcmQA
d2VibTEyMzQ=
A0 OK [CAPABILITY IMAP4REV1 IDLE NAMESPACE MAILBOX-REFERRALS SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] User venuswmpublic authenticated
IMAP DEBUG: IMAPProtocol noop
A1 NOOP
A1 OK NOOP completed
IMAP DEBUG: IMAPProtocol noop
A4 NOOP
A4 OK NOOP completed
A5 EXPUNGE
A5 OK EXPUNGE completed
A6 EXPUNGE
A6 OK EXPUNGE completed
DEBUG: pool is full, not adding an Authenticated connection
A7 CLOSE
A7 OK CLOSE completed
A8 LOGOUT
* BYE pristine.ame.xx.com IMAP4rev1 server terminating connection
A8 OK LOGOUT completed
A2 LOGOUT
* BYE pristine.ame.xx.com IMAP4rev1 server terminating connection
A2 OK LOGOUT completed
DEBUG: IMAPStore connection dead
DEBUG: IMAPStore cleanup, force false
DEBUG: IMAPStore cleanup done
// and a bunch of these...
Monitoring incoming email...
IMAP DEBUG: IMAPProtocol noop
A33 NOOP
A33 OK NOOP completed
IMAP DEBUG: IMAPProtocol noop
A77 NOOP
A77 OK NOOP completed
A78 EXPUNGE
A78 OK No messages deleted, so no update needed
Monitoring incoming email...
IMAP DEBUG: IMAPProtocol noop
A34 NOOP
A34 OK NOOP completed
IMAP DEBUG: IMAPProtocol noop
A79 NOOP
A79 OK NOOP completed
A80 EXPUNGE
A80 OK No messages deleted, so no update needed
etc...
------------------------------------
// If I send in an email while the program is running, it picks it up, but still leaves the previous ones unread in the inbox.
Monitoring incoming email...
IMAP DEBUG: IMAPProtocol noop
A4 NOOP
A4 OK NOOP completed
IMAP DEBUG: IMAPProtocol noop
A10 NOOP
* 1 EXISTS
* 1 RECENT
* OK [UIDVALIDITY 1388420519] UID validity status
* OK [UIDNEXT 2] Predicted next UID
* FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS (\* \Answered \Flagged \Deleted \Draft \Seen)] Permanent flags
* OK [READ-WRITE] Mailbox status
* OK [UNSEEN 1] first unseen message in /var/spool/mail/venuswmpublic
A10 OK NOOP completed
A11 EXPUNGE
A11 OK Mailbox checkpointed, but no messages expunged
A12 STORE 1 +FLAGS (\Flagged)
* 1 FETCH (FLAGS (\Recent \Flagged))
A12 OK STORE completed
A13 FETCH 1 (ENVELOPE INTERNALDATE RFC822.SIZE)
* 1 FETCH (ENVELOPE ("Mon, 30 Dec 2013 19:43:42 +0000" "test.testService"
* (("LName, FName" NIL "FName.LName" "Company.com")) (("LName, FName" NIL "FName.LName"
"Company.com")) (("LName, FName" NIL "FName.LName"
"Company.com")) (("venuswmpublic#pristine.ame.xx.com" NIL "venuswmpublic" "pristine.ame.xx.com")) NIL NI
L NIL "<DAF6C79D86A80C49A9F66B898B2821A327FD50E6#hqmbx6.eur.ad.sag>") INTERNALDATE "30-Dec-2013 11:21:51 -0500" RFC822.S
IZE 3774)
A13 OK FETCH completed
A14 FETCH 1 (BODYSTRUCTURE)
* 1 FETCH (BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "QUOTED-PRINTABLE" 15 1 NIL NIL NIL
)("TEXT" "HTML" ("CHARSET" "us-ascii") NIL NIL "QUOTED-PRINTABLE" 1899 60 NIL NIL NIL) "ALTERNATIVE" ("BOUNDARY" "_000_D
AF6C79D86A80C49A9F66B898B2821A327FD50E6hqmbx6euradsag_") NIL "EN-US"))
A14 OK FETCH completed
A15 FETCH 1 (BODY[1]<0.15>)
* 1 FETCH (BODY[1]<0> {15}
a=3D111111111
)
* 1 FETCH (FLAGS (\Recent \Seen \Flagged))
A15 OK FETCH completed
A16 FETCH 1 (BODY[1]<0.15>)
* 1 FETCH (BODY[1]<0> {15}
a=3D111111111
)
A16 OK FETCH completed
A17 FETCH 1 (BODY[2]<0.1899>)
* 1 FETCH (BODY[2]<0> {1899}
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
#font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
#font-face
{font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Trebuchet MS","sans-serif";
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
#page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Tr=
ebuchet MS","sans-serif"">a=3D111111111<o:p></o:p></span></p=
>
</div>
</body>
</html>
)
A17 OK FETCH completed
A18 FETCH 1 (BODY[1]<0.15>)
* 1 FETCH (BODY[1]<0> {15}
a=3D111111111
)
A18 OK FETCH completed
DEBUG: JavaMail version 1.4.3
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smt
ps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSP
ORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STOR
E,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,
pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,
com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.m
ail.pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,S
un Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=jav
ax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STO
RE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3
SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystem
s, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
2013-12-30 14:43:53 EST [ISS.0015.0005D] Invoking service test.testService.
2013-12-30 14:43:53 EST [ISP.0090.0001C] ---
2013-12-30 14:43:53 EST [ISP.0090.0001C] --- test.testService EXECUTED !!!
2013-12-30 14:43:53 EST [ISP.0090.0001C] ---
A19 STORE 1 +FLAGS (\Deleted)
* 1 FETCH (FLAGS (\Recent \Seen \Deleted \Flagged))
A19 OK STORE completed
A20 EXPUNGE
* 1 EXPUNGE
* 0 EXISTS
* 0 RECENT
A20 OK Expunged 1 messages
Your server is telling JavaMail that there are no messages in the Inbox ("0 EXISTS") when it first opens it, then a message appears ("1 EXISTS"), which your program processes, deletes, and expunges. That all looks perfectly normal.
If you think there are other messages in the Inbox, the server disagrees. Perhaps you have some messages cached in your Pine client? Perhaps you've set Pine up to work similarly to how most POP3 clients work - download messages from the server, cache them locally, and delete them from the server?
Here I have a powerpoint 2010 presentation. On one slide there is an embedded Windows media Player OCX Control. As a simple GUI, I placed 3 buttons labeled Play, Pause, Stop on the same slide.
Using Perl's Win32::OLE module, I want to test if the click event on "Play" plays the file in the embedded windows media player.
Raising the Click event with the mouse, it does.
Using code below, it does not work. Why?
note "Slide $i: " . $slide->{Name};
# switch to "full-screen presentation mode"
PowerpointHelpers::launch_slideshow_from_slide($ole->ActivePresentation, $i);
sleep 3;
#does not work
$btnplay->{OLEFormat}->Object()->btnPlay_Click();
sleep 3;
# return to slide edit-mode
# PowerpointHelpers::exit_show($ole);
This is the VBA procedure that is supposed to run:
Public Sub btnPlay_Click()
Init
PlayVideo (Player.URL)
End Sub
As you can see this just calls two custom functions that play an avi file. It does work correctly in interactive use. but not via VBA automation .
Meanwhile, I have tried quite a few variations of the line
$btnplay->{OLEFormat}->Object()->btnPlay_Click();
but none work.
Here is a dump of the $btnplay object:
OLE object's properties:
Accelerator .............................
AutoSize ................................ 0
BackColor ............................... 8421504
BackStyle ............................... 1
Caption ................................. Video abspielen
Enabled ................................. 1
Font .................................... [IFont]
ForeColor ............................... 0
Height .................................. 28.375
Left .................................... 18.75
Locked .................................. 0
MouseIcon ............................... <undef>
MousePointer ............................ 0
Name .................................... btnPlay
Picture ................................. <undef>
PicturePosition ......................... 7
TakeFocusOnClick ........................ 1
Top ..................................... 382.875
Visible ................................. 1
Width ................................... 124.75
WordWrap ................................ 0
ZOrderPosition .......................... 9
This works!
my $s = $ole->ActivePresentation->SlideShowWindow->View->Slide;
$s->Application->Run('btnPlay_Click', '');
This does not work, it is here for completeness. I was referring to this code in the comments.
This is my perl code, where I attempt to call the btnPlay_Click event handler directly:
my $s = $ole->SlideShowWindows(1)->View->Slide;
PowerpointHelpers::_dump_ole_obj($s, 1);
Win32::OLE->Option(Warn => 3);
$s->btnPlay_Click(); ### DOES NOT WORK (for me)
Win32::OLE->Option(Warn => 0);
Error Output of btnPlay_Click();
Win32::OLE(0.1709) error 0x80020003: "Member not found"
in METHOD/PROPERTYGET "" at 06-mediaplayer--button-clicks-ok.t line 127
slide object: Output of _dump_ole_obj
OLE object's properties:
Application ............................. [_Application]
Background .............................. [ShapeRange]
BackgroundStyle ......................... 0
ColorScheme ............................. [ColorScheme]
Comments ................................ [Comments]
CustomLayout ............................ [CustomLayout]
CustomerData ............................ [CustomerData]
Design .................................. [Design]
DisplayMasterShapes ..................... -1
FollowMasterBackground .................. 0
HasNotesPage ............................ -1
HeadersFooters .......................... [HeadersFooters]
Hyperlinks .............................. [Hyperlinks]
Layout .................................. 1
Master .................................. [_Master]
Name .................................... Slide7
NotesPage ............................... [SlideRange]
Parent .................................. [_Presentation]
PrintSteps .............................. 1
Shapes .................................. [Shapes]
SlideID ................................. 262
SlideIndex .............................. 24
SlideNumber ............................. 24
SlideShowTransition ..................... [SlideShowTransition]
Tags .................................... [Tags]
ThemeColorScheme ........................ [ThemeColorScheme]
TimeLine ................................ [TimeLine]
sectionIndex ............................ 1
More Funcnames:
Cut()
Duplicate()
Export()
GetTypeInfo()
Invoke()
MoveToSectionStart()
QueryInterface()
Release()
SectionNumber()