question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught Exception in the Image Loader

See original GitHub issue

Hello,

I have a dicom image that throws an error…

“core.js:19866 ERROR Error: Uncaught (in promise): Error: decodeRGB: rgbBuffer length must be divisible by 3”

if using the following image.

I7.zip

The problem is that the exception is uncaught and i cannot seem to catch it…

image .


dataSet = cornerstone
    .loadImage(imageId)
    .then(r => {})
    .catch(e => {
	console.log(e);
    });
try {
	dataSet = await cornerstone
	    .loadImage(imageId);
} catch (error) {
	console.log(error);
}

The exception is not logged to the console in either case.

Any idea what could be going on and how to correctly handle this error so that my application can continue attempting to load the rest of the images?

Regards

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
malaterrecommented, Mar 31, 2020

@chafey Transfer Syntax in meta header should have been 1.2.840.10008.1.2.4.50 [JPEG Baseline (Process 1): Default Transfer Syntax for Lossy JPEG 8 Bit Image Compression]. This makes the orignal DICOM file illegal (per standard).

0reactions
malaterrecommented, Mar 31, 2020

Tags: Bogus Meta Header / 1.2.840.10008.1.2.1 [Explicit VR Little Endian] But Pixel Data is Encapsulated:

(7fe0,0010) OB                                                    # u/l,1 Pixel Data
  (fffe,e000) ?? []                           # 0,1 Item
  (fffe,e000) ?? ff\d8\ff\e0\00\10\4a\46\49\46\00\01\01\00\00\01\00\01\00\00\ff\fe\00\2d\49\6e\74\65\6c\28\52\29         # 155734,1 Item

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unhandled exception when loading images automatically
Loads up all my images in the Array... and this... picMyShip.Image = Image(CurrentImage). Puts images onto my picture box (runs every 16ms, ...
Read more >
BadImageFormatException Class (System) - Microsoft Learn
The exception that is thrown when the file image of a dynamic link library (DLL) or an executable program is invalid.
Read more >
Allowing cross-origin use of images and canvas - HTML
imageReceived () is called to handle the "load" event on the HTMLImageElement that receives the downloaded image. This event is triggered once ...
Read more >
Issue while uploading images in Forms - Activities
It seems this exception has something to do with the size of the image loaded. I successfully managed to load up a 260kb...
Read more >
Twig LoaderError after upgrading Twig to 2.15.3 - Drupal
Uncaught PHP Exception Twig\\Error\\LoaderError: "Template "@claro/../images/src/hamburger-menu.svg" is not defined in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found