4

I am using Rebol3 (Version: 2.101.0.4.20) on my RaspberryPi and each time I try to save an image to the filesystem it crashes with a Seg Fault:

save %test.png make image! [1024x768]

Can someone explain why? Any hints to solve this?

TGD
  • 175
  • 1
  • 5
  • I don't have a RaspberryPi so I can't test, but others have them. Is it the save that causes the problem, or the `make image`? If you reduce it down to say a 1x1 image is it still a problem? What directory are you in, and do ordinary saves (such as text files) work? – HostileFork says dont trust SE Jul 29 '13 at 22:44
  • Yes, it is the save that causes the problem. I'll check later if saving smaller images or ordinary saves causes a Seg Fault too. The working directory is beneath /home/pi and r3 has been started as user pi. – TGD Jul 30 '13 at 05:02
  • I'll do some testing with my pi (running raspbmc) and let you know if the behaviour is the same. Have you tried with `trace on` to see if you can see what happens just before the crash? – johnk Jul 30 '13 at 06:56
  • could it be a missing or incompatible png library on the os? – moliad Jul 30 '13 at 16:11
  • Checked again with `trace on`. It seems that `do-decode` causes the segmentation fault. @johnk thanx for the bitmap file work around. – TGD Jul 30 '13 at 19:34
  • Is JPEG a valid filetype for save? On RasPi .jpg fails too: `>> save %test.jpg make image! [1024x768]` `** Access error: bad media data (corrupt image, sound, video)` `** Where: do-codec all encode if save` `** Near: do-codec cod/entry 'encode data` – TGD Jul 30 '13 at 19:41
  • 1
    I raised a bug for this on curecode http://curecode.org/rebol3/ticket.rsp?id=2040 It looks like there are jpeg problems as well (at least no segfault). Moliad - I had a quick look at the source and this is all pure rebol c code, no dependencies. – johnk Jul 31 '13 at 09:45
  • FYI there is an active Rebol chat room in this stack overflow site http://chat.stackoverflow.com/rooms/291/rebol-and-red – johnk Jul 31 '13 at 11:25

2 Answers2

3

Seems to be a Rebol 3 linux bug as this works fine under Windows. Reproduced on x86 linux and raspberry pi. As a possible work around you can generate bmp files correctly.

save %test.bmp make image! [1024x768]

johnk
  • 1,102
  • 7
  • 12
0

FWIW, I just tried this on Atronix's recent build running on Ubuntu 16.04 on an ODROID-C1+ ARM/Linux board:

** Version: 3.0.99.4.20 ** ** Platform: Linux libc6-arm ** ** Build: 20-Jul-2018/19:57:26 **

I was able to save PNG and BMP files using 'to-image on a gob! and also using 'make image! [1024x768]

Respectech
  • 454
  • 4
  • 13