JOGL Native Crash - jogl

I am running a JOGL based application, and it has been crashing when I perform certain drawing operations. However, The line it crashes on is a call to gl.glGenLists(1), so I'm not really sure how this could cause an error in the underlying application, since this line is a trivial line (unless the stack is in some sort of bad state - is that possible?).
I also tried updating my video card drivers and now it just freezes in the same place instead of crashing.
The relevant part of the crash report is below. Any help would be appreciated. I'm running an NVIDIA Quadro NVS 160M video card. Thanks.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6dd7ccac, pid=5520, tid=5684
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode windows-x86 )
# Problematic frame:
# C [nvoglnt.dll+0x23ccac]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
Current thread (0x692c4c00): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=5684, stack(0x696f0000,0x69740000)]
siginfo: ExceptionCode=0xc0000005, writing address 0x00040008
Registers:
EAX=0x6d360798, EBX=0x6e562ffc, ECX=0x00040000, EDX=0xffffffff
ESP=0x6973ee1c, EBP=0x0000000d, ESI=0x6d360650, EDI=0x6d362311
EIP=0x6dd7ccac, EFLAGS=0x00010246
Top of Stack: (sp=0x6973ee1c)
0x6973ee1c: 00001343 00000014 00001344 6e563040
0x6973ee2c: 00000000 6d362310 00000040 7ffad000
0x6973ee3c: 6dd7cdb8 6e562ffc 00001343 6e3c7540
0x6973ee4c: 6dc792a8 00000014 6dbdb13b 00000001
0x6973ee5c: 6e3c7540 6d620000 6973ee90 6dc06fb8
0x6973ee6c: 6d620000 6e3c7540 00000001 692c4c00
0x6973ee7c: 63e576a0 63d38030 6b6c4c0e 00000001
0x6973ee8c: 0ab4f368 6973eeb8 010669c7 692c4d10
Instructions: (pc=0x6dd7ccac)
0x6dd7cc9c: 00 8b 4b 08 8b 7b 04 89 79 04 8b 4b 04 8b 7b 08
0x6dd7ccac: 89 79 08 0f 84 8c 00 00 00 8b 4c 24 14 8b 7c d1
Stack: [0x696f0000,0x69740000], sp=0x6973ee1c, free space=315k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [nvoglnt.dll+0x23ccac]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J com.sun.opengl.impl.GLImpl.glGenLists0(I)I
...I omitted the rest of the stack, as this is the offending line ...

Despite the stack it seems to be nvoglnt.dll that is causing the trouble. Have you absolutely definitely installed the correct driver for your graphics device?

Related

Is there a way to create a multiple connections BLE device in BlueZ?

I am broadcasting a BLE advertisement using the following command in linux :
sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 63 6F 3F 8F 64 91 4B EE 95 F7 D8 CC 64 A8 63 B5 00 00 00 00 C8
The BLE devce is visible, but don't allow any connection (since it follows the iBeacon specs, I think).
So my question is, is there a way to create with BlueZ a BLE device that allows not just one, but several connections ?
I read somewhere that A BLE device should be able to allow up to 20 connections, against 7 for a classic bluetooth.
Thank you very much
This depends on your hardware and the Bluetooth version that it supports. With Bluetooth v4.1, all restrictions have been removed and your device can be a peripheral connected to multiple centrals. This is mentioned at this link:-
Beginning with version 4.1 of the specification, any restrictions on
role combinations have been removed, and the following are all
possible:
A device can act as a central and a peripheral at the same time.
A central can be connected to multiple peripherals.
A peripheral can be connected to multiple centrals.
Previous versions of the specification limited the peripheral to a
single central connection (although not conversely) and limited the
role combinations.
You can find out the Bluetooth version of your device via hciconfig -a:-
hci0: Type: Primary Bus: USB
BD Address: 00:11:22:33:44:55 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:736 acl:0 sco:0 events:57 errors:0
TX bytes:5366 acl:0 sco:0 commands:57 errors:0
Features: 0xff 0xff 0xcf 0xfe 0xdb 0xff 0x5b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'uknown'
Class: 0x1c0000
Service Classes: Rendering, Capturing, Object Transfer
Device Class: Miscellaneous,
**HCI Version: 4.0 (0x6) Revision: 0x22bb**
LMP Version: 4.0 (0x6) Subversion: 0x22bb
Manufacturer: Cambridge Silicon Radio (10)
I would recommend using the bluetoothctl utility on Linux to advertise, instead of doing it through hcitool given that hcitool is deprecated and is also not very user friendly. More information on using bluetoothctl to advertise and accept incoming connections can be found here:-
BlueZ: How to set up a GATT server from the command line

