I am developing a data syncing script for a project using python 3.3.2 and pyodbc. The data that I need is coming from a sql server 2008 instance, but so far I have not been able to make any queries successfully.
I am able to establish a connection to the database server with pyodbc:
cnxn = pyodbc.connect('DSN=<DSN>; UID=<uid>; PWD=<pwd>')
cursor = cnxn.cursor()
The freetds and iodbc logs show a successful connection to the database server (logs included blow). However, when I try to execute a query:
cursor.execute('select * from <TABLE>')
I get this error:
pyodbc.ProgrammingError: ('42000', "[42000] [FreeTDS][SQL Server]Incorrect syntax near '�'. (102) (SQLExecDirectW)")
The iodbc and FreeTDS logs show that '??????????????????????????????' is being passed as the query. This looks to me like a unicode/encoding problem. The same pyodbc code works in a python 2.7 using the same versions of iODBC and FreeTDS, so I think this problem has something to do with the interaction between python 3.3.2 and pyodbc.
I found this bug report, but have yet to find any sort of fix or workaround. Any help would be greatly appreciated. I've been trying to figure this one out for the past two days without much luck.
If there is any information that I have not included that would be helpful, let me know, I'll provide what I can. I do not have access to the SQL Server logs.
Environment:
Mac OSX 10.8.5
Python 3.3.2
pyodbc 3.0.7
iODBC 3.52.6 (I can't figure out how to convince pyodbc to use unixodbc on Mac)
FreeTDS 0.91
iODBC log:
[000000.000070]
python 7FFF7876C180 ENTER SQLAllocHandle
SQLSMALLINT 1 (SQL_HANDLE_ENV)
SQLHANDLE 0x0 (SQL_NULL_HANDLE)
SQLHANDLE * 0x1007b5970
[000000.000091]
python 7FFF7876C180 EXIT SQLAllocHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 1 (SQL_HANDLE_ENV)
SQLHANDLE 0x0 (SQL_NULL_HANDLE)
SQLHANDLE * 0x1007b5970 (0x10049e350)
[000000.000110]
python 7FFF7876C180 ENTER SQLSetEnvAttr
SQLHENV 0x10049e350
SQLINTEGER 200 (SQL_ATTR_ODBC_VERSION)
SQLPOINTER 0x3
SQLINTEGER * 4
[000000.000508]
python 7FFF7876C180 EXIT SQLSetEnvAttr with return code 0 (SQL_SUCCESS)
SQLHENV 0x10049e350
SQLINTEGER 200 (SQL_ATTR_ODBC_VERSION)
SQLPOINTER 0x3
SQLINTEGER * 4
[000000.000527]
python 7FFF7876C180 ENTER SQLAllocHandle
SQLSMALLINT 2 (SQL_HANDLE_DBC)
SQLHANDLE 0x10049e350
SQLHANDLE * 0x7fff5fbff080
[000000.000545]
python 7FFF7876C180 EXIT SQLAllocHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 2 (SQL_HANDLE_DBC)
SQLHANDLE 0x10049e350
SQLHANDLE * 0x7fff5fbff080 (0x1004c3bf0)
[000000.000569]
python 7FFF7876C180 ENTER SQLDriverConnectW
SQLHDBC 0x1004c3bf0
SQLPOINTER 0x0
SQLWCHAR * 0x1004c3cf0
| ??????????????????????????????????? |
SQLSMALLINT 39
SQLWCHAR * 0x0
SQLSMALLINT 0
SQLSMALLINT * 0x0
SQLUSMALLINT 0 (SQL_DRIVER_NOPROMPT)
[000000.000709]
python 7FFF7876C180 EXIT SQLDriverConnectW with return code -1 (SQL_ERROR)
SQLHDBC 0x1004c3bf0
SQLPOINTER 0x0
SQLWCHAR * 0x1004c3cf0
SQLSMALLINT 39
SQLWCHAR * 0x0
SQLSMALLINT 0
SQLSMALLINT * 0x0
SQLUSMALLINT 0 (SQL_DRIVER_NOPROMPT)
[000000.000740]
python 7FFF7876C180 ENTER SQLDriverConnect
SQLHDBC 0x1004c3bf0
SQLPOINTER 0x0
SQLCHAR * 0x7fff5fbff0a0
| DSN=<dsn>;UID=<uid>t;PWD=<pwd> |
SQLSMALLINT -3 (SQL_NTS)
SQLCHAR * 0x0
SQLSMALLINT 0
SQLSMALLINT * 0x0
SQLUSMALLINT 0 (SQL_DRIVER_NOPROMPT)
[000000.071429]
python 7FFF7876C180 EXIT SQLDriverConnect with return code 0 (SQL_SUCCESS)
SQLHDBC 0x1004c3bf0
SQLPOINTER 0x0
SQLCHAR * 0x7fff5fbff0a0
SQLSMALLINT -3 (SQL_NTS)
SQLCHAR * 0x0
SQLSMALLINT 0
SQLSMALLINT * 0x0
SQLUSMALLINT 0 (SQL_DRIVER_NOPROMPT)
[000000.071482]
python 7FFF7876C180 ENTER SQLSetConnectAttr
SQLHDBC 0x1004c3bf0
SQLINTEGER 102 (SQL_ATTR_AUTOCOMMIT)
SQLPOINTER 0x0
SQLINTEGER * 4294967291 (SQL_IS_UINTEGER)
[000000.089380]
python 7FFF7876C180 EXIT SQLSetConnectAttr with return code 0 (SQL_SUCCESS)
SQLHDBC 0x1004c3bf0
SQLINTEGER 102 (SQL_ATTR_AUTOCOMMIT)
SQLPOINTER 0x0
SQLINTEGER * 4294967291 (SQL_IS_UINTEGER)
[000000.089468]
python 7FFF7876C180 ENTER SQLGetInfo
SQLHDBC 0x1004c3bf0
SQLUSMALLINT 77 (SQL_DRIVER_ODBC_VER)
SQLPOINTER 0x7fff5fbff000
SQLSMALLINT 20
SQLSMALLINT * 0x7fff5fbfeffe
[000000.089502]
python 7FFF7876C180 EXIT SQLGetInfo with return code 0 (SQL_SUCCESS)
SQLHDBC 0x1004c3bf0
SQLUSMALLINT 77 (SQL_DRIVER_ODBC_VER)
SQLPOINTER 0x7fff5fbff000
| 03.50 |
SQLSMALLINT 20
SQLSMALLINT * 0x7fff5fbfeffe (5)
[000000.089529]
python 7FFF7876C180 ENTER SQLGetInfo
SQLHDBC 0x1004c3bf0
SQLUSMALLINT 10002 (SQL_DESCRIBE_PARAMETER)
SQLPOINTER 0x7fff5fbfeffc
SQLSMALLINT 2
SQLSMALLINT * 0x7fff5fbfeffe
[000000.089550]
python 7FFF7876C180 EXIT SQLGetInfo with return code 0 (SQL_SUCCESS)
SQLHDBC 0x1004c3bf0
SQLUSMALLINT 10002 (SQL_DESCRIBE_PARAMETER)
SQLPOINTER 0x7fff5fbfeffc
| N |
SQLSMALLINT 2
SQLSMALLINT * 0x7fff5fbfeffe (1)
[000000.089593]
python 7FFF7876C180 ENTER SQLGetInfo
SQLHDBC 0x1004c3bf0
SQLUSMALLINT 111 (SQL_NEED_LONG_DATA_LEN)
SQLPOINTER 0x7fff5fbfeffc
SQLSMALLINT 2
SQLSMALLINT * 0x7fff5fbfeffe
[000000.089615]
python 7FFF7876C180 EXIT SQLGetInfo with return code 0 (SQL_SUCCESS)
SQLHDBC 0x1004c3bf0
SQLUSMALLINT 111 (SQL_NEED_LONG_DATA_LEN)
SQLPOINTER 0x7fff5fbfeffc
| Y |
SQLSMALLINT 2
SQLSMALLINT * 0x7fff5fbfeffe (1)
[000000.089638]
python 7FFF7876C180 ENTER SQLAllocHandle
SQLSMALLINT 3 (SQL_HANDLE_STMT)
SQLHANDLE 0x1004c3bf0
SQLHANDLE * 0x7fff5fbfeff0
[000000.089669]
python 7FFF7876C180 EXIT SQLAllocHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 3 (SQL_HANDLE_STMT)
SQLHANDLE 0x1004c3bf0
SQLHANDLE * 0x7fff5fbfeff0 (0x1004cabb0)
[000000.089686]
python 7FFF7876C180 ENTER SQLGetTypeInfo
SQLHSTMT 0x1004cabb0
SQLSMALLINT 93 (SQL_TYPE_TIMESTAMP)
[000000.111645]
python 7FFF7876C180 EXIT SQLGetTypeInfo with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x1004cabb0
SQLSMALLINT 93 (SQL_TYPE_TIMESTAMP)
[000000.111684]
python 7FFF7876C180 ENTER SQLFetch
SQLHSTMT 0x1004cabb0
[000000.111711]
python 7FFF7876C180 EXIT SQLFetch with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x1004cabb0
[000000.111724]
python 7FFF7876C180 ENTER SQLGetData
SQLHSTMT 0x1004cabb0
SQLUSMALLINT 3
SQLSMALLINT 4 (SQL_C_LONG)
SQLPOINTER 0x7fff5fbfefec
SQLLEN 4
SQLLEN * 0x0
[000000.111759]
python 7FFF7876C180 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x1004cabb0
SQLUSMALLINT 3
SQLSMALLINT 4 (SQL_C_LONG)
SQLPOINTER 0x7fff5fbfefec
| 21580870632603671 |
SQLLEN 4
SQLLEN * 0x0
[000000.111788]
python 7FFF7876C180 ENTER SQLGetTypeInfo
SQLHSTMT 0x1004cabb0
SQLSMALLINT 12 (SQL_VARCHAR)
[000000.111801]
python 7FFF7876C180 EXIT SQLGetTypeInfo with return code -1 (SQL_ERROR)
SQLHSTMT 0x1004cabb0
SQLSMALLINT 12 (SQL_VARCHAR)
[000000.111815]
python 7FFF7876C180 ENTER SQLGetTypeInfo
SQLHSTMT 0x1004cabb0
SQLSMALLINT -9 (SQL_WVARCHAR)
[000000.111828]
python 7FFF7876C180 EXIT SQLGetTypeInfo with return code -1 (SQL_ERROR)
SQLHSTMT 0x1004cabb0
SQLSMALLINT -9 (SQL_WVARCHAR)
[000000.111842]
python 7FFF7876C180 ENTER SQLGetTypeInfo
SQLHSTMT 0x1004cabb0
SQLSMALLINT -2 (SQL_BINARY)
[000000.111854]
python 7FFF7876C180 EXIT SQLGetTypeInfo with return code -1 (SQL_ERROR)
SQLHSTMT 0x1004cabb0
SQLSMALLINT -2 (SQL_BINARY)
[000000.111869]
python 7FFF7876C180 ENTER SQLFreeStmt
SQLHSTMT 0x1004cabb0
SQLUSMALLINT 0 (SQL_CLOSE)
[000000.132529]
python 7FFF7876C180 EXIT SQLFreeStmt with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x1004cabb0
SQLUSMALLINT 0 (SQL_CLOSE)
[000000.132590]
python 7FFF7876C180 ENTER SQLAllocHandle
SQLSMALLINT 3 (SQL_HANDLE_STMT)
SQLHANDLE 0x1004c3bf0
SQLHANDLE * 0x101373ee8
[000000.132629]
python 7FFF7876C180 EXIT SQLAllocHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 3 (SQL_HANDLE_STMT)
SQLHANDLE 0x1004c3bf0
SQLHANDLE * 0x101373ee8 (0x10045c0b0)
[000123.339614]
python 7FFF7876C180 ENTER SQLFreeStmt
SQLHSTMT 0x10045c0b0
SQLUSMALLINT 0 (SQL_CLOSE)
[000123.339667]
python 7FFF7876C180 EXIT SQLFreeStmt with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x10045c0b0
SQLUSMALLINT 0 (SQL_CLOSE)
[000123.339718]
python 7FFF7876C180 ENTER SQLExecDirectW
SQLHSTMT 0x10045c0b0
SQLWCHAR * 0x10047a540
| ?????????????????????????????? |
SQLINTEGER -3 (SQL_NTS)
[000123.360756]
python 7FFF7876C180 EXIT SQLExecDirectW with return code -1 (SQL_ERROR)
SQLHSTMT 0x10045c0b0
SQLWCHAR * 0x10047a540
SQLINTEGER -3 (SQL_NTS)
[000123.361764]
python 7FFF7876C180 ENTER SQLGetDiagRec
SQLSMALLINT 3 (SQL_HANDLE_STMT)
SQLHSTMT 0x10045c0b0
SQLSMALLINT 1
SQLCHAR * 0x7fff5fbfeebc
SQLINTEGER * 0x7fff5fbfeec4
SQLCHAR * 0x7fff5fbfeed0
SQLSMALLINT 1023
SQLSMALLINT * 0x7fff5fbfeec2
[000123.361849]
python 7FFF7876C180 EXIT SQLGetDiagRec with return code 0 (SQL_SUCCESS)
SQLSMALLINT 3 (SQL_HANDLE_STMT)
SQLHSTMT 0x10045c0b0
SQLSMALLINT 1
SQLCHAR * 0x7fff5fbfeebc
| 42000 |
SQLINTEGER * 0x7fff5fbfeec4 (102)
SQLCHAR * 0x7fff5fbfeed0
| [FreeTDS][SQL Server]Incorrect syntax ne |
| ar '�'. |
SQLSMALLINT 1023
SQLSMALLINT * 0x7fff5fbfeec2 (49)
FreeTDS log:
token.c:2355:tds_process_end() state set to TDS_IDLE
util.c:156:Changed query state from READING to IDLE
token.c:2370: rows_affected = 0
odbc.c:1454:SQLAllocHandle(3, 0x1004caad0, 0x10045c1c8)
odbc.c:1615:_SQLAllocStmt(0x1004caad0, 0x10045c1c8)
odbc.c:4388:SQLGetStmtAttr(0x1004cb550, 10010, 0x1004ab428, 0, 0x0)
odbc.c:4388:SQLGetStmtAttr(0x1004cb550, 10011, 0x1004ca118, 0, 0x0)
odbc.c:4388:SQLGetStmtAttr(0x1004cb550, 10012, 0x1004ca158, 0, 0x0)
odbc.c:4388:SQLGetStmtAttr(0x1004cb550, 10013, 0x1004cb6b8, 0, 0x0)
odbc.c:4154:SQLFreeStmt(0x1004cb550, 0)
odbc.c:4075:_SQLFreeStmt(0x1004cb550, 0, 0)
odbc.c:3463:SQLExecDirect(0x1004cb550, 0x100434950, -3)
prepare_query.c:203:parsing 0 parameters
odbc.c:3211:_SQLExecute(0x1004cb550)
odbc.c:3216:_SQLExecute() starting with state 0
mem.c:615:tds_free_all_results()
util.c:156:Changed query state from IDLE to QUERYING
write.c:140:tds_put_string converting 30 bytes of "??????????????????????????????"
write.c:168:tds_put_string wrote 12 bytes
util.c:156:Changed query state from QUERYING to PENDING
net.c:741:Sending packet
0000 01 01 00 14 00 00 01 00-fd ff fd ff fd ff fd ff |........ ????????|
0010 fd ff fd ff - |????|
token.c:540:tds_process_tokens(0x1004b7c90, 0x7fff5fbff1b4, 0x7fff5fbff1b0, 0x6914)
util.c:156:Changed query state from PENDING to READING
net.c:555:Received header
0000 04 01 00 6a 00 42 01 00- |...j.B..|
net.c:609:Received packet
0000 04 01 00 6a 00 42 01 00-aa 56 00 66 00 00 00 01 |...j.B.. ?V.f....|
0010 0f 1a 00 49 00 6e 00 63-00 6f 00 72 00 72 00 65 |...I.n.c .o.r.r.e|
0020 00 63 00 74 00 20 00 73-00 79 00 6e 00 74 00 61 |.c.t. .s .y.n.t.a|
0030 00 78 00 20 00 6e 00 65-00 61 00 72 00 20 00 27 |.x. .n.e .a.r. .'|
0040 00 fd ff 27 00 2e 00 0b-43 00 4f 00 4c 00 4f 00 |.??'.... C.O.L.O.|
0050 2d 00 53 00 51 00 4c 00-2d 00 30 00 32 00 00 01 |-.S.Q.L. -.0.2...|
0060 00 fd 02 00 fd 00 00 00-00 00 |.?..?... ..|
token.c:555:processing result tokens. marker is aa(ERROR)
token.c:122:tds_process_default_tokens() marker is aa(ERROR)
token.c:2588:tds_process_msg() reading message 102 from server
token.c:2661:tds_process_msg() calling client msg handler
odbc.c:2270:msgno 102 20003
token.c:2674:tds_process_msg() returning TDS_SUCCEED
token.c:555:processing result tokens. marker is fd(DONE)
token.c:2339:tds_process_end: more_results = 0
was_cancelled = 0
error = 1
done_count_valid = 0
token.c:2355:tds_process_end() state set to TDS_IDLE
util.c:156:Changed query state from READING to IDLE
token.c:2370: rows_affected = 0
util.c:104:logic error: cannot change query state from IDLE to PENDING
odbc.c:3534:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3535: result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=2
odbc.c:3575:odbc_process_tokens: row_count=-1
odbc.c:3374:_SQLExecute: odbc_process_tokens returned result_type 4052
error.c:517:SQLGetDiagRec(3, 0x1004cb550, 1, 0x7fff5fbfee8c, 0x7fff5fbfee94, 0x7fff5fbfeea0, 1023, 0x7fff5fbfee92)
error.c:566:SQLGetDiagRec: "[FreeTDS][SQL Server]Incorrect syntax near '�'."
In cases where pyodbc is being difficult (for whatever reason) you might give pypyodbc a try. It is a pure Python implementation that is similar to pyodbc in its usage. However, unfortunately, it no longer appears to be actively maintained (as of July 2019).
pypyodbc (at pypi.org)
Related
I have infile.txt file with multiple columns and rows like this:
infile.txt
2020 01 13 00 28.5833 77.2000 979 0 282.6 284.3 285.4 0 0
2020 01 13 00 28.5833 77.2000 925 469.578 290.4 296.9 297.7 3.6 5.1
2020 01 13 00 28.5833 77.2000 909 613.987 290.8 298.8 299.5 4.7 3.3
2020 01 13 00 28.5833 77.2000 850 1169.4 288 301.6 303.1 9.3 0
2020 01 13 00 28.5833 77.2000 700 2776.28 279 308.9 309.6 0 7.1
2020 01 13 00 28.5833 77.2000 500 5561.01 258.1 314.6 314.8 14.2 11.9
and, I want to perform some column-based calculation as follows:
awk '{R=0; if($12) R=(('$g'/'$theta_vs')*($11-'$theta_vs')*($8-'$z_s'))/(($12^2)+($13^2)); print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,R }' > test.txt
This work perfect and keep R=0 when $12!=0 but this provides an output value 0 when $12==0 as follows:
outputfile:
2020 01 13 00 28.5833 77.2000 979 0 282.6 284.3 285.4 0 0 0
2020 01 13 00 28.5833 77.2000 925 469.578 290.4 296.9 297.7 3.6 5.1 5.08926
2020 01 13 00 28.5833 77.2000 909 613.987 290.8 298.8 299.5 4.7 3.3 9.01363
2020 01 13 00 28.5833 77.2000 850 1169.4 288 301.6 303.1 9.3 0 8.21755
2020 01 13 00 28.5833 77.2000 700 2776.28 279 308.9 309.6 0 7.1 0
2020 01 13 00 28.5833 77.2000 500 5561.01 258.1 314.6 314.8 14.2 11.9 16.3555
I want to keep R=0 when both $12 && $13 is 0.
How can I make it?
Thank you
Change
if ($12)
to
if ($12 || $13)
This will assign R if either of them is non-zero, and leave it at 0 if both of them are zero.
Could you please try following.
awk -v G="$g" -v theta="$theta_vs" -v z="$z_s" '{R=0; if($12 || $13) R=((G/theta)*($11-theta)*($8-z))/(($12^2)+($13^2)); print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,R }' Input_file
In case your lines have only 13 fields then as per Ed sir's suggestion adding following.
awk -v G="$g" -v theta="$theta_vs" -v z="$z_s" '{R=0; if($12 || $13) R=((G/theta)*($11-theta)*($8-z))/(($12^2)+($13^2)); print $0,R }' Input_file
I am working with a imx6 dual light digi board. I want to add Ad7879 touch support. I 've been followed the next steps:
-First I changed the kernel config file adding support fo touchscreen and ad7879. In kernel config file I 've made the following changes:
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_AD7879=y
CONFIG_TOUCHSCREEN_AD7879_I2C=y
At the first I configured ad7879 as module doing:
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_AD7879=m
CONFIG_TOUCHSCREEN_AD7879_I2C=m
After that I made the device initialization in the device tree.
In imx6qdl-ccimx6sbc.dtsi file I put the next:
&i2c3 {
ad7879#2c
{
compatible = "adi,ad7879-1";
reg = <0x2c>;
interrupt-parent = <&gpio6>;
interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
touchscreen-max-pressure = <4096>;
adi,resistance-plate-x = <120>;
adi,first-conversion-delay = /bits/ 8 <3>;
adi,acquisition-time = /bits/ 8 <1>;
adi,median-filter-size = /bits/ 8 <2>;
adi,averaging = /bits/ 8 <1>;
adi,conversion-interval = /bits/ 8 <255>;
};
The ad7879 interrupt controller is conected to the imx6 in EXP_I2C_IRQ_N pin that is the GPIO_6_15, for that reason I put interrupt-parent = <&gpio6> and interrupts = <15 IRQ_TYPE_EDGE_FALLING>;.
In imx6qdl-ccimx6sbc.dts file I put:
&i2c3 {
...
ad7879#2c {
status ="okay";
};
...
};
Then I followed with compile the linux image and device tree.
In the imx6 with the linux image that I configures the ad7879 as module I loaded the ad7879 modules doing this:
root:~> modprobe ad7879
root:~> modprobe ad7879-i2c
but there is not log messages abaout the ad7879 and there is no ad7879 node asociated.
If I check the device node to chek the device node:
root#ccimx6sbc: ls -la /dev/input/
drwxr-xr-x 4 root root 180 Jan 1 2000 .
drwxr-xr-x 14 root root 3480 May 16 14:49 ..
drwxr-xr-x 2 root root 80 Jan 1 2000 by-id
drwxr-xr-x 2 root root 120 Jan 1 2000 by-path
crw-rw---- 1 root input 13, 64 Jan 1 2000 event0
crw-rw---- 1 root input 13, 65 Jan 1 2000 event1
crw-rw---- 1 root input 13, 66 Jan 1 2000 event2
crw-rw---- 1 root input 13, 63 Jan 1 2000 mice
crw-rw---- 1 root input 13, 32 Jan 1 2000 mouse0
root#ccimx6sbc:# cat /sys/class/input/input0/name
da9063-onkey
root#ccimx6sbc:# cat /sys/class/input/input1/name
Genius 4D Scroll Mouse
root#ccimx6sbc:# cat /sys/class/input/input2/name
sgtl5000-audio Headphone Jack
You can see that there is no node asociated.
root#ccimx6sbc:# cat /proc/interrupts
CPU0 CPU1
29: 140884 13795 GIC 29 twd
34: 406 0 GIC 34 sdma
35: 0 0 GIC 35 VPU_JPG_IRQ
37: 1 0 GIC 37 2400000.ipu
38: 12 0 GIC 38 2400000.ipu
42: 28 0 GIC 42
44: 0 0 GIC 44 VPU_CODEC_IRQ
50: 0 0 GIC 50 vdoa
51: 0 0 GIC 51 rtc alarm
54: 52 0 GIC 54 mmc3
55: 52 0 GIC 55 mmc1
57: 3580 0 GIC 57 mmc0
61: 353 0 GIC 61 21f0000.serial
63: 0 0 GIC 63 2008000.ecspi
69: 472 0 GIC 69 21a4000.i2c
70: 1367 0 GIC 70 21a8000.i2c
72: 109 0 GIC 72 2184200.usb
75: 0 0 GIC 75 2184000.usb
79: 0 0 GIC 79 202c000.ssi
81: 0 0 GIC 81 imx_thermal
87: 167 0 GIC 87 i.MX Timer Tick
112: 0 0 GIC 112 20bc000.wdog
134: 0 0 GIC 134 mipi_dsi
137: 466 0 GIC 137 2101000.jr0
138: 0 0 GIC 138 2102000.jr1
139: 0 0 GIC 139 mmdc_1
144: 0 0 GIC 144 mmdc_1
147: 0 0 GIC 147 20e0000.hdmi_video
150: 62234 0 GIC 150 2188000.ethernet
151: 0 0 GIC 151 2188000.ethernet
192: 0 0 gpio-mxc 0 headphone detect
364: 1 0 gpio-mxc 12 da9063-irq
413: 0 1 da9063-irq 3 HWMON
414: 0 0 da9063-irq 0 ONKEY
415: 0 0 da9063-irq 1 ALARM
IPI0: 0 0 CPU wakeup interrupts
IPI1: 0 58 Timer broadcast interrupts
IPI2: 1405 2387 Rescheduling interrupts
IPI3: 0 0 Function call interrupts
IPI4: 19 33 Single function call interrupts
IPI5: 0 0 CPU stop interrupts
IPI6: 426 476 IRQ work interrupts
IPI7: 0 0 completion interrupts
Err: 0
You can se that there is not interrupts asociated to ad7879.
There is no difference when I build the linux kernel with this configuration:
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_AD7879=y
CONFIG_TOUCHSCREEN_AD7879_I2C=y
I did run dmesg and there is no log entries associated with ad7879.
In the imx6 linux I did the following commands:
>root#ccimx6sbc:i2cdetect 2
with this response:
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- UU -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- 2c -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
If you can see the identifier of the device is detected (0x2c).
Then I made:
>root#ccimx6sbc: i2cdump -r 0-0x40 2 0x2c
With this response:
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2, address 0x2c, mode byte
Probe range limited to 0x00-0x40.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 40 00 00 00 00 00 00 00 00 00 00 00 03 00 ..#...........?.
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00
You can se in 0x02 and 0x0e are two of the default values for the registers of ad7879 and they are correct. So I concluded that the controller is well connected.
I don't if I missing something.
So out of curiosity, I tried to run this code today (compiled with gcc -m32 1.c):
int main(void)
{
// EB is the opcode for jmp rel/8
// FE is hex for -2
// So this is essentially an infinite loop
((void(*)(void))"\xEB\xFE")();
}
... and it worked! No segfaults, the program (correctly?) goes into an infinite loop. Looking at the disassembly (objdump -d a.out), you can see the call to... whatever is at address 0x8048480:
080483d6 <main>:
....
80483e7: b8 80 84 04 08 mov $0x8048480,%eax
80483ec: ff d0 call *%eax
....
objdump -s -j .rodata a.out gives:
Contents of section .rodata:
8048478 03000000 01000200 ebfe00 ...........
~~~~
So it is indeed executing the string, which is stored in the .rodata section. So I ran readelf --sections a.out and got:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .interp PROGBITS 08048154 000154 000013 00 A 0 0 1
[ 2] .note.ABI-tag NOTE 08048168 000168 000020 00 A 0 0 4
[ 3] .note.gnu.build-i NOTE 08048188 000188 000024 00 A 0 0 4
[ 4] .gnu.hash GNU_HASH 080481ac 0001ac 000020 04 A 5 0 4
[ 5] .dynsym DYNSYM 080481cc 0001cc 000040 10 A 6 1 4
[ 6] .dynstr STRTAB 0804820c 00020c 000045 00 A 0 0 1
[ 7] .gnu.version VERSYM 08048252 000252 000008 02 A 5 0 2
[ 8] .gnu.version_r VERNEED 0804825c 00025c 000020 00 A 6 1 4
[ 9] .rel.dyn REL 0804827c 00027c 000008 08 A 5 0 4
[10] .rel.plt REL 08048284 000284 000008 08 AI 5 23 4
[11] .init PROGBITS 0804828c 00028c 000023 00 AX 0 0 4
[12] .plt PROGBITS 080482b0 0002b0 000020 04 AX 0 0 16
[13] .plt.got PROGBITS 080482d0 0002d0 000008 00 AX 0 0 8
[14] .text PROGBITS 080482e0 0002e0 000182 00 AX 0 0 16
[15] .fini PROGBITS 08048464 000464 000014 00 AX 0 0 4
[16] .rodata PROGBITS 08048478 000478 00000b 00 A 0 0 4
[17] .eh_frame_hdr PROGBITS 08048484 000484 000034 00 A 0 0 4
[18] .eh_frame PROGBITS 080484b8 0004b8 0000e0 00 A 0 0 4
[19] .init_array INIT_ARRAY 08049f0c 000f0c 000004 04 WA 0 0 4
[20] .fini_array FINI_ARRAY 08049f10 000f10 000004 04 WA 0 0 4
[21] .dynamic DYNAMIC 08049f14 000f14 0000e8 08 WA 6 0 4
[22] .got PROGBITS 08049ffc 000ffc 000004 04 WA 0 0 4
[23] .got.plt PROGBITS 0804a000 001000 000010 04 WA 0 0 4
[24] .data PROGBITS 0804a010 001010 000008 00 WA 0 0 4
[25] .bss NOBITS 0804a018 001018 000004 00 WA 0 0 1
[26] .comment PROGBITS 00000000 001018 00001a 01 MS 0 0 1
[27] .symtab SYMTAB 00000000 001034 0003f0 10 28 45 4
[28] .strtab STRTAB 00000000 001424 0001bd 00 0 0 1
[29] .shstrtab STRTAB 00000000 0015e1 000105 00 0 0 1
So in the ELF binary, the section is marked non-executable. But in memory, the page is executable (cat /proc/xxx/maps):
08048000-08049000 r-xp 00000000 08:01 663551 /home/andrew/Desktop/a.out
08049000-0804a000 r--p 00000000 08:01 663551 /home/andrew/Desktop/a.out
0804a000-0804b000 rw-p 00001000 08:01 663551 /home/andrew/Desktop/a.out
My original guess was that the sections too closely-spaced (there are both AX and A sections in the 08048000-08049000 range), so Linux is forced to give the page the union of the ELF permission bits (AX | A == AX). However, even after increasing the size of the .rodata section (by adding many long strings), all of the pages containing the .rodata section are still executable. Why is this?
(For the record, I'm running on Linux kernel 4.11.7, GCC 7.1.1, and compiling as 64-bit still exhibits this behavior)
My original guess was that the segments too closely-spaced
You should not call sections segments (ELF has both, and they mean different things).
Sections only matter at static link time, and can be completely removed (are not needed at runtime). Only segments matter at runtime, and a typical ELF binary will have two segments with R-X and RW- permissions.
The .rodata section is usually merged with .text section and put into the executable segment. You can change that with the --rosegment flag if you use gold linker (patch which introduced this).
You can see section to segment mapping in the readelf -Wl a.out output.
Update:
Can there ever be a situation where .rodata needs to be executable, or is it for optimization, or something else?
There are no portable situations where .rodata needs to be executable. It is possible to construct a non-portable program that requires it, as you've done in your question.
Merging of .rodata and .text is an optimization: it requires two mmap calls instead of three (a program linked with --rosegment will have three separate PT_LOAD segments with R-X, R-- and R-W protections) and also fragments the virtual space less. In addition, on Linux there is a system-wide limit on total mappings, so you'll reduce the total number of programs you can run at once by 50% if you link everything with --rosegment.
Update 2:
Recent Linux distributions stopped merging .text and .rodata, and now have three or four separate LOAD segments. See this answer.
I have a USB device which enumerates correctly as a CDC interface. /dev/ttyACM1 is created, and I can ultimately communicate over the endpoints.
But alas, in the first few seconds after enumeration, Some Mysterious Thing on the Linux host side sends AT<CR>AT<CR>AT<CR> to the device, then a few seconds after that, the strange sequence 0x7E 0x00 0x78 0xF0 0x7E. The first is evidently Some Mysterious Thing trying to wake up a modem. The second is presumably similar in intent.
Does anyone know where these unsolicited bytes come from?
I've tried two different VIDs --- 0x1CBE, as the device is a TI chip and that's their default, and 0xF055, in case the TI VID was triggering some alternate driver. Same behavior. The device descriptor looks pretty completely vanilla: CDC class, subclass 0, protocol 0, one configuration.
The host is Ubuntu 14.04.1 LTS, 64-bit. /sys/bus/usb/drivers/ says that it is using the cdc_acm driver. Following is the output from usbmon; the mysterious extra bytes are at the end.
Note that in this run, it was enumerating with USB_CDC_ACM_PROTO_AT_V25TER; I also tried USB_CDC_PROTO_NONE but the result was the same.
ffff8801466ff180 3244792454 S Ci:2:029:0 s 80 06 0100 0000 0012 18 <
ffff8801466ff180 3244792654 C Ci:2:029:0 0 18 = 12011001 02000040 55f00200 00010102 0301
ffff8801466ff180 3244792709 S Ci:2:029:0 s 80 06 0200 0000 0009 9 <
ffff8801466ff180 3244792934 C Ci:2:029:0 0 9 = 09024300 020105c0 00
ffff8801466ff180 3244792997 S Ci:2:029:0 s 80 06 0200 0000 0043 67 <
ffff8801466ff180 3244793306 C Ci:2:029:0 0 67 = 09024300 020105c0 00090400 00010202 01040524 00100104 24020605 24060001
ffff8801466ff180 3244793377 S Ci:2:029:0 s 80 06 0300 0000 00ff 255 <
ffff8801466ff180 3244793570 C Ci:2:029:0 0 4 = 04030904
ffff8801466ff180 3244793632 S Ci:2:029:0 s 80 06 0302 0409 00ff 255 <
ffff8801466ff180 3244793802 C Ci:2:029:0 0 30 = 1e035300 61007400 50006100 71003a00 20007300 65007200 69006100 6c00
ffff8801466ff180 3244793861 S Ci:2:029:0 s 80 06 0301 0409 00ff 255 <
ffff8801466ff180 3244794065 C Ci:2:029:0 0 28 = 1c034800 69006700 68006500 72002000 47007200 6f007500 6e006400
ffff8801466ff180 3244794131 S Ci:2:029:0 s 80 06 0303 0409 00ff 255 <
ffff8801466ff180 3244794309 C Ci:2:029:0 0 18 = 12033100 32003300 34003500 36003700 3800
ffff8801466ff000 3244794739 S Co:2:029:0 s 00 09 0001 0000 0000 0
ffff8801466ff000 3244794897 C Co:2:029:0 0 0
ffff8801466ff000 3244794959 S Ci:2:029:0 s 80 06 0305 0409 00ff 255 <
ffff8801466ff000 3244795140 C Ci:2:029:0 0 54 = 36035300 65006c00 66002000 50006f00 77006500 72006500 64002000 43006f00
ffff8801466ffe40 3244795245 S Ci:2:029:0 s 80 06 0304 0409 00ff 255 <
ffff8801466ffe40 3244795390 C Ci:2:029:0 0 44 = 2c034100 43004d00 20004300 6f006e00 74007200 6f006c00 20004900 6e007400
ffff8801466d1f00 3244796605 S Co:2:029:0 s 21 22 0000 0000 0000 0
ffff8801466d1f00 3244796764 C Co:2:029:0 0 0
ffff8801466d1f00 3244796791 S Co:2:029:0 s 21 20 0000 0000 0007 7 = 80250000 000008
ffff8801466d1f00 3244796931 C Co:2:029:0 0 7 >
ffff8801466ffe40 3244812303 S Ii:2:029:1 -115:1 16 <
ffff8801477a69c0 3244812323 S Co:2:029:0 s 21 22 0003 0000 0000 0
ffff8801477a69c0 3244812387 C Co:2:029:0 0 0
ffff8801466ff480 3244812454 S Bi:2:029:2 -115 128 <
ffff8801466ff600 3244812457 S Bi:2:029:2 -115 128 <
ffff8801466ff6c0 3244812458 S Bi:2:029:2 -115 128 <
ffff8801466ff780 3244812459 S Bi:2:029:2 -115 128 <
ffff8801466ff840 3244812460 S Bi:2:029:2 -115 128 <
ffff8801466ff900 3244812460 S Bi:2:029:2 -115 128 <
ffff8801466fff00 3244812461 S Bi:2:029:2 -115 128 <
ffff8801466ff9c0 3244812462 S Bi:2:029:2 -115 128 <
ffff8801466ffa80 3244812463 S Bi:2:029:2 -115 128 <
ffff8801466ffd80 3244812463 S Bi:2:029:2 -115 128 <
ffff8800971e8240 3244812464 S Bi:2:029:2 -115 128 <
ffff8801473c2f00 3244812465 S Bi:2:029:2 -115 128 <
ffff8801473c2e40 3244812465 S Bi:2:029:2 -115 128 <
ffff8801473c2d80 3244812466 S Bi:2:029:2 -115 128 <
ffff8801473c2cc0 3244812467 S Bi:2:029:2 -115 128 <
ffff8801473c2c00 3244812468 S Bi:2:029:2 -115 128 <
ffff8801477a6300 3244812483 S Co:2:029:0 s 21 20 0000 0000 0007 7 = 00e10000 000008
ffff8801477a6300 3244812634 C Co:2:029:0 0 7 >
ffff8801477a6300 3244813414 S Co:2:029:0 s 21 22 0002 0000 0000 0
ffff8801477a6300 3244813510 C Co:2:029:0 0 0
ffff8801473b96c0 3244913682 S Co:2:029:0 s 21 22 0003 0000 0000 0
ffff8801473b96c0 3244913763 C Co:2:029:0 0 0
ffff8801473c2b40 3244913835 S Bo:2:029:1 -115 1 = 41
ffff8801473c2b40 3244913882 C Bo:2:029:1 0 1 >
ffff8801473c2b40 3245014062 S Bo:2:029:1 -115 1 = 54
ffff8801473c2b40 3245014160 C Bo:2:029:1 0 1 >
ffff8801473c2b40 3245114308 S Bo:2:029:1 -115 1 = 0d
ffff8801473c2b40 3245114394 C Bo:2:029:1 0 1 >
ffff8801473b9480 3245302014 S Co:2:029:0 s 21 20 0000 0000 0007 7 = 00c20100 000008
ffff8801473b9480 3245302184 C Co:2:029:0 0 7 >
ffff8801473c2b40 3248486129 S Bo:2:029:1 -115 1 = 41
ffff8801473c2b40 3248486239 C Bo:2:029:1 0 1 >
ffff8801473c2b40 3248586369 S Bo:2:029:1 -115 1 = 54
ffff8801473c2b40 3248586488 C Bo:2:029:1 0 1 >
ffff8801473c2b40 3248686655 S Bo:2:029:1 -115 1 = 0d
ffff8801473c2b40 3248686737 C Bo:2:029:1 0 1 >
ffff8801473c2b40 3251487738 S Bo:2:029:1 -115 1 = 41
ffff8801473c2b40 3251487836 C Bo:2:029:1 0 1 >
ffff8801473c2b40 3251587976 S Bo:2:029:1 -115 1 = 54
ffff8801473c2b40 3251588088 C Bo:2:029:1 0 1 >
ffff8801473c2b40 3251688249 S Bo:2:029:1 -115 1 = 0d
ffff8801473c2b40 3251688357 C Bo:2:029:1 0 1 >
ffff8801473c2b40 3254489075 S Bo:2:029:1 -115 5 = 7e0078f0 7e
ffff8801473c2b40 3254489188 C Bo:2:029:1 0 5 >
ffff8801473c2b40 3257488394 S Bo:2:029:1 -115 5 = 7e0078f0 7e
ffff8801473c2b40 3257488549 C Bo:2:029:1 0 5 >
Those AT commands are being sent by ModemManager.
It is possible to add a udev rule to tell ModemManager to leave your device alone if it is a problem. Just add a file in /etc/udev/rules.d with a name like foo.rules with content like this:
ATTRS{idVendor}=="12ba", ATTRS{idProduct}=="23ef", ENV{ID_MM_DEVICE_IGNORE}="1"
I have an XE2 DataSnap server (Windows service) which uses a 3rd party out-of-process COM component within it's methods. Being COM, I understand it requires the CoInitializeEx and CoUninitialize commands around the statements. My DataSnap server is working great, other than the fact that when I stop the service, I always get an 'Application Error' message in the Event Log, along with an 'APPCRASH' information message. I'm sure this is related to the CoInit.. commands. I have none-DataSnap Windows service apps that use the COM component and stop fine with no errors.
I've tried placing the CoInit/CoUninit commands in various places such as ServiceStart/ServiceStop, DSServerClass.OnCreate/DSServerClass.OnDestroy, and at the top/bottom of each server method function, but the crash still occurs when the service is stopped. If I don't call any methods on the server then the service can be stopped with no errors.
Can anybody show me where CoInit/CoUninit should be placed for multi-threaded DataSnap services? Also, should I be using CoInitialize or CoInitializeEx, and which parameter is appropriate - COINIT_MULTITHREADED, COINIT_APARTMENTTHREADED etc?
Event Log Error :
Faulting application name: X365EXHS.exe, version: 1.0.0.0, time stamp: 0x51ba3d97
Faulting module name: X365EXHS.exe, version: 1.0.0.0, time stamp: 0x51ba3d97
Exception code: 0xc0000005
Fault offset: 0x00006138
Faulting process id: 0xed4
Faulting application start time: 0x01ce687fcfde7812
Faulting application path: C:\DEVELOP\X365EXHS.exe
Faulting module path: C:\DEVELOP\X365EXHS.exe
Report Id: 1f933086-d473-11e2-8cab-005056c00008
Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0
Problem signature:
P1: X365EXHS.exe
P2: 1.0.0.0
P3: 51ba3d97
P4: X365EXHS.exe
P5: 1.0.0.0
P6: 51ba3d97
P7: c0000005
P8: 00006138
P9:
P10:
Attached files:
C:\Users\JonathanW\AppData\Local\Temp\WERF44F.tmp.appcompat.txt
Update :
With more testing I've found that the Access Violation on shutdown only occurs when my DataSnap server is started with the HTTPS protocol, bound to an SSL certificate. It uses the OpenSSL DLLs libeay32.dll and ssleay32.dll so could these be the issue? If I run the server with HTTP (no SSL) then it never AVs when shutdown.
MadExcept Stack Trace
date/time : 2013-06-15, 09:16:56, 113ms
computer name : JW-XT2
user name : JonathanW <admin>
registered owner : JonathanW
operating system : Windows 7 Tablet PC x64 Service Pack 1 build 7601
system language : English
system up time : 1 day 12 hours
program up time : 44 seconds
processors : 2x Intel(R) Core(TM)2 Duo CPU U9400 # 1.40GHz
physical memory : 2749/5008 MB (free/total)
free disk space : (C:) 5.22 GB
display mode : 1024x768, 32 bit
process id : $1134
allocated memory : 19.61 MB
executable : X365EXHS.exe
exec. date/time : 2013-06-15 09:14
version : 1.0.0.0
compiled with : Delphi XE2
madExcept version : 4.0.7
callstack crc : $00000000, $00000000, $00000000
exception number : 1
exception class : EAccessViolation
exception message : Access violation at address 004061A4 in module 'X365EXHS.exe'. Read of address FFFFFFD0.
thread $5e4:
>> stack not accessible, exception location:
004061a4 +8 X365EXHS.exe System 20958 +0 TObject.InheritsFrom
thread $6f0:
775d1f1f +0b ntdll.dll NtWaitForWorkViaWorkerFactory
765633a8 +10 kernel32.dll BaseThreadInitThunk
thread $1cf0:
775d1f1f +0b ntdll.dll NtWaitForWorkViaWorkerFactory
765633a8 +10 kernel32.dll BaseThreadInitThunk
thread $1d6c:
775cfd6a +0e ntdll.dll NtDelayExecution
75153bc2 +5f KERNELBASE.dll SleepEx
75154493 +0a KERNELBASE.dll Sleep
004ca205 +0d X365EXHS.exe madExcept CallThreadProcSafe
004ca26f +37 X365EXHS.exe madExcept ThreadExceptFrame
765633a8 +10 kernel32.dll BaseThreadInitThunk
>> created by thread $b70 at:
768eda8e +00 ole32.dll
thread $2a8:
775d0136 +0e ntdll.dll NtWaitForMultipleObjects
751515e3 +fa KERNELBASE.dll WaitForMultipleObjectsEx
76561a27 +89 kernel32.dll WaitForMultipleObjectsEx
7656421b +13 kernel32.dll WaitForMultipleObjects
004ca205 +0d X365EXHS.exe madExcept CallThreadProcSafe
004ca26f +37 X365EXHS.exe madExcept ThreadExceptFrame
765633a8 +10 kernel32.dll BaseThreadInitThunk
>> created by thread $b70 at:
74751a28 +00 msiltcfg.dll
D ($150):
775cf8aa +0e ntdll.dll NtWaitForSingleObject
75151497 +92 KERNELBASE.dll WaitForSingleObjectEx
7656118f +3e kernel32.dll WaitForSingleObjectEx
76561143 +0d kernel32.dll WaitForSingleObject
00455e2a +02 X365EXHS.exe System.SysUtils WaitForSyncWaitObj
00455fd7 +1f X365EXHS.exe System.SysUtils WaitOrSignalObj
00406cc1 +65 X365EXHS.exe System 20958 +0 TMonitor.Wait
00406d27 +17 X365EXHS.exe System 20958 +0 TMonitor.Wait
0072cac0 +b8 X365EXHS.exe Data.DBXCommon TDBXScheduler.TDBXSchedulerThread.Execute
004ca323 +2b X365EXHS.exe madExcept HookedTThreadExecute
00487e0e +42 X365EXHS.exe System.Classes ThreadProc
00407a70 +28 X365EXHS.exe System 20958 +0 ThreadWrapper
004ca205 +0d X365EXHS.exe madExcept CallThreadProcSafe
004ca26f +37 X365EXHS.exe madExcept ThreadExceptFrame
765633a8 +10 kernel32.dll BaseThreadInitThunk
>> created by thread $1a68 at:
0072c9e7 +1b X365EXHS.exe Data.DBXCommon TDBXScheduler.TDBXSchedulerThread.Create
thread $1b68:
775d1f1f +0b ntdll.dll NtWaitForWorkViaWorkerFactory
765633a8 +10 kernel32.dll BaseThreadInitThunk
thread $10f8:
775d1f1f +0b ntdll.dll NtWaitForWorkViaWorkerFactory
765633a8 +10 kernel32.dll BaseThreadInitThunk
modules:
00400000 X365EXHS.exe 1.0.0.0 C:\DEVELOP\DELPHI\eXchequer365\X365EXHS\Win32\Release
11000000 libeay32.dll 1.0.1.5 C:\ENTPV702
12000000 ssleay32.dll 1.0.1.5 C:\ENTPV702
704f0000 FaultRep.dll 6.1.7601.17514 C:\Windows\system32
70dd0000 msi.dll 5.0.7601.17807 C:\Windows\system32
71010000 comctl32.dll 6.10.7601.17514 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2
71f70000 SXS.DLL 6.1.7601.17514 C:\Windows\system32
72050000 Fwpuclnt.dll 6.1.7601.17514 C:\Windows\system32
72130000 propsys.dll 7.0.7601.17514 C:\Windows\system32
727e0000 wsock32.dll 6.1.7600.16385 C:\Windows\system32
727f0000 uxtheme.dll 6.1.7600.16385 C:\Windows\system32
72870000 WINSTA.dll 6.1.7601.17514 C:\Windows\system32
72bf0000 SECUR32.DLL 6.1.7601.17940 C:\Windows\system32
72c40000 wshtcpip.dll 6.1.7600.16385 C:\Windows\System32
72c50000 wship6.dll 6.1.7600.16385 C:\Windows\System32
72c60000 mswsock.dll 6.1.7601.17514 C:\Windows\system32
72dc0000 wtsapi32.dll 6.1.7601.17514 C:\Windows\system32
72e00000 mpr.dll 6.1.7600.16385 C:\Windows\system32
734f0000 RpcRtRemote.dll 6.1.7601.17514 C:\Windows\system32
73500000 rsaenh.dll 6.1.7600.16385 C:\Windows\system32
73540000 CRYPTSP.dll 6.1.7600.16385 C:\Windows\system32
735f0000 winspool.drv 6.1.7601.17514 C:\Windows\system32
73650000 version.dll 6.1.7600.16385 C:\Windows\system32
73730000 ntmarta.dll 6.1.7600.16385 C:\Windows\system32
74750000 msiltcfg.dll 5.0.7600.16385 C:\Windows\system32
74820000 msimg32.dll 6.1.7600.16385 C:\Windows\system32
74970000 security.dll 6.1.7600.16385 C:\Windows\system32
74c80000 CRYPTBASE.dll 6.1.7600.16385 C:\Windows\syswow64
74c90000 SspiCli.dll 6.1.7601.17940 C:\Windows\syswow64
74cf0000 WS2_32.dll 6.1.7601.17514 C:\Windows\syswow64
74e50000 WLDAP32.dll 6.1.7601.17514 C:\Windows\syswow64
74ea0000 IMM32.DLL 6.1.7601.17514 C:\Windows\system32
74f40000 oleaut32.dll 6.1.7601.17676 C:\Windows\syswow64
74fe0000 USER32.dll 6.1.7601.17514 C:\Windows\syswow64
75140000 KERNELBASE.dll 6.1.7601.18015 C:\Windows\syswow64
75190000 CFGMGR32.dll 6.1.7601.17621 C:\Windows\syswow64
751c0000 LPK.dll 6.1.7600.16385 C:\Windows\syswow64
751d0000 sechost.dll 6.1.7600.16385 C:\Windows\SysWOW64
751f0000 shell32.dll 6.1.7601.18103 C:\Windows\syswow64
75e40000 msvcrt.dll 7.0.7601.17744 C:\Windows\syswow64
76010000 MSCTF.dll 6.1.7600.16385 C:\Windows\syswow64
760e0000 SETUPAPI.dll 6.1.7601.17514 C:\Windows\syswow64
76280000 DEVOBJ.dll 6.1.7601.17621 C:\Windows\syswow64
762a0000 RPCRT4.dll 6.1.7601.17514 C:\Windows\syswow64
764c0000 CLBCatQ.DLL 2001.12.8530.16385 C:\Windows\syswow64
76550000 kernel32.dll 6.1.7601.18015 C:\Windows\syswow64
76660000 GDI32.dll 6.1.7601.17514 C:\Windows\syswow64
766f0000 ADVAPI32.dll 6.1.7601.17514 C:\Windows\syswow64
76790000 USP10.dll 1.626.7601.18009 C:\Windows\syswow64
768c0000 ole32.dll 6.1.7601.17514 C:\Windows\syswow64
76a20000 comdlg32.dll 6.1.7601.17514 C:\Windows\syswow64
76c60000 SHLWAPI.dll 6.1.7601.17514 C:\Windows\syswow64
77580000 NSI.dll 6.1.7600.16385 C:\Windows\syswow64
775b0000 ntdll.dll 6.1.7601.17725 C:\Windows\SysWOW64
processes:
0000 Idle 0 0 0
0004 System 0 0 0
0138 smss.exe 0 0 0
0194 csrss.exe 0 0 0
01c8 wininit.exe 0 0 0
01dc csrss.exe 1 0 0
020c services.exe 0 0 0
0224 winlogon.exe 1 0 0
0230 lsass.exe 0 0 0
0238 lsm.exe 0 0 0
02b0 svchost.exe 0 0 0
0300 svchost.exe 0 0 0
0348 MsMpEng.exe 0 0 0
03a4 svchost.exe 0 0 0
03c4 svchost.exe 0 0 0
03dc svchost.exe 0 0 0
006c svchost.exe 0 0 0
02f0 svchost.exe 0 0 0
04b0 wisptis.exe 1 0 0
04d8 svchost.exe 0 0 0
05bc spoolsv.exe 0 0 0
0604 svchost.exe 0 0 0
0674 armsvc.exe 0 0 0
06a4 svchost.exe 0 0 0
06e8 atashost.exe 0 0 0
0714 svchost.exe 0 0 0
0734 inetinfo.exe 0 0 0
0754 MsDtsSrvr.exe 0 0 0
07c0 sqlservr.exe 0 0 0
05fc w3dbsmgr.exe 0 0 0
0810 sqlbrowser.exe 0 0 0
0834 sqlwriter.exe 0 0 0
084c svchost.exe 0 0 0
08a4 TeamViewer_Service.exe 0 0 0
0950 vmnat.exe 0 0 0
0970 WLIDSVC.EXE 0 0 0
09f4 vmware-authd.exe 0 0 0
0a40 taskhost.exe 1 0 0 normal
0a58 WLIDSVCM.EXE 0 0 0
0af0 dwm.exe 1 0 0 high
0b00 wisptis.exe 1 0 0 high
0b14 TabTip.exe 1 0 0 high
0b44 explorer.exe 1 0 0 normal
0b8c vmnetdhcp.exe 0 0 0
0ba0 TabTip32.exe 1 0 0 normal C:\Program Files (x86)\Common Files\Microsoft Shared\Ink
0bc8 vmware-usbarbitrator64.exe 0 0 0
0c98 svchost.exe 0 0 0
0cb4 NisSrv.exe 0 0 0
0e04 svchost.exe 0 0 0
0e7c Apoint.exe 1 0 0 normal
0e84 igfxtray.exe 1 0 0 normal
0e90 hkcmd.exe 1 0 0 normal
0e98 igfxpers.exe 1 0 0 normal
0eb4 NtrigApplet.exe 1 0 0 normal
0ebc msseces.exe 1 0 0 normal
0f28 ApMsgFwd.exe 1 0 0 normal
0f40 SkyDrive.exe 1 0 0 normal C:\Users\JonathanW\AppData\Local\Microsoft\SkyDrive
0f58 Skype.exe 1 0 0 normal C:\Program Files (x86)\Skype\Phone
0fc8 hpqtra08.exe 1 0 0 normal C:\Program Files (x86)\HP\Digital Imaging\bin
0ff4 WUDFHost.exe 0 0 0
09c4 Dropbox.exe 1 0 0 normal C:\Users\JonathanW\AppData\Roaming\Dropbox\bin
1034 ApntEx.exe 1 0 0 normal
1044 hidfind.exe 1 0 0 normal
104c EvernoteClipper.exe 1 0 0 normal C:\Program Files (x86)\Evernote\Evernote
1068 conhost.exe 1 0 0 normal
10c8 hpwuschd2.exe 1 0 0 normal C:\Program Files (x86)\HP\HP Software Update
1160 DivXUpdate.exe 1 0 0 normal C:\Program Files (x86)\DivX\DivX Update
1178 jusched.exe 1 0 0 normal C:\Program Files (x86)\Common Files\Java\Java Update
127c SearchIndexer.exe 0 0 0
13c0 wmpnetwk.exe 0 0 0
0be8 svchost.exe 0 0 0
1028 svchost.exe 0 0 0
164c dllhost.exe 0 0 0
1704 chrome.exe 1 0 0 normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
1780 chrome.exe 1 0 0 normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
17f0 LMS.exe 0 0 0
1614 UNS.exe 0 0 0
0b60 InputPersonalization.exe 1 0 0 below normal
08f0 adb.exe 1 0 0 normal C:\Program Files (x86)\Android\android-sdk\platform-tools
1124 chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
157c chrome.exe 1 0 0 normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
1200 chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
080c chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
0524 Evernote.exe 1 0 0 normal C:\Program Files (x86)\Evernote\Evernote
14f4 EvernoteTray.exe 1 0 0 normal C:\Program Files (x86)\Evernote\Evernote
0f50 chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
0bd0 chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
1c70 OSPPSVC.EXE 0 0 0
0f1c chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
0b78 JsonView.exe 1 0 0 normal
0934 mmc.exe 1 0 0 normal
0648 bds.exe 1 0 0 normal C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin
11e4 chrome.exe 1 0 0 normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
0b54 chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
0484 chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
0ad0 chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
0e1c chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
1078 chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
0630 chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
0d00 chrome.exe 1 0 0 below normal C:\Users\JonathanW\AppData\Local\Google\Chrome\Application
1bc8 taskeng.exe 0 0 0
1a48 WmiPrvSE.exe 0 0 0
1e94 audiodg.exe 0 0 0
1134 X365EXHS.exe 0 14 6 normal C:\DEVELOP\DELPHI\eXchequer365\X365EXHS\Win32\Release
1ac4 mmc.exe 1 0 0 normal
hardware:
+ Batteries
- Microsoft AC Adapter
- Microsoft ACPI-Compliant Control Method Battery
- Microsoft ACPI-Compliant Control Method Battery
- Microsoft Composite Battery
+ Computer
- ACPI x64-based PC
+ Disk drives
- SAMSUNG SSD PM800 TM 128
+ Display adapters
- Mobile Intel(R) 4 Series Express Chipset Family (driver 8.15.10.2302)
- Mobile Intel(R) 4 Series Express Chipset Family (driver 8.15.10.2302)
+ Human Interface Devices
- DELL Tablet PC Key Buttons (driver 1.1.4.0)
- HID-compliant consumer control device
- HID-compliant device
+ IDE ATA/ATAPI controllers
- ATA Channel 0
- ATA Channel 1
- Standard Dual Channel PCI IDE Controller
+ IEEE 1394 Bus host controllers
- Texas Instruments 1394 OHCI Compliant Host Controller
+ Imaging devices
- Photosmart C4500 series (driver 8.0.0.0)
+ Keyboards
- HID Keyboard Device
- HID Keyboard Device
+ Mice and other pointing devices
- Dell Touchpad (driver 7.1207.101.108)
+ Monitors
- Generic PnP Monitor
+ Multifunction adapters
- Photosmart C4500 series
+ N-trig DuoSense(R) Digitizers
- N-trig DuoSense Composite Root interface (driver 3.1.2000.6)
- N-trig DuoSense Control HID device (driver 3.1.2000.6)
- N-trig DuoSense Control HID Interface (driver 3.1.2000.6)
- N-trig DuoSense MultiTouch HID device (driver 3.1.2000.6)
- N-trig DuoSense Pen HID device (driver 3.1.2000.6)
- N-trig DuoSense Secondary Interface (driver 3.1.2000.6)
- N-trig DuoSense Touch HID device (driver 3.1.2000.6)
- N-trig DuoSense Touch HID Interface (driver 3.1.2000.6)
+ Network adapters
- Intel(R) 82567LM Gigabit Network Connection (driver 10.0.6.0)
- Intel(R) WiFi Link 5100 AGN
- Microsoft 6to4 Adapter
- Microsoft ISATAP Adapter
- Microsoft ISATAP Adapter #2
- Microsoft ISATAP Adapter #3
- Microsoft ISATAP Adapter #4
- Teredo Tunneling Pseudo-Interface
- VMware Virtual Ethernet Adapter for VMnet1 (driver 4.1.4.0)
- VMware Virtual Ethernet Adapter for VMnet8 (driver 4.1.4.0)
- WAN Miniport (IKEv2)
- WAN Miniport (IP)
- WAN Miniport (IPv6)
- WAN Miniport (L2TP)
- WAN Miniport (Network Monitor)
- WAN Miniport (PPPOE)
- WAN Miniport (PPTP)
- WAN Miniport (SSTP)
+ PCMCIA adapters
- Texas Instruments PCI-8x12/7x12/6x12 CardBus Controller
+ Ports (COM & LPT)
- Intel(R) Active Management Technology - SOL (COM8) (driver 5.4.1.1016)
+ Processors
- Intel(R) Core(TM)2 Duo CPU U9400 # 1.40GHz
- Intel(R) Core(TM)2 Duo CPU U9400 # 1.40GHz
+ SD host adapters
- SDA Standard Compliant SD Host Controller
+ Sound, video and game controllers
- High Definition Audio Device
+ Storage controllers
- Intel(R) ICH8M-E/ICH9M-E SATA RAID Controller (driver 8.6.2.1315)
+ Storage volume shadow copies
- Generic volume shadow copy
+ System devices
- ACPI Lid
- ACPI Power Button
- ACPI Sleep Button
- ACPI Thermal Zone
- Composite Bus Enumerator
- Direct memory access controller
- File as Volume Driver
- High Definition Audio Controller
- High precision event timer
- Intel(R) 82801 PCI Bridge - 2448
- Intel(R) ICH9 Family PCI Express Root Port 1 - 2940
- Intel(R) ICH9 Family PCI Express Root Port 2 - 2942
- Intel(R) ICH9 Family PCI Express Root Port 4 - 2946
- Intel(R) ICH9 Family SMBus Controller - 2930
- Intel(R) ICH9M-E LPC Interface Controller - 2917
- Microsoft ACPI-Compliant Embedded Controller
- Microsoft ACPI-Compliant System
- Microsoft System Management BIOS Driver
- Microsoft Virtual Drive Enumerator Driver
- Microsoft Windows Management Interface for ACPI
- Mobile Intel(R) 4 Series Chipset Processor to DRAM Controller - 2A40
- Numeric data processor
- PCI bus
- Plug and Play Software Device Enumerator
- Programmable interrupt controller
- Remote Desktop Device Redirector Bus
- System board
- System board
- System board
- System board
- System board
- System CMOS/real time clock
- System speaker
- System timer
- Terminal Server Keyboard Driver
- Terminal Server Mouse Driver
- UMBus Enumerator
- UMBus Root Bus Enumerator
- VMware VMCI Host Device (driver 9.3.51.0)
- Volume Manager
+ Universal Serial Bus controllers
- Intel(R) ICH9 Family USB Universal Host Controller - 2934
- Intel(R) ICH9 Family USB Universal Host Controller - 2935
- Intel(R) ICH9 Family USB Universal Host Controller - 2936
- Intel(R) ICH9 Family USB Universal Host Controller - 2937
- Intel(R) ICH9 Family USB Universal Host Controller - 2938
- Intel(R) ICH9 Family USB Universal Host Controller - 2939
- Intel(R) ICH9 Family USB2 Enhanced Host Controller - 293A
- Intel(R) ICH9 Family USB2 Enhanced Host Controller - 293C
- USB Root Hub
- USB Root Hub
- USB Root Hub
- USB Root Hub
- USB Root Hub
- USB Root Hub
- USB Root Hub
- USB Root Hub
cpu registers:
eax = 00000000
ebx = 0106fd60
ecx = 0067f558
edx = 0067f140
esi = 0067f140
edi = 00000001
eip = 004061a4
esp = 0018fd68
ebp = 0018fd8c
stack dump:
0018fd68 51 00 00 00 7b 00 53 00 - 79 00 73 00 74 00 65 00 Q...{.S.y.s.t.e.
0018fd78 6d 00 2e 00 47 00 65 00 - 6e 00 65 00 72 00 69 00 m...G.e.n.e.r.i.
0018fd88 63 00 73 00 2e 00 43 00 - 6f 00 6c 00 6c 00 65 00 c.s...C.o.l.l.e.
0018fd98 63 00 74 00 69 00 6f 00 - 6e 00 73 00 7d 00 54 00 c.t.i.o.n.s.}.T.
0018fda8 4c 00 69 00 73 00 74 00 - 3c 00 44 00 61 00 74 00 L.i.s.t.<.D.a.t.
0018fdb8 61 00 2e 00 44 00 42 00 - 58 00 43 00 6f 00 6d 00 a...D.B.X.C.o.m.
0018fdc8 6d 00 6f 00 6e 00 2e 00 - 54 00 44 00 42 00 58 00 m.o.n...T.D.B.X.
0018fdd8 57 00 72 00 69 00 74 00 - 61 00 62 00 6c 00 65 00 W.r.i.t.a.b.l.e.
0018fde8 56 00 61 00 6c 00 75 00 - 65 00 41 00 72 00 72 00 V.a.l.u.e.A.r.r.
0018fdf8 61 00 79 00 3e 00 2e 00 - 52 00 65 00 76 00 65 00 a.y.>...R.e.v.e.
0018fe08 72 00 73 00 65 00 00 00 - 00 00 00 00 00 00 00 00 r.s.e...........
0018fe18 00 00 00 00 c0 8c 18 00 - b0 04 02 00 01 00 00 00 ................
0018fe28 56 00 00 00 7b 00 53 00 - 79 00 73 00 74 00 65 00 V...{.S.y.s.t.e.
0018fe38 6d 00 2e 00 47 00 65 00 - 6e 00 65 00 72 00 69 00 m...G.e.n.e.r.i.
0018fe48 63 00 73 00 2e 00 43 00 - 6f 00 6c 00 6c 00 65 00 c.s...C.o.l.l.e.
0018fe58 63 00 74 00 69 00 6f 00 - 6e 00 73 00 7d 00 54 00 c.t.i.o.n.s.}.T.
0018fe68 4c 00 69 00 73 00 74 00 - 3c 00 44 00 61 00 74 00 L.i.s.t.<.D.a.t.
0018fe78 61 00 2e 00 44 00 42 00 - 58 00 43 00 6f 00 6d 00 a...D.B.X.C.o.m.
0018fe88 6d 00 6f 00 6e 00 2e 00 - 54 00 44 00 42 00 58 00 m.o.n...T.D.B.X.
0018fe98 57 00 72 00 69 00 74 00 - 61 00 62 00 6c 00 65 00 W.r.i.t.a.b.l.e.
Did you try the fix for the IDispatch release as described in this link: Is COM broken in XE2, and how might I work around it?
Seems like XE2 has some COM interfacing changes - I guess to remove assembler to support 64bit. It could be that the presence of an SSL cert causes an extra release which exhibits the error.
Just a thought anyway