Author Topic: Using Managed C++ BinaryReader Crashing App  (Read 6356 times)

clattenb

  • Member
  • ***
  • Posts: 2
Using Managed C++ BinaryReader Crashing App
« on: September 16, 2010, 10:22:45 pm »
Hello All,

I am working on a virtual ComPort running through a USB bluetooth adapter to a bluetooth module (from sparkfun.com) hooked up to a microcontroller USART. I'm working on importing a COM C++ class into an Opengl application that I'm also writing. The great news is that the managed C++ COM class can be ran by my Opengl application ( I can tell because the flashing red light turns to a solid green and interrupts are suddenly triggered on my microcontroller). I do have a problem, however, the program does crash when arriving to the binaryreader portion of the code. I get no exceptions or errors, Opengl just opens and crashes with a white screen. All I'm trying to do is read in an unsigned integer into an array using "ReadInt32()".

Any thoughts or suggestions?? I can post/share code if desired, I am curious if anyone has any initial ideas on what is happening first.

-Thanks for all the help.

clattenb

  • Member
  • ***
  • Posts: 2
Re: Using Managed C++ BinaryReader Crashing App
« Reply #1 on: September 17, 2010, 11:14:29 pm »
Just a thought before I shut down shop for the night... Would a flow control error (in programming) be the cause of this crash? It would explain why it thinks forever (20+minutes) before I shut it down and why I never get an error. A blank OpenGL window pops open like it's starting the rendering loop but doesn't go anywhere. Also, I couldn't really find a good example of a .NET hardware flow control example as well as a flow control example for the USART on my microcontroller (an STM32 processor btw). So anything to compare what I wrote to something that actually works would be appreciated.

Any thoughts or ideas are welcome. I just need someone to bounce ideas off of as I don't know of anyone at my University who deals with RS232 communications with both windows and a microcontroller.

Thanks!