MVC App and API Communication Issue on Local IIS with Client Authentication

I have inherited an ASP.NET MVC Application and an ASP.NET Web Api which both use SSL along with the api requiring client certificates. Both have been in production for over a year now with minor changes.
For development everything was originally set up with IIS Express and everything worked fine but now I have a requirement to move the local dev environment out of IIS Express and into Local IIS. My problem is all requests from the app to the api are failing with my setup.
I think I have my IIS (Windows 7 IIS 7.5) setup correct but it’s possible I could have something wrong. I have two different sites running on different ports for the api and app as well as what looks to be the appropriate settings for SSL and one to one mapping. Both sites have different app pools with two local users setup (I tried NetworkService originally). I added two domains to my host file (localapp.com and localapi.com) and I created two certificates for both domains with makecert. The api certificate is marked for server authentication and the app certificate is marked for server and client authentication (I have tried separate certificates for both purposes). The two SSL certificates have private keys that were marked as exportable when added to the certificate store and I have given private key permissions to the two local accounts. My self-signed root certificate is added to the LocalMachine root certificate store and the two site certificates (signed with the root certificate) are in the LocalMachine personal store. I can connect to both sites independently and don’t receive any warnings about certificate errors.
If I access an api URL through Chrome I can select the appropriate client certificate and see the JSON data expected. Accessing the app is similar in that I don’t get any certificate warnings but no data is being returned in any api calls it makes.
The app is using RestSharp for its HTTP requests and I have verified through debugging that the correct client certificate is being added to the request and a private key does exist. The code that is adding the certificate to the request should be fine since it has been running for over a year and nothing has changed. Every api request from the app returns
“System.ComponentModel.Win32Exception: The credentials supplied to the package were not recognized”
and
“The request was aborted: Could not create SSL/TLS secure channel.”
If I look into the network trace I get the following in regards to the localapp.com certificate…
System.Net Information: 0 : [6564] SecureChannel#37489757 - Left with 1 client certificates to choose from.
System.Net Information: 0 : [6564] SecureChannel#37489757 - Trying to find a matching certificate in the certificate store.
System.Net Information: 0 : [6564] SecureChannel#37489757 - Locating the private key for the certificate: [Version]
V3
[Subject]
CN=localapp.com
Simple Name: localapp.com
DNS Name: localapp.com
[Issuer]
CN=DevRoot
Simple Name: DevRoot
DNS Name: DevRoot
[Serial Number]
975C024DB7A08A9A48BE78F3382D4A93
[Not Before]
12/31/2015 11:00:00 PM
[Not After]
12/30/2039 11:00:00 PM
[Thumbprint]
28F3032F0E6ED488CFFE6706D3B17F851EFE1860
[Signature Algorithm]
sha512RSA(1.2.840.113549.1.1.13)
[Public Key]
Algorithm: RSA
Length: 4096
Key Blob: 30 82 02 0a 02 82 02 01 00 a9 c2 27 fc 60 11 1d 99 fe 1e e7 fb 05 b4 75 33 4a e3 d5 33 15 0c 9d 72 6a 3a df e2 58 49 20 34 39 59 77 7e 85 f7 fa 93 53 92 1d fa 63 32 98 b1 66 74 b6 60 23 e2 2b 97 f6 d9 ce bb 0a 1a ae 2f c8 a1 44 6f 60 12 9a bd b6 33 87 90 8d 1c 1f 61 7e f5 85 41 de 30 11 78 01 72 6b eb 77 8e 1b 9f 58 45 f6 ad 0d d3 2d ec 59 1d 63 2a 18 2f 77 87 6c a3 fe ee 68 2e 12 94 6a d5 ce 69 77 98 f2 14 bd bb ff eb 49 ac 1d a5 06 bf 97 51 0e 36 e6 8f 55 45 a3 91 29 77 94 93 1a 78 54 ....
System.Net Information: 0 : [6564] SecureChannel#37489757 - Certificate is of type X509Certificate2 and contains the private key.
System.Net Information: 0 : [6564] AcquireCredentialsHandle(package = Microsoft Unified Security Protocol Provider, intent = Outbound, scc = System.Net.SecureCredential)
System.Net Error: 0 : [6564] AcquireCredentialsHandle() failed with error 0X8009030D.
System.Net Information: 0 : [6564] AcquireCredentialsHandle(package = Microsoft Unified Security Protocol Provider, intent = Outbound, scc = System.Net.SecureCredential)
System.Net Error: 0 : [6564] AcquireCredentialsHandle() failed with error 0X8009030D.
System.Net.Sockets Verbose: 0 : [16268] Socket#3648821::Dispose()
System.Net Error: 0 : [16268] Exception in HttpWebRequest#16098066:: - The request was aborted: Could not create SSL/TLS secure channel..
System.Net Verbose: 0 : [16268] HttpWebRequest#16098066::EndGetResponse()
System.Net Error: 0 : [16268] Exception in HttpWebRequest#16098066::EndGetResponse - The request was aborted: Could not create SSL/TLS secure channel..
The trace log looks like I don’t have permissions set up correctly but I have explicitly given the local users permissions to the private keys for both the app and api certificates. Everyone else with the 0X8009030D error looks to have solved the issue by adding the app pool user to the private key permissions. If I go to Manage Private Keys in the MMC snap in for the localapp.com certificate I see my LocalApp and LocalApi users having read permissions.
I am completely out of ideas on things I can try to get the communication to work. It is probably something very simple but no matter what I try it just won’t work.
Anyone ever try this set up before and have success or anyone have ideas I can try to get this working?
Any help is greatly appreciated.
Thanks in advance!
-Aaron

Socat serial port sniffing

I'm currently trying to access data on both directions of a serial port connected to an an app.
What i'm trying to do is:
ttymxc0 <-----> socat sniff <------> ttyV0 <------> Application
ttymxc0 is the real port and ttyV0 is the virtual one.
I found that socat command that worked on Ubuntu 16.04:
http://www.iheartrobotics.com/2010/02/debugginng-serial-interfaces.html
But when i use it on an embedded system using buildroot, i obtain this error:
socat -d /dev/ttymxc0,raw,echo=0 SYSTEM:'tee input.txt | socat - "PTY,link=/tmp/ttyV0,raw,echo=0,waitslave" | tee output.txt'
socat[3167.1996369920] E address "GOPEN..." in intermediate context, leftdirs=4, rightdirs=7, with 1 parameter(s) is not available
socat[3167.1996369920] W cannot restore terminal settings on fd 3: Bad file descriptor
I tried to look on the access properties of my files without success. It works when you don't ask to print input and output, but that's not useful for my usage
Any ideas of what could be different between buildroot and Ubuntu in this case?
You already answered your own question, but this a slightly modernized answer is:
$ socat -x -v /dev/ttyUSB0,rawer,b115200,crnl PTY,link=ttyV1,rawer,crnl
< 2022/01/12 15:34:47.845709 length=11 from=0 to=10
65 63 68 6f 20 48 65 6c 6c 6f 0a echo Hello.
--
> 2022/01/12 15:34:47.847937 length=12 from=0 to=11
65 63 68 6f 20 48 65 6c 6c 6f 0d 0a echo Hello..
--
> 2022/01/12 15:34:47.876068 length=7 from=12 to=18
48 65 6c 6c 6f 0d 0a Hello..
--
> 2022/01/12 15:34:47.905274 length=1 from=19 to=19
24 $
--
From the socat manual:
-v "Writes the transferred data not only to their target streams, but also to stderr. The output format is text with some conversions for readability, and prefixed with "> " or "< " indicating flow directions."
raw is obsolete and rawer "makes terminal rawer than raw option. This option implicitly turns off echo."
b115200 "sets the serial line speed to 115200 baud" which is a quite common settings. Of course set the correct one for your case.
Diego's answer is great if you're fine with socat's -v output format. However, if you'd prefer creating a separate device that's just a read-only version of the original device like myself - say, so that you can open minicom on the read-only device and let other software interact with the read-write device normally - I just came up with the following that works nicely.
socat /dev/ttyUSB0,rawer SYSTEM:'tee >(socat - "PTY,link=/tmp/foobar-ro,rawer" >%-) | socat - "PTY,link=/tmp/foobar-rw,rawer,wait-slave"'
That's complicated, so I'll break it down a bit. Logically it's this:
socat /dev/ttyUSB3,rawer SYSTEM:'tee [READ-ONLY PTY] | [READ-WRITE PTY]'
And it works roughly like so:
The first socat command sets up a bidirectional pipe between the first address (/dev/ttyUSB0) and second (the SYSTEM command).
Inside the SYSTEM command now, tee duplicates its stdin (i.e. the output of /dev/ttyUSB0) to both [READ-ONLY PTY] and to its own stdout, which we then pipe to [READ-WRITE PTY].
[READ-ONLY PTY] is created with a 2nd socat command where the first address is - (shorthand for socat's STDIO address type) and the second is a new PTY. We also make sure to close this 2nd socat command's stdout with >%-; this is what makes it read-only.
For a reason I don't quite understand, unless the 2nd socat's stdout is closed, tee seems to include the output from the process substitution in its own output. I'm not sure why tee would be reading from its arguments at all.
Finally, [READ-WRITE PTY] is created with a 3rd socat command similar to the 2nd. This 3rd socat's stdout becomes the output of the SYSTEM address in the 1st socat and is fed to the original device's input, completing the loop.

how can I use GATT_Notification command with BTool

im using BTool to send commands to CC2540 bluetooth module. I want to get notifications. when I send notification command, btool displayed the sent command
[43] : <Tx> - 11:11:47.051
-Type : 0x01 (Command)
-OpCode : 0xFD9B (GATT_Notification)
-Data Length : 0x06 (6) byte(s)
ConnHandle : 0x0000 (0)
Authentic : 0x00 (0) (No)
Handle : 0x1B00 (6912)
Value : 00:50
Dump(Tx):
0000:01 9B FD 06 00 00 00 1B 00 50
the values of the Handle (temperature characteristic) and connHandle are correct, but I dont get any response from the server. is there any prior configuration to perform, like enabling notifications somewhere?
You need to enable notification for the characteristic. First you need to query for the client characteristic configuration uuid:
08 1B 00 1C 00 02 29
where first byte is the op read request, next two bytes are you handle id, subsequent two bytes are the range limit (handle id + 1), and the last two bytes are the GATT_CLIENT_CHARAC_CFG_UUID filter. You'll get a response similar to this:
09 04 LL HH 00 00
where the first byte is the response (read by type response), next byte is payload length, LL HH is the configuration characteristic handle, and the last two bytes are it's value.
At this step you can enable the notification by writing a 0x0001 to this handle id:
12 LL HH 01 00
At his point the notification for you characteristic should be enabled.

An unhandled win32 exception occured in w3wp.exe - Windows 8 IIS 8 Classic ASP

I have a website made in classic ASP that I'm trying to migrate from a windows xp development machine to a windows 8 development machine and in production from a Windows Server 2003 machine to Server 2012. We use Crystal Reports Report Application Server 9 to generate reports.
In windows 8 I installed IIS 8 and configured the .NET 2 classic application pool to use 32 bit applications and set the identity to Network Service. I installed CR9 RAS and the 64 bit runtime. When I go to print a report on the website I get this error on the first line that creates a CR object:
An unhandled win32 exception occured in w3wp.exe
I ran DebugDiag and was able to get a crash dump as follows:
In w3wp__.NET v2.0 Classic__PID__2220__Date__10_03_2013__Time_12_59_55PM__954__Second_Chance_Exception_C000041D.dmp the module C:\Windows\System32\user32.dll has caused an access violation exception (0xC0000005) when trying to write to memory location 0x03f77de0 on thread 35
Thread 29 - System ID 2736
Entry point cachemanager!DllUnregisterServer+accd
Create time 9/26/2013 12:30:24 PM
Time spent in user mode 0 Days 0:0:0.0
Time spent in kernel mode 0 Days 0:0:0.0
Full Call Stack
Function Arg 1 Arg 2 Arg 3 Arg 4 Source
cachemanager!DllUnregisterServer+78c5 029e8a63 000e00be 00000081 00000000
user32!UserCallWinProcCheckWow+100 029e8a63 029e8a63 00000000 000e00be
user32!DispatchClientMessage+15d 012a2170 00000000 00000081 00000000
user32!__fnINLPCREATESTRUCT+8d 03fdf6f4 00000000 03fdfc10 770e2bf0
ntdll!KiUserCallbackDispatcher+2e 00000000 0000c083 0000c083 00000000
user32!VerNtUserCreateWindowEx+238 00000000 00000000 80000000 00000000
user32!CreateWindowInternal+26b 0000c083 00000000 80000000 00000000
user32!CreateWindowExW+37 00000000 0000c083 00000000 80000000
cachemanager!DllUnregisterServer+7a3d 00000000 03fdfba8 00000000 80000000
cachemanager!DllUnregisterServer+75d9 00000000 05335d98 05335d98 00000000
cachemanager!DllUnregisterServer+6e94 05335688 00000000 00000000 05335d98
cachemanager!DllUnregisterServer+ad2c 05335d98 03fdfc70 770fbf39 05335d98
kernel32!BaseThreadInitThunk+e 05335d98 8eb1ec43 00000000 00000000
ntdll!__RtlUserThreadStart+72 029ebeab 05335d98 ffffffff 77171df7
ntdll!_RtlUserThreadStart+1b 029ebeab 05335d98 00000000 00000000
Exception Information
In w3wp__.NET v2.0 Classic__PID__356__Date__09_26_2013__Time_12_30_24PM__637__Second_Chance_Exception_C000041D.dmp the module C:\Windows\System32\user32.dll has caused an access violation exception (0xC0000005) when trying to write to memory location 0x04443000 on thread 29
Module Information
Image Name: C:\Windows\System32\user32.dll Symbol Type: PDB
Base address: 0x00905a4d Time Stamp: Thu Sep 20 00:10:05 2012
Checksum: 0x00000000 Comments:
COM DLL: False Company Name: Microsoft Corporation
ISAPIExtension: False File Description: Multi-User Windows USER API Client DLL
ISAPIFilter: False File Version: 6.2.9200.16420 (win8_gdr.120919-1813)
Managed DLL: False Internal Name: user32
VB DLL: False Legal Copyright: © Microsoft Corporation. All rights reserved.
Loaded Image Name: user32.dll Legal Trademarks:
Mapped Image Name: Original filename: user32
Module name: user32 Private Build:
Single Threaded: False Product Name: Microsoft® Windows® Operating System
Module Size: 1.09 MBytes Product Version: 6.2.9200.16420
Symbol File Name: c:\symcache\wuser32.pdb\81836B9A16A64DBBB5209E254A61DD072\wuser32.pdb Special Build: &
It seems that possibly network service doesn't have access to something so I went to the directory CR installs in, the whole C drive, the windows temp folder, and my website folder and gave them all full control from network service with no change.
I tried uninstalling crystal reports and hitting that page to see a different error but I still got the same crash so I'm not sure if it is an actual install issue or something more serious in terms of how I configured IIS or classic ASP for IIS 8.
I am trying sysinternals process monitor now and I'm seeing some buffer overflows but since I don't know how to use the program I'm not sure if it is with this dlls or even from iis.
How can I further debug or solve this issue?
UPDATE:
IO ran sysinternals process monitor and I was able to see when my asp page is hit I get a buffer overflow. After this occurs, when the Crystal Reports DLLs are called it says FILE LOCKED WITH ONLY READERS
It seems that somehow something is locking the files before it even gets to the CR. What could be causing a buffer overflow when visiting these asp pages?

Resources