View Issue Details

IDProjectCategoryView StatusLast Update
0000610Cinelerra-GG[All Projects] Bugpublic2022-04-11 09:13
ReporterAndrew-R Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformppc32OSdebianOS Version8.11
Product Version 
Target VersionFixed in Version 
Summary0000610: Segfault at startup
DescriptionI compiled cinelerra twice for ppc (once on void linux for ppc and second time for Debian 8.11 ppc)
unfortunately, both times she segfaulted at Initializing gui..

I captured gdb log from Debian
Steps To Reproducecompile for ppc (I used emulated mac99 via qemu 5.0)
i need some patches on top of git, and I reordered libav* libs order so my separately compiled static ffmpeg-4.4 can be accepted w/o errors - like libavfilters, then libavfornat then libavcodecs and the rest..)


a lot of everything need to be disabled, but it compiles.
try to launch
Additional Informationvalgrind does not work on both systems
TagsNo tags attached.

Activities

Andrew-R

Andrew-R

2022-04-11 09:13

reporter   ~0005260

here is my test hdd image for qemu-system-ppc

(1.6 gb)

https://cloud.mail.ru/public/3FFj/p2Zn2DhGt
 
sha256sum 5gb_ppc_debian8.qcow.xz
90af1c6479375fcdc3da8962a507d170283d9ad86cf0cf9d47ab27b3ad716c81 5gb_ppc_debian8.qcow.xz
Andrew-R

Andrew-R

2022-04-07 09:43

reporter   ~0005259

ppc hacks relative to git state just before giflib disabling went in

pcc_hacks2_eb92703b.diff (4,835 bytes)
diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile
index 30f5e2c..1c9241b 100644
--- a/cinelerra-5.1/cinelerra/Makefile
+++ b/cinelerra-5.1/cinelerra/Makefile
@@ -434,10 +434,14 @@ endif
 LIBS := $(LIBRARIES)
 
 ifeq ($(WANT_CIN_3RDPARTY),no)
-LIBS += -lavcodec -lavdevice -lavfilter -lavformat -lavutil
+LIBS += -L/root/ffmpeg-4.4/
+LIBS += -lavfilter -lavformat -lavcodec -lavdevice  -lavutil
 LIBS += -lswresample -lswscale
-LIBS += -lintl -liconv
-LIBS += -lexecinfo
+LIBS += -latomic -ljpeg -ltiff -lFLAC -luuid -lsndfile
+LIBS += -l:libtheoraenc.a -l:libtheoradec.a
+LIBS += -lmp3lame -ltwolame
+#LIBS += -lintl -liconv
+#LIBS += -lexecinfo
 
 LIBS += $(shared_libs)
 LIBS += $(system_libs)
@@ -518,7 +522,7 @@ all:	$(OUTPUT) $(CUTADS) $(BDWRITE) $(LV2UI)
 $(OUTPUT): $(OBJS) $(THEME_DATA) $(DCRAW) $(LIBRARIES)
 	$(LINKER) `cat $(OBJDIR)/objs`
 	$(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G))
-	$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
+	# $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
 	ln -f -s ../bin/$(WANT_CIN) ci
 
 ifneq ($(WANT_COMMERCIAL),no)
diff --git a/cinelerra-5.1/cinelerra/ci b/cinelerra-5.1/cinelerra/ci
index bc98783..2285898 120000
--- a/cinelerra-5.1/cinelerra/ci
+++ b/cinelerra-5.1/cinelerra/ci
@@ -1 +1 @@
-../bin/cinelerra
\ No newline at end of file
+../bin/cin
\ No newline at end of file
diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C
index 07cddec..1b18c3a 100644
--- a/cinelerra-5.1/cinelerra/file.C
+++ b/cinelerra-5.1/cinelerra/file.C
@@ -387,7 +387,9 @@ const char *File::default_probes[] = {
 	"PNG",
 	"PPM",
 	"JPEG",
+#if 0
 	"GIF",
+#endif
 	"DPX",
 #ifdef HAVE_OPENEXR
 	"EXR",
@@ -465,6 +467,7 @@ int File::probe()
 			file = new FileJPEG(this->asset, this);
 			return FILE_OK;
 		}
+#if 0
 		if( !strcmp(pref->name,"GIF") ) { // GIF file
 			if( FileGIFList::check_sig(this->asset) )
 				file = new FileGIFList(this->asset, this);
@@ -473,6 +476,7 @@ int File::probe()
 			else continue;
 			return FILE_OK;
 		}
