MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025815Open CASCADE[OCCT] OCCT:Visualizationpublic2015-02-10 19:462015-05-14 16:29
Reporterabv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.9.0 
Summary0025815: Visualization - emit error message in case of texture loading fail
DescriptionCurrently no error message is generated by OCCT visualization in the case if texture used for display of the shape cannot be properly loaded (e.g. due to broken or invalid file). Such message can be output using OCCT messenger mechanism (see Message::DefaultMessenger()).
Steps To ReproduceThere is no need for regular test case.
To reproduce issue see attached file.
Additional information
and documentation updates
The problem was discovered due to use of old FreeImage, in test bugs vis bug24376
TagsNo tags attached.
Test case numberNot needed
Attached Files? file icon bug25815 (154 bytes) 2015-04-15 12:53

- Relationships

-  Notes
(0039345)
git (administrator)
2015-04-08 10:17

Branch CR25815 has been created by isz.

SHA-1: 068d0bf657ece56135777cf2b4d1c2e8e73be9c4


Detailed log of new commits:

Author: isz
Date: Wed Apr 8 10:17:10 2015 +0300

    0025815: Visualization - emit error message in case of texture loading fail
    
    Added error message in case when texture cannot be loaded from file.
(0039693)
git (administrator)
2015-04-14 16:56

Branch CR25815 has been updated forcibly by isz.

SHA-1: d4c42ca0e2b743f18d0971fc8cfa9706e7e54174
(0039694)
isz (developer)
2015-04-14 16:57

Dear Kirill,
Please review branch CR25815.
(0039696)
kgv (developer)
2015-04-14 17:08

+  if (aCommandName == "vtexture")
+  {
+    TCollection_AsciiString aTextureArg (theArgsNb > 2 ? theArgv[2] : "");
+    if (aTextureArg.Value(1) != '-' && !aTextureArg.IsIntegerValue())
+    {
+      Image_AlienPixMap aPixMap;
+      if (!aPixMap.Load (aTextureArg))
+      {

Draw Harness command is improper way to handle this issue, and additional image loading call will obviously decrease performance without purpose.
(0039733)
git (administrator)
2015-04-15 10:04

Branch CR25815 has been updated forcibly by isz.

SHA-1: e0f06f0c3a970286a23d366a8a175a8da41e979e
(0039734)
isz (developer)
2015-04-15 10:06

Dear Kirill,
Please review branch CR25815.
(0039736)
kgv (developer)
2015-04-15 10:26

     // unsupported image format
+    ::Message::DefaultMessenger()->Send ("Error: unsupported image format!\nSupported file extensions: 
bmp, ppm, png, jpg, jpe, jpeg, tif, tga, gif, exr.", Message_Fail);

please drop file extensions list and comment before the message.

+    ::Message::DefaultMessenger()->Send ("Error: this file could not be loaded!", Message_Fail);


please include file name into the message
> Error: image file 'FileName' is missing or invalid.

     //anImage = FreeImage_ConvertTo24Bits (anImage);
+     ::Message::DefaultMessenger()->Send ("Error: unsupported image format!\nSupported file 
extensions: bmp, ppm, png, jpg, jpe, jpeg, tif, tga, gif, exr.", Message_Fail);

> Error: image file has unsupported pixel format

-void AIS_TexturedShape::SetTextureFileName (const TCollection_AsciiString& theTextureFileName)

+Standard_Boolean AIS_TexturedShape::SetTextureFileName (const TCollection_AsciiString& theTextureFileName)


please drop modifications in AIS_TexturedShape::SetTextureFileName().

+++ b/tests/bugs/vis/bug25815
@@ -0,0 +1,25 @@
+puts "TODO OCC25815 ALL: Error: unsupported image format!\nSupported file extensions: bmp, ppm, 
png, jpg, jpe, jpeg, tif, tga, gif, exr."

please drop test case simulating failure - tests with TODO are useless.
(0039753)
git (administrator)
2015-04-15 11:43

Branch CR25815 has been updated forcibly by isz.

SHA-1: 0ad3e63457bd7fd9b4ebaebba929254cb0ac2fb2
(0039755)
git (administrator)
2015-04-15 11:57

Branch CR25815 has been updated forcibly by isz.

SHA-1: 18371558018256c929ec8322572ab6d2834213db
(0039758)
isz (developer)
2015-04-15 12:01

Dear Kirill,
Please review branch CR25815.
(0039760)
git (administrator)
2015-04-15 12:05

Branch CR25815 has been updated forcibly by isz.

SHA-1: 08d77ce18efde91310de035f3d878fe2a1f91574
(0039761)
kgv (developer)
2015-04-15 12:05

Please test the patch.
(0039849)
mkv (tester)
2015-04-16 12:53

Dear BugMaster,
Branch CR25815 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 08d77ce18efde91310de035f3d878fe2a1f91574

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 4 (4 on master)
Windows: 0 (0 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed
Test case bug24376 was tested "by hands" - emit error message in case of texture loading fail.
There is no need for regular testing.

Testing on Linux:
occt component :
Total MEMORY difference: 93868590 / 94235765 [-0.39%]
Total CPU difference: 54412.99999999917 / 56192.909999999705 [-3.17%]
products component :
Total MEMORY difference: 23645636 / 23689725 [-0.19%]
Total CPU difference: 17587.04 / 19042.799999999963 [-7.64%]

Testing on Windows:
occt component :
Total MEMORY difference: 57127167 / 57127628 [-0.00%]
Total CPU difference: 15806.629723898948 / 15976.577213298899 [-1.06%]
products component :
Total MEMORY difference: 15476980 / 15478724 [-0.01%]
Total CPU difference: 6294.3751482999705 / 6217.388654799964 [+1.24%]

There are no differences in images found by testdiff.
(0041001)
git (administrator)
2015-05-14 16:29

Branch CR25815 has been deleted by inv.

SHA-1: 08d77ce18efde91310de035f3d878fe2a1f91574

- Related Changesets
occt: master 0c015ee2
Timestamp: 2015-04-15 09:05:11
Author: isz
Committer: bugmaster
Details ] Diff ]
0025815: Visualization - emit error message in case of texture loading fail

Added error message in case when texture cannot be loaded from file.
mod - src/Image/Image_AlienPixMap.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-02-10 19:46 abv New Issue
2015-02-10 19:46 abv Assigned To => kgv
2015-02-10 19:53 abv Relationship added related to 0024376
2015-02-10 20:44 kgv Product Version => 6.8.0
2015-02-10 20:44 kgv Summary Visualization -- error message must be issued if texture loading fails => Visualization - emit error message in case of texture loading fail
2015-02-10 20:44 kgv Steps to Reproduce Updated View Revisions
2015-04-06 13:56 kgv Assigned To kgv => isz
2015-04-06 13:56 kgv Status new => assigned
2015-04-08 10:17 git Note Added: 0039345
2015-04-14 16:56 git Note Added: 0039693
2015-04-14 16:57 isz Note Added: 0039694
2015-04-14 16:57 isz Assigned To isz => kgv
2015-04-14 16:57 isz Status assigned => resolved
2015-04-14 16:57 isz Steps to Reproduce Updated View Revisions
2015-04-14 17:08 kgv Note Added: 0039696
2015-04-14 17:08 kgv Assigned To kgv => isz
2015-04-14 17:08 kgv Status resolved => assigned
2015-04-15 10:04 git Note Added: 0039733
2015-04-15 10:06 isz Note Added: 0039734
2015-04-15 10:06 isz Assigned To isz => kgv
2015-04-15 10:06 isz Status assigned => resolved
2015-04-15 10:26 kgv Note Added: 0039736
2015-04-15 10:26 kgv Assigned To kgv => isz
2015-04-15 10:26 kgv Status resolved => assigned
2015-04-15 11:43 git Note Added: 0039753
2015-04-15 11:57 git Note Added: 0039755
2015-04-15 12:01 isz Note Added: 0039758
2015-04-15 12:01 isz Assigned To isz => kgv
2015-04-15 12:01 isz Status assigned => resolved
2015-04-15 12:05 git Note Added: 0039760
2015-04-15 12:05 kgv Note Added: 0039761
2015-04-15 12:05 kgv Assigned To kgv => bugmaster
2015-04-15 12:05 kgv Status resolved => reviewed
2015-04-15 12:13 mkv Assigned To bugmaster => mkv
2015-04-15 12:53 isz File Added: bug25815
2015-04-15 12:54 isz Steps to Reproduce Updated View Revisions
2015-04-16 12:53 mkv Note Added: 0039849
2015-04-16 12:53 mkv Assigned To mkv => bugmaster
2015-04-16 12:53 mkv Status reviewed => tested
2015-04-16 12:54 mkv Test case number => Not needed
2015-04-17 15:40 bugmaster Changeset attached => occt master 0c015ee2
2015-04-17 15:40 bugmaster Status tested => verified
2015-04-17 15:40 bugmaster Resolution open => fixed
2015-05-14 15:28 aiv Status verified => closed
2015-05-14 15:31 aiv Fixed in Version => 6.9.0
2015-05-14 16:29 git Note Added: 0041001


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker