Forum Discussion
roalt
11 years agoHonored Guest
crash at start in _unlock, any ideas?
I've been working on porting some Oculus project from Linux to Windows (32-bit). It includes a connection with a pthread library and some other code.
I used Visual Studio 2012 and a mixture of C and C++. I also recompiled the LibOVR with this compiler (under Debug).
The problem is that my application crashes before it enters the first main, in the following function :
The code where it gets an exception is:
Any magicians on Windows coding with an idea what's wrong? The original codes works under linux...
I used Visual Studio 2012 and a mixture of C and C++. I also recompiled the LibOVR with this compiler (under Debug).
The problem is that my application crashes before it enters the first main, in the following function :
MyApp.exe!OVR::AtomicOpsRaw_4ByteImpl::CompareAndSet_NoSync(volatile long * p, long c, long val) Line 153 C++
The code where it gets an exception is:
void __cdecl _unlock (
int locknum
)
{
/*
* leave the critical section.
*/
LeaveCriticalSection( _locktable[locknum].lock );
}
Any magicians on Windows coding with an idea what's wrong? The original codes works under linux...
3 Replies
- cyberealityGrand ChampionOK, I have create a bug ticket for this.
I'll see if someone on the engineering team can take a look.
Also, can you tell me more about this pthread library? Is it 3rd party code or something you created? Can you think of anything that happens on the start of your app that would trigger this exception? - roaltHonored GuestThe pthreads library I use is found here: http://sourceforge.net/projects/pthreads4w/. I need it as my application makes use of the portaudio library.
I managed to get things working after changing the Subsystem (from empty/not given) in VS2012 to 'Console':<Link>
<SubSystem>Console</SubSsytem>
...
</Link>
One of the remaining issues was that the SensorFusion variable was not initialized properly. By doing this not during initialisation but later on (by first defining a SensorFusion pointer and later allocating it) I circumvented the problem.
It could be that the combination of C and C++ does not work well in my project. - cyberealityGrand ChampionThanks for following up on this.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 10 months ago
- 4 months ago
- 2 years ago