+#endif
 #ifdef HAVE_LIBDPX
 		if( !strcmp(pref->name,"DPX") ) { // DPX file
 			if( !FileDPX::check_sig(this->asset, data) ) continue;
@@ -599,13 +603,14 @@ int File::open_file(Preferences *preferences,
 	case FILE_JPEG_LIST:
 		file = new FileJPEG(this->asset, this);
 		break;
-
+#if 0
 	case FILE_GIF:
 		file = new FileGIF(this->asset, this);
 		break;
 	case FILE_GIF_LIST:
 		file = new FileGIFList(this->asset, this);
 		break;
+#endif
 #ifdef HAVE_LIBDPX
 	case FILE_DPX:
 	case FILE_DPX_LIST:
@@ -1640,7 +1645,7 @@ const char* File::get_prefix(int format)
 	case FILE_FFMPEG:	return "FFMPEG";
 	case FILE_SCENE:	return "SCENE";
 	case FILE_CR2_LIST:	return "CR2_LIST";
-	case FILE_GIF_LIST:	return "GIF_LIST";
+	case FILE_GIF_LIST:	return "ODGIF_LIST";
 	case FILE_DB:		return "DB";
 	case FILE_REF:		return "REF";
 	}
diff --git a/cinelerra-5.1/cinelerra/filegif.C b/cinelerra-5.1/cinelerra/filegif.C
index b80f741..3060219 100644
--- a/cinelerra-5.1/cinelerra/filegif.C
+++ b/cinelerra-5.1/cinelerra/filegif.C
@@ -1,4 +1,4 @@
-
+#if 0
 /*
  * CINELERRA
  * Copyright (C) 2014 Adam Williams <broadcast at earthling dot net>
@@ -572,3 +572,4 @@ GIFUnit::~GIFUnit()
 	delete temp_frame;
 }
 
+#endif
\ No newline at end of file
diff --git a/cinelerra-5.1/guicast/Makefile b/cinelerra-5.1/guicast/Makefile
index 57cfb21..1ad9c34 100644
--- a/cinelerra-5.1/guicast/Makefile
+++ b/cinelerra-5.1/guicast/Makefile
@@ -20,6 +20,17 @@ ifeq ($(OBJDIR), aarch64)
 BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B aarch64 -I binary -O elf64-littleaarch64\""
 endif
 
+ifeq ($(OBJDIR), ppc64)
+BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B powerpc -I binary -O elf64-powerpc\""
+endif
+
+ifeq ($(OBJDIR), ppc)
+BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B powerpc -I binary -O elf32-powerpc\""
+endif
+
+
+
+
 $(shell mkdir -p $(OBJDIR) )
 
 OBJS = \
@@ -96,7 +107,7 @@ OUTPUT = $(OBJDIR)/libguicast.a
 UTILS = $(OBJDIR)/bootstrap $(OBJDIR)/pngtoh $(OBJDIR)/pngtoraw
 BCXFER = xfer/$(OBJDIR)/xfer.stamp
 
-CFLAGS += $(static_incs)
+CFLAGS += $(static_incs) -g -fno-strict-aliasing -Wcast-align
 
 $(shell echo $(CFLAGS) > $(OBJDIR)/c_flags)
 $(shell echo $(OBJS) > $(OBJDIR)/objs)
diff --git a/cinelerra-5.1/guicast/vframe.C b/cinelerra-5.1/guicast/vframe.C
index 8e90cca..19f9cab 100644
--- a/cinelerra-5.1/guicast/vframe.C
+++ b/cinelerra-5.1/guicast/vframe.C
@@ -82,6 +82,9 @@ VFramePng::VFramePng(unsigned char *png_data, double s)
 		((long)png_data[0] << 24) | ((long)png_data[1] << 16) |
 		((long)png_data[2] << 8)  |  (long)png_data[3];
 	if( !s ) s = BC_WindowBase::get_resources()->icon_scale;
+printf("image size in vframe_png %d \n", image_size);
+//	if (image_size !=0)
+	printf("png_data %s\n", png_data+4);
 	read_png(png_data+4, image_size, s, s);
 }
 
pcc_hacks2_eb92703b.diff (4,835 bytes)
Andrew-R

Andrew-R

2022-04-07 09:35

reporter   ~0005258

configure switches I used

ppc.bld (417 bytes)
Andrew-R

Andrew-R

2022-04-07 09:30

reporter  

cingg.log.txt (1,336 bytes)
Starting program: /mnt/cinelerra/cinelerra-5.1/bin/cin 
Failed to read a valid object file image from memory.
warning: Could not load shared library symbols for linux-vdso32.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc-linux-gnu/libthread_db.so.1".
[New Thread 0xa7727410 (LWP 6946)]

Program received signal SIGSEGV, Segmentation fault.
0x107bfa54 in VFramePng::VFramePng (this=0x12cd25c8, 
    png_data=0x94ce0853 <error: Cannot access memory at address 0x94ce0853>, 
    s=0) at vframe.C:82
82			((long)png_data[0] << 24) | ((long)png_data[1] << 16) |
#0  0x107bfa54 in VFramePng::VFramePng (this=0x12cd25c8, 
    png_data=0x94ce0853 <error: Cannot access memory at address 0x94ce0853>, 
    s=0) at vframe.C:82
        image_size = 0
#1  0x107950c8 in BC_Theme::new_image (this=0x12cd2730, title=<optimized out>, 
    path=<optimized out>) at bctheme.C:72
        existing_image = <optimized out>
        result = 0x12cd2590
#2  0x1066e4c4 in Theme::initialize() ()
No symbol table info available.
#3  0x105674f0 in MWindow::init_theme() ()
No symbol table info available.
#4  0x1056ec94 in MWindow::create_objects(int, int, char*) ()
No symbol table info available.
#5  0x10515a00 in main ()
No symbol table info available.
cingg.log.txt (1,336 bytes)

Issue History

Date Modified Username Field Change
2022-04-07 09:30 Andrew-R New Issue
2022-04-07 09:30 Andrew-R File Added: cingg.log.txt
2022-04-07 09:35 Andrew-R File Added: ppc.bld
2022-04-07 09:35 Andrew-R Note Added: 0005258
2022-04-07 09:43 Andrew-R File Added: pcc_hacks2_eb92703b.diff
2022-04-07 09:43 Andrew-R Note Added: 0005259
2022-04-11 09:13 Andrew-R Note Added: 0005260