Comments (8)
I can.
>> load https://private-user-images.githubusercontent.com/16221143/305634607-f28c6104-e97a-4315-a6df-292ac14987bc.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDgxNjU5MDMsIm5iZiI6MTcwODE2NTYwMywicGF0aCI6Ii8xNjIyMTE0My8zMDU2MzQ2MDctZjI4YzYxMDQtZTk3YS00MzE1LWE2ZGYtMjkyYWMxNDk4N2JjLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjE3VDEwMjY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY0NGZmM2YyZmRjMWJmN2YwOTBiYzRiNTkyYmVlYjlmYTEwOWMwNmNkNzZhMTMxZTYwNTI1MmFhNzkwYWI5YTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.w0ZeJG5XjjuZjB-v3S2cZ3ec-N-M6MIhf7DrRsstPa4
*** Runtime Error 1: access violation
*** in file: /d/devel/red/red-src/master/runtime/platform/image-wic.reds
*** at line: 582
***
*** stack: red/OS-image/get-data 91390818 0109FD2Ch
*** stack: red/image/serialize 0527201Ch 0527202Ch false false false 0527202Ch 173 1
*** stack: red/image/mold 0527201Ch 0527202Ch false false false 0527202Ch 191 0
*** stack: red/actions/mold 0527201Ch 0527202Ch false false false 0527202Ch 191 0
*** stack: red/actions/mold* -1 -1 -1 1
*** stack: ctx||627~do-command 057DF680h
*** stack: ctx||627~eval-command 057DF680h
*** stack: ctx||627~run 057DF680h
*** stack: ctx||627~launch 057DF680h
*** stack: ctx||646~launch 057DF06Ch
from red.
Should be fixed by commit 151ab0c.
from red.
I have some troubles reading that file. Most of the time I get a network access error:
*** Access Error: cannot connect: https://private-user-images.githubusercontent.com/16221143/305634607-f28c6104-e9
*** Where: read
*** Near : a: read/binary https://private-user-imag
*** Stack:
from red.
I succeeded in downloading the corruped image and saving it locally. However, making it to crash requires:
mold load/as read/binary %bad.jpg 'jpeg
Using just load
is not enough as it gets rightly rejected:
>> load/as %bad.jpg 'jpeg
*** Access Error: cannot open: %bad.jpg
*** Where: decode
*** Near : codec/decode source
*** Stack: load
while it passes when the input is a binary!
series, but later causes a crash when trying to mold
the resulting image!
value.
from red.
There's still a problem: the invalid image is not triggering an error on load
but only later, when the image is serialized by mold
or form
:
img: load/as read/binary %bad.jpg 'jpeg
probe set/any 'err try [mold img]
gives:
make error! [
code: 513
type: 'access
id: 'bad-media
arg1: none
arg2: none
arg3: none
near: unset
where: 'mold ;-- should error out in `load` instead!
stack: 90247320
]
@qtxie If there's no other way to check in image/decode
if the image is valid or not, maybe we should add a call to lock-bitmap
and unlock-bitmap
at the end of the loading, to trigger the error there when the image is invalid?
from red.
@dockimbel The WICBitmap API delays the real decoding until it actually need to reads the bitmap data. After the image is loaded, it only decodes the metadata of the image. So img/size
works.
Yes. we need to call lock-bitmap and unlock-bitmap to trigger the decoding.
from red.
That commit is referencing the wrong issue, just ignore it.
from red.
This issue may be closed now.
from red.
Related Issues (20)
- VID actors syntax errors are not caught
- Native builds do not run under Windows XP even with WindowsXP target: calls D3D11 which is not supported on XP HOT 5
- Promotion inconsistency in `min/max pair float`
- Using point2D! as SIZE for a TAB-PANEL makes its children not to be shown.
- GROUP-BOX frame is not always conforming to its size. HOT 3
- view in 0.65 : word result is not local
- False Positive! HOT 1
- Inside part of TAB-PANELs do not resize. HOT 2
- Extra slashes in file/url composition
- The IMAGE STYLE doesn't get its face color. HOT 9
- Custom panel actors completely overwrite the actors object. HOT 4
- MSDOS support, really? (Feature Request/Fix, or should rename the --target) HOT 6
- Words fail to stay local in blocks evaluated with loop block evaluator: repeat HOT 3
- Words fail to stay local in blocks evaluated with loop block evaluators: foreach HOT 3
- value? fails HOT 8
- WISH: DRAW command PEN should have option DOTTED HOT 3
- Point to point conversions are buggy HOT 1
- VID area blocked and slow on big text HOT 8
- New fix for area does not work with WRAP HOT 10
- `round/even/to` doesn't work on `money!`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from red.