segfault if image file is missed

Bug #1274516 reported by Sergey Alyoshin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gEDA
Fix Released
Undecided
Unassigned

Bug Description

If image file added in schematic with Add / Picture is missed, then gschem
produce segfault then loading such schematic.

gschem version gEDA 1.9.0 (gc095834)

Changed in geda:
status: New → Confirmed
Changed in geda:
status: Confirmed → Fix Committed
Revision history for this message
Peter TB Brett (peter-b) wrote :

Hi Vladimir,

Why did you decide to fix the crash in this way? Neither the commit message nor the patch itself is very illuminating.

I actually disagree with your justification in the patch that "Decision of what to do with any files is not in the competence of
edarenderer." Working out what to do if an image can't be loaded and/or displayed isn't really in the competence of libgeda *or* libgedacairo - ideally, it should be decided by the application that's using the renderer (for example, it might want to supply a different fallback image depending on the current icon theme it's using).

I suppose I'd better file another bug about this.

Thanks,

Peter

tags: added: libgeda libgedacairo
Revision history for this message
Vladimir Zhbanov (vzhbanov) wrote :

Hi Peter,

> Why did you decide to fix the crash in this way? Neither the
> commit message nor the patch itself is very illuminating.

Consider this patch just fixing the bug and restoring an old
behaviour. (and please make allowances for my English, for me
writing texts in English takes more time than writing patches ;)

> I actually disagree with your justification in the patch that
> "Decision of what to do with any files is not in the competence of
> edarenderer." Working out what to do if an image can't be loaded
> and/or displayed isn't really in the competence of libgeda *or*
> libgedacairo - ideally, it should be decided by the application
> that's using the renderer (for example, it might want to supply a
> different fallback image depending on the current icon theme it's
> using).

I believed edarenderer has to display objects, not create them,
right?

OTOH, I didn't want to make graphical output of gschem and gaf
differ (hence changes in libgeda).

But you're probably right. Every program might decide itself, what
it want to do in such a case.

I thought about creating an object similar to OBJ_PLACEHOLDER for
complexes, but thought up nothing worth taking the trouble.

> I suppose I'd better file another bug about this.

Sure.

Revision history for this message
Peter TB Brett (peter-b) wrote :

Okay, that makes sense. Thank you for the explanation! Was it my big in the first place? It looks like it might have been…

Peter TB Brett (peter-b)
Changed in geda:
milestone: none → 1.9.1
Peter TB Brett (peter-b)
Changed in geda:
status: Fix Committed → Fix Released
Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

Bug was fixed by a commit
git master commit 171a12172eb4efb8ccb2b3534a6911d8584b0306
http://git.geda-project.org/geda-gaf/commit/?id=171a12172eb4efb8ccb2b3534a6911d8584b0306

commit 171a12172eb4efb8ccb2b3534a6911d8584b0306
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    libgeda: fix segfault on failing to load picture

    The functionality of fallback picture loading is moved back to libgeda.
    Decision of what to do with any files is not in the competence of
    edarenderer.

    Closes-bug: lp-1274516
    Reported-by: Sergey Alyoshin <email address hidden>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.