unexpected Bus Error with 'deserializeCudaEngine'

I am using TensorRT3 with Jetpack3.2 on TX2, to optimize SSD Object Detection Pipeline.

I have successfully built the pipeline with TensorRT in following manner:

  1. Parse model using ICaffeParser
  2. Build engine using IBuilder
  3. Serialize it using serialize() method, and then dump it to a binary file

I also have run the inference engine, as follow, to successfully get object detections

  1. reading the binary file and loading the engine Context using deserializeCudaEngine method
  2. finally doing a forward pass using enqueue

Program runs smoothly but, sometimes it crashes at the very start at deserializeCudaEngine with following error

Bus error (core dumped)

Any pointers about the meaning of this error and how to fix this, would be highly appreciated ??


Bus error is usually caused by invalid accessing of memory.
Could you recheck your source code again?

Here is an example for deserializeCudaEngine for your reference: