Recent

Author Topic: Exception on Raspberry Pi  (Read 4286 times)

jdp

  • Full Member
  • ***
  • Posts: 144
Exception on Raspberry Pi
« on: April 13, 2016, 08:33:15 pm »
Hi all. I am new here and this is my first post.
Hope somebody can help or point me in the correct direction.

I am playing around with Lazarus to see it it will do what I need. I developed a little app on Windows 7 using a MQTT library.

https://github.com/cutec-chris/TMQTTClient

All works 100% I have tested it on Windows 7 and 10 and it runs for days without any problems. The thing is I need it to run on the Raspberry Pi. I need a GUI app to manage and plot data.

I moved the project to the Pi and I got it to compile after I had to comment out some baud rates and force it to use cThreads. It will connect to the server and run for a while but then at random it will get a Access Violation error or just disappear. I have added exception handling in all my code but it seems it is not getting to it.

When I run it in the IDE I will get this error but it seems that is something to do with the debugger.

exception class 'External: SIGSEGV'

At address 76813FB4


I am running on

Rasbian Jessie
Lazarus version 1.2.4
FPC 2.6.4

I am using the package
laz_synapse
LAZ_MQTT
LCL


Kind Regards.

Jaco.
 

ab1jx

  • New Member
  • *
  • Posts: 23
    • Just some photos on Nikonians
Re: Exception on Raspberry Pi
« Reply #1 on: May 04, 2016, 06:29:36 pm »
SIGSEGV is a segmentation fault, it's a standard unix thing.  Usually it means you've tried to access memory outside what's allocated to you, like beyond your original bounds for an array.  Google it.

Stepping through in the debugger should help you find it.  I haven't debugged Lazarus under unix.  With C you get a core file that helps, you can jump right to where it crashed with the segfault.

Just setting up on a Pi here.  But fpc/Lazarus from Debian ports is almost too old to be useful.  I installed fpc, plan to use that to bootstrap fpc from svn, then add Lazarus from svn.  Even the latest fpc release won't cross-compile to Android past 5.0, so essentially any Android made in the last year.
« Last Edit: May 04, 2016, 06:37:11 pm by ab1jx »

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Exception on Raspberry Pi
« Reply #2 on: May 04, 2016, 07:08:40 pm »
@jdp

missing cthreads perhaps ?

 

TinyPortal © 2005-2018