Recent

Author Topic: Bug in intfgraphics.pas  (Read 9722 times)

andre72

  • New Member
  • *
  • Posts: 33
Bug in intfgraphics.pas
« on: November 23, 2013, 07:50:20 pm »
I get a SIGSEGV exception when loading an image in:
intfgraphics.pas, line 4990. package LCLBase.

This occurs both in my own app _and_ in the image viewer example application (imgview).
The attached bitmaps of playing cards produce the error:  H02.bmp, C04.bmp
The more complex bitmap D13.bmp is loaded correctly (no error).

This freezes all attempts to convert my D7 app to Lazarus.

I am running Lazarus 1.0.14 under Windows 7, 64bits
Is this the right place to post this message?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8114
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Bug in intfgraphics.pas
« Reply #1 on: November 23, 2013, 10:45:43 pm »
Quote
Is this the right place to post this message?
Better post in bugtracker.

Scoops

  • Jr. Member
  • **
  • Posts: 83
Re: Bug in intfgraphics.pas
« Reply #2 on: November 23, 2013, 11:13:37 pm »
Had a bit of the same problem a few years ago.
I changed my images to PNG and everything was
working again, so i never looked at the problem ?
Maybe it was just lucky, but you should still follow
Leledumbo's advice though.

« Last Edit: November 23, 2013, 11:15:17 pm by Scoops »

andre72

  • New Member
  • *
  • Posts: 33
Re: Bug in intfgraphics.pas
« Reply #3 on: November 24, 2013, 11:37:41 am »
Thank you for your answers, they help.

I cannot login to the bugtracker, but will repeat my post as soon as I manage to do so.

How do I mark this issue as solved?
« Last Edit: November 24, 2013, 11:41:32 am by andre72 »

Bart

  • Hero Member
  • *****
  • Posts: 3547
    • Bart en Mariska's Webstek
Re: Bug in intfgraphics.pas
« Reply #4 on: November 24, 2013, 12:28:16 pm »
What's your code for loading it?

Bart

andre72

  • New Member
  • *
  • Posts: 33
Re: Bug in intfgraphics.pas
« Reply #5 on: November 24, 2013, 01:56:26 pm »
What's your code for loading it?

I cannot see any code here.

What I mean is, my questions here have been answered, thanks to you all.
The bug, I am afraid, is there.
I am testing the .png format. Currently not OK.

Bart

  • Hero Member
  • *****
  • Posts: 3547
    • Bart en Mariska's Webstek
Re: Bug in intfgraphics.pas
« Reply #6 on: November 24, 2013, 03:55:39 pm »
What's your code for loading it?
I cannot see any code here.

What I meant was: in your program: how do you load the image?
(Tipically there would be some Image.Picture.LoadfromFile call somewhere?)

I would like to test the image in Lazarus trunk, but I need to know by what means it gets loaded in order to reproduce.

Bart

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Bug in intfgraphics.pas
« Reply #7 on: November 24, 2013, 04:05:30 pm »
@Bart: just tested with Lazarus image viewer according to bug report; added a note there. Thanks.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Bart

  • Hero Member
  • *****
  • Posts: 3547
    • Bart en Mariska's Webstek
Re: Bug in intfgraphics.pas
« Reply #8 on: November 24, 2013, 06:32:27 pm »
You beat me with the backtrace  >:D

Bart

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Bug in intfgraphics.pas
« Reply #9 on: November 24, 2013, 06:34:01 pm »
Well... you can beat me with the solution  :D ....

especially as I'm looking into different stuff:

Meanwhile, I've got some sort of date reading capabilities in fpspreadsheet xls; need to test it with some more files... then on to date writing
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Bart

  • Hero Member
  • *****
  • Posts: 3547
    • Bart en Mariska's Webstek
Re: Bug in intfgraphics.pas
« Reply #10 on: November 24, 2013, 06:57:10 pm »
Well... you can beat me with the solution  :D ....

I couldn't figure it out.
Every attempt I made ends in HeapTrc complaining e.g. "Marked memory at $0236BEC8 invalid".

Bart

andre72

  • New Member
  • *
  • Posts: 33
Re: Bug in intfgraphics.pas
« Reply #11 on: November 24, 2013, 07:55:44 pm »
@Bart, @BigChimp:

I don't know how to express it, but I stand awed by your support.
Cannot imagine why some card bitmaps crash the app, and a more complex, larger one loads ok.
Thanks
Andre

I have tested the issue with .png and ,jpg files, see the bugtracker.
« Last Edit: November 25, 2013, 11:59:19 am by andre72 »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Bug in intfgraphics.pas
« Reply #12 on: November 29, 2013, 07:32:20 am »
Lazarus developer Marc fixed the issue in trunk. @Andre: please test with a recent version (e.g. a snapshot that contains the fix - see bug report) and mark the bug report resolved if it's fixed for you.

Just tested with your playing cards images & it works for me.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

andre72

  • New Member
  • *
  • Posts: 33
Re: Bug in intfgraphics.pas
« Reply #13 on: November 29, 2013, 09:06:30 am »
Lazarus developer Marc fixed the issue in trunk. @Andre: please test with a recent version (e.g. a snapshot that contains the fix - see bug report) and mark the bug report resolved if it's fixed for you.
Just tested with your playing cards images & it works for me.

I am afraid I am not comfortable enough yet with Lazarus to do that right now.  I have however attached the full deck of cards which I am using for further testing should you require it.

FWIW:
First response after posting in the forum...: 3 hours.
Issue solved after posted in bugtracker.....: Five days.

I must repeat it: I stand awed by your commitment and support.
Kudos to you Marc, and to each and everyone of you all.
« Last Edit: November 29, 2013, 09:09:47 am by andre72 »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Bug in intfgraphics.pas
« Reply #14 on: November 29, 2013, 12:34:09 pm »
All's well that ends well ;) and yes, thanks a lot to Marc and Bart.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified