EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Segmentation fault at dbConvert.c in Ubuntu 32/64 bit
From: Carsten Winkler <[email protected]>
To: <[email protected]>
Date: Tue, 21 Feb 2017 09:15:15 +0100
I forgot to give you the used db entry. Here it is:

record(waveform, "caLab:waveString")
{
    field(DESC, "String waveform record")
    field(NELM, 48)
    field(FTVL, "STRING")
    field (PINI, "YES")
    field (PREC, 3)
}


Am 20.02.2017 um 15:40 schrieb Carsten Winkler:
> Hi there,
>
> I always run into a  "Segmentation fault" in function "putFloatString" |
> "putDoubleString" of BASE/src/db/dbConvert.c
>
> When I comment out following lines (call of get_precision) everything is
> working again:
> 3947
> 3948
> 4157
> 4158
>
> Test system
> =================================================
> Ubunu 16.04 (64 bit)
> EPICS BASE 3.14.12.6 (64 bit)
>
>
> To check the error, I used this code:
> test.cpp
> =================================================
>
> #include <malloc.h>
> #include <cadef.h>
> //#define DOUBLE
>
> using namespace std;
>
> int main() {
>     chid chanID;
>     int iNumber = 1;
>     int timeout = 0;
>     void *pValue = 0x0;
>
>     ca_context_create(ca_enable_preemptive_callback);
> #if defined DOUBLE
>     pValue = (double*)malloc(iNumber*sizeof(double));
>     for(int i=0; i<iNumber; i++) {
>         ((double*)pValue)[i] = (double)((1+i)*3.1415926535897);
>     }
> #else
>     pValue = (float*)malloc(iNumber*sizeof(float));
>     for(int i=0; i<iNumber; i++) {
>         ((float*)pValue)[i] = (float)((1+i)*3.1415926535897);
>     }
> #endif
>     ca_create_channel("caLab:waveString", 0, 0, 50, &chanID);
>     timeout = 3000;
>     while(ca_state(chanID) != cs_conn && timeout--) {
>         epicsThreadSleep(.001);
>     }
> #if defined DOUBLE
>     ca_array_put(DBR_DOUBLE, 1, chanID, pValue);
> #else
>     ca_array_put(DBR_FLOAT, 1, chanID, pValue);
> #endif
>     ca_context_destroy();
>     free(pValue);
>     return 0;
> }
>
> g++ -I/usr/local/epics/base-3.14.12.6/include/os/Linux
> -I/usr/local/epics/base-3.14.12.6/include -O0 -g3 -Wall -c
> -fmessage-length=0 -MMD -MP -MF"test.d" -MT"test.d" -o "test.o" "test.cpp"
> g++ -L/usr/local/epics/base-3.14.12.6/lib/linux-x86_64 -o "test"
> test.o   -lCom -lca
>
> Any advice to solve this issue?
>
> Best regards
> Carsten Winkler
>
> PS Same problem in 32 bit systems
>
>
> ________________________________
>
> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
>
> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
>
> Aufsichtsrat: Vorsitzender Dr. Karl Eugen Huthmacher, stv. Vorsitzende Dr. Jutta Koch-Unterseher
> Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking
>
> Sitz Berlin, AG Charlottenburg, 89 HRB 5583
>
> Postadresse:
> Hahn-Meitner-Platz 1
> D-14109 Berlin
>
> http://www.helmholtz-berlin.de
>


________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Dr. Karl Eugen Huthmacher, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


Replies:
Re: Segmentation fault at dbConvert.c in Ubuntu 32/64 bit Ralph Lange
References:
Segmentation fault at dbConvert.c in Ubuntu 32/64 bit Carsten Winkler

Navigate by Date:
Prev: Re: Archive-engine compiled for linux-arm (Raspberry Pi) Florian Feldbauer
Next: Re: Segmentation fault at dbConvert.c in Ubuntu 32/64 bit Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Segmentation fault at dbConvert.c in Ubuntu 32/64 bit Carsten Winkler
Next: Re: Segmentation fault at dbConvert.c in Ubuntu 32/64 bit Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024