Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6091799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:22:09+00:00 2026-05-23T12:22:09+00:00

I got a segmentation fault when I attempted to upload an image to my

  • 0

I got a segmentation fault when I attempted to upload an image to my site on Heroku using Carrierwave with Rmagick.

This is part of the error log output:

ruby: jpc_dec.c:1072: jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed.
/app/.bundle/gems/ruby/1.9.1/gems/carrierwave-0.5.4/lib/carrierwave/processing/rmagick.rb:248: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]

After investigation, the segmentation fault occurs because I attempted to upload a JPEG2000 file with a .jpg extension instead of the correct .jp2 extension.

Is this a bug with Rmagick?

More importantly, is it possible to prevent the users of my site from triggering this segmentation fault by sending an image with the wrong extension?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:22:09+00:00Added an answer on May 23, 2026 at 12:22 pm

    I doubt this will be its only error.
    You could use another tool, like ‘file’ to verify the file format.

    Also you should think about a way that makes it possible to recover if ruby crashes.
    You could just run an extra process in the background. But you should make sure that
    you have extra checks in place so that you can respond when someone tries to repeatedly crash your software. Otherwise you’re an easy denial of service target.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a bizarre error here: 882 Segmentation fault ./a.out The segment of code:
I got a segmentation fault when invoked a function immediately following a pointer assignment.
I got a strange segmentation fault when executing recv() function of . Here's the
I've got a bit problem. My program throws segmentation fault when returning zero in
I'm currently getting a very wierd SIGSEGV (Segmentation fault), not using any pointers that
I got this error message from the C++ compiler: CC: Fatal error in ccfe:
I got segmentation fault for the following code, could someone help me understand why?
To my previous question about segmentation fault ,I got very useful answers.Thanks for those
I'm making a matriz multiplication program in OpenMPI, and I got this error message:
I am getting a segmentation fault while running this code. I can't work out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.