Bug 9347 - drakfont crashes if I run "drakfont --windows_import" (Can't call method "get_fraction" on an undefined value at drakfont line 785)
Summary: drakfont crashes if I run "drakfont --windows_import" (Can't call method "get...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-12 14:46 CET by Perilio Castrol
Modified: 2015-05-19 11:20 CEST (History)
0 users

See Also:
Source RPM: drakxtools-15.27-1.mga3.src.rpm
CVE:
Status comment:


Attachments

Description Perilio Castrol 2013-03-12 14:46:25 CET
Description of problem:
Drakfont crashes if I run "drakfont --windows_import".
I can import fonts from Windows using the graphical interface without any problem.
It happens with a normal user and the root.

Here is the provided backtrace:
The "drakfont" program has crashed with the following error:

  Can't call method "get_fraction" on an undefined value at /usr/sbin/drakfont line 785.
  Perl's trace:
  standalone::bug_handler() called from /usr/sbin/drakfont:785
  main::progress() called from /usr/sbin/drakfont:217
  main::search_windows_font() called from /usr/sbin/drakfont:450
  main::backend_mod() called from /usr/sbin/drakfont:516


How reproducible:
Always

Steps to Reproduce:
1. Open a console
2. Run: drakfont --windows_import



Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2013-03-12 23:32:56 CET

Assignee: bugsquad => thierry.vignaud

Comment 1 Perilio Castrol 2013-04-06 15:38:52 CEST
It also happens in Mageia 2.
Comment 2 Perilio Castrol 2013-05-01 19:24:56 CEST
I've been doing some research:

I made it run well by commenting line 217 of drakfont:

#       progress($pbar, 0.25 / $nb_dir, N("parse all fonts"));

This way the program imports correctly all the Windows fonts. Instead of showing a progress bar it shows a huge amount of messages related to what it is doing.

The arguments used to call the progress function are different if I run it with the GUI of if I do it from console with --windows_import:

--With the GUI: $pbar = Gtk2::ProgressBar=HASH(0x3374a28)
                $nb_dir = 690

--With the option --windows_import: $pbar = undef
                                    $nb_dir = 690


It seems that the progress bar is not defined properly when I run it from console. It might have an easy solution now, but I don't know how to proceed.

Thanks
Thierry Vignaud 2015-05-15 16:50:06 CEST

Summary: drakfont crashes if I run "drakfont --windows_import" => drakfont crashes if I run "drakfont --windows_import" (Can't call method "get_fraction" on an undefined value at drakfont line 785)

Comment 3 Thierry Vignaud 2015-05-19 11:20:16 CEST
Thanks.
Bug fixed in my local git

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.