Comments (18)
Can you give any more information? Does it display the image? Do you have other
images in the directory? What happens if you open those other images otherwise?
Because if you read back your recipe, as you might imagine, if _I_ carry out
those
steps, it works just fine.
Original comment by [email protected]
on 27 Nov 2007 at 4:29
from stb-imv.
Original comment by [email protected]
on 27 Nov 2007 at 4:29
from stb-imv.
> Can you give any more information? Does it display the image?
Yes, it displays the image. The crash occurs when I press the space or
backspace keys.
> Do you have other images in the directory? What happens if you open those
other
images otherwise?
Nop, just a JPEG I copied to the folder where I unpacked the .zip.
> Because if you read back your recipe, as you might imagine, if _I_ carry out
those
steps, it works just fine.
I'll attach the image but I really don't have any more details to give you.
Maybe
it's something I have installed but don't know what would it be.
Original comment by [email protected]
on 27 Nov 2007 at 4:36
Attachments:
from stb-imv.
I don't know if this helps you but Visual Studio tells me this:
Unhandled exception at 0x7c80eadf in imv.exe: 0xC0000005: Access violation
reading
location 0xfffffffe.
7C80EAC3 lea eax,[ebp-294h]
7C80EAC9 push eax
7C80EACA call dword ptr ds:[7C801040h]
7C80EAD0 movzx eax,word ptr [ebp-294h]
7C80EAD7 mov ecx,dword ptr [ebp-290h]
7C80EADD shr eax,1
crash here >> 7C80EADF cmp word ptr [ecx+eax*2-2],2Eh
7C80EAE5 lea eax,[ebp-2A8h]
7C80EAEB push eax
7C80EAEC lea eax,[ebp-280h]
7C80EAF2 push eax
7C80EAF3 lea eax,[ebp-27Ch]
7C80EAF9 push eax
7C80EAFA push edi
7C80EAFB sete byte ptr [ebp-285h]
7C80EB02 call dword ptr ds:[7C80113Ch]
7C80EB08 test al,al
7C80EB0A je 7C83509F
7C80EB10 mov eax,dword ptr [ebp-280h]
7C80EB16 mov edx,dword ptr [ebp-278h]
Original comment by [email protected]
on 27 Nov 2007 at 4:38
from stb-imv.
works for me :(
but ow my eyes.
if you press 'h', in the top block of text there may or may not be some lines
starting with "using"... one is gdi+, the other is freeimage. are either of
those
present?
Original comment by [email protected]
on 27 Nov 2007 at 4:55
from stb-imv.
Using GDI+.
Original comment by [email protected]
on 27 Nov 2007 at 5:07
from stb-imv.
Do you have a debug build available? That way I may give you more information.
Original comment by [email protected]
on 27 Nov 2007 at 5:15
from stb-imv.
I can't find the code in your dump in my code (although I don't have the best
search
tools), so I wonder if this is something in a DLL. The only DLLs being used are
GDI+
and the CRT, so I've produced a build that statically links the CRT.
It's attached; if you could test it, we can figure out whether it's the CRT or
not.
If that's no good, I'll give you the debug build.
Original comment by [email protected]
on 27 Nov 2007 at 5:17
Attachments:
from stb-imv.
By the way, the main thing that happens when you press space/backspace is that
it
scans the directory for other image files (it doesn't bother doing that until it
thinks you're going to look at more than one file). So that's the most likely
culprit, right now.
Have you tried doing other things like resizing the image?
Original comment by [email protected]
on 27 Nov 2007 at 5:18
from stb-imv.
Oh yeah, I forgot to mention, after you run, open the preferences (type 'p'),
and
check the bottom check mark (use only stb_image loaders); that will avoid using
gdi+
as well.
Original comment by [email protected]
on 27 Nov 2007 at 5:20
from stb-imv.
Ok. The crash is happening in stb.h function stb_wildmatchi line 5278.
#ifdef _WIN32
strcpy(buffer+n, "*.*");
ws = stb__from_utf8(buffer);
here >> z = _wfindfirst(ws, &data);
#else
z = opendir(dir);
#endif
The debugger doesn't show me what is "ws" (weird) but for "data" it shows me:
- data {attrib=1030 time_create=3161095929856 time_access=3161095930886 ...}
_wfinddata64i32_t
attrib 1030 unsigned int
time_create 3161095929856 __int64
time_access 3161095930886 __int64
time_write 26214417 __int64
size 0 unsigned long
+ name 0x0012dd2c "" wchar_t [260]
By the way, I'm using Visual Studio 2005, maybe is because the crt version?
Original comment by [email protected]
on 27 Nov 2007 at 3:10
from stb-imv.
Also, if I open the preferences dialog and click OK it crashes in the same
function
also. Clicking cancel works.
Zooming (with mouse wheel or Ctrl +) works fine.
Original comment by [email protected]
on 27 Nov 2007 at 3:28
from stb-imv.
Did you try the version I posted above, which has a statically linked CRT?
Also, the code you're quoting is from readdir_raw() far before it calls
stb_wildmatchi. "data" is uninitialized because it's just used as a return
value from
_wfindfirst; ws is just a unicode string so there's unlikely to be a problem
there.
Also, I don't think that line of code corresponds to where it crashed; maybe it
crashed inside _wfindfirst? The crash line involved a comparison against 0x2e
or 46
or '.' which was then being passed to another function call as a boolean, which
I
don't see happening in wildmatch. The one place I do it is in stb_replaceext,
and
it's even the fourth parameter of a function like your example is, but it's a
16-bit
unicode compare, and mine isn't, plus mine is missing some of the other setup.
So
that points again at _wfindfirst/_wfindnext, since those are unicode (16-bit).
So it's certainly still possible there's a bug in imv(stb), but my best guess
right
now is that there's a problem with the CRT version you have.
Original comment by [email protected]
on 27 Nov 2007 at 7:44
from stb-imv.
Bah, non-editable comments.
I meant to say:
"I don't think that line of code corresponds to the assembly you showed in your
original crash; ..."
"The one place in my code this exists is in stb_replaceext, which _isn't even
called_
anywhere in imv(stb)".
Original comment by [email protected]
on 27 Nov 2007 at 7:52
from stb-imv.
I've find out why it's happening. I was testing it on a folder on my desktop
which
has this path:
C:\Documents and Settings\Julio César\Desktop\stb_imv
Notice the accent in César. I've seen this problem in other programs. They
just don't
support unicode correctly, emacs for example creates another folder like
C:\Documents
and Settings\Julio C|sar or something.
I moved the folder to C:\stb_imv and the crash doesn't happen there.
About your last comments...
I used the executable you provided and attached the source code from
stb_imv_src-0.96.zip.
Yes, the crash is in CRT but I went back the call stack to the place in your
code
because it didn't seemed that was the problem. Anyway, here's the complete call
stack
just in case:
> msvcr80.dll!_crt_debugger_hook(int _Reserved=4313874) Line 65 C
msvcr80.dll!_invalid_parameter(const wchar_t * pszExpression=0x00000000, const
wchar_t * pszFunction=0x00000000, const wchar_t * pszFile=0x00000000, unsigned
int
nLine=0, unsigned int pReserved=0) Line 86 + 0x7 bytes C++
msvcr80.dll!_wfindfirst64i32(const wchar_t * szWild=0x00000000, _wfinddata64i32_t *
pfd=0x0012dd10) Line 79 + 0x1b bytes C
stb_imv.exe!readdir_raw(char * dir=0x00000000, int return_subdirs=4294849, char *
mask=0x00000000) Line 5309 + 0xf bytes C
user32.dll!7e418bd9()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
stb_imv.exe!advance(int dir=0) Line 1498 + 0x5 bytes C
stb_imv.exe!MainWndProc(HWND__ * hWnd=, unsigned int uMsg=, unsigned int wParam=,
long lParam=) Line 2294 C
ntdll.dll!7c91b5f4()
ntdll.dll!7c91b5f4()
ntdll.dll!7c96d886()
ntdll.dll!7c949d18()
ntdll.dll!7c91b686()
ntdll.dll!7c9131dc()
ntdll.dll!7c913212()
ntdll.dll!7c913281()
ntdll.dll!7c913288()
ntdll.dll!7c94a1f5()
ntdll.dll!7c949b34()
ntdll.dll!7c926a44()
ntdll.dll!7c926abe()
user32.dll!7e46bbc6()
user32.dll!7e46bc50()
user32.dll!7e42dd5c()
ntdll.dll!7c94a1f5()
ntdll.dll!7c96cde9()
ntdll.dll!7c926abe()
ntdll.dll!7c96cde9()
ntdll.dll!7c96e0f0()
ntdll.dll!7c96e0d4()
ntdll.dll!7c96cde9()
ntdll.dll!7c96e0d4()
ntdll.dll!7c94a5d0()
ntdll.dll!7c91b686()
ntdll.dll!7c91b298()
ntdll.dll!7c9106eb()
MSCTF.dll!74724636()
ntdll.dll!7c94a1f5()
ntdll.dll!7c91b5f4()
ntdll.dll!7c91b686()
MSCTF.dll!74730e6c()
MSCTF.dll!74730e71()
MSCTF.dll!747309a9()
MSCTF.dll!74730e71()
user32.dll!7e41f84a()
user32.dll!7e41f7f6()
user32.dll!7e41f805()
user32.dll!7e41f805()
user32.dll!7e41f94b()
ntdll.dll!7c90e9ab()
kernel32.dll!7c8094e2()
kernel32.dll!7c809524()
kernel32.dll!7c809512()
user32.dll!7e4193a8()
user32.dll!7e4195f9()
kernel32.dll!7c80261a()
kernel32.dll!7c8025f0()
ntdll.dll!7c96cde9()
kernel32.dll!7c8025f0()
ntdll.dll!7c91b686()
ntdll.dll!7c96d8a2()
ntdll.dll!7c96d886()
MSCTF.dll!7473e951()
ntdll.dll!7c90d592()
kernel32.dll!7c809b8b()
MSCTF.dll!747215d9()
MSCTF.dll!7473fe87()
MSCTF.dll!74725874()
ntdll.dll!7c96d886()
ntdll.dll!7c949d18()
ntdll.dll!7c91b686()
ntdll.dll!7c96e0f0()
ntdll.dll!7c96e0d4()
ntdll.dll!7c926abe()
ntdll.dll!7c96e0d4()
ntdll.dll!7c94a5d0()
ntdll.dll!7c926abe()
ntdll.dll!7c96e0d4()
ntdll.dll!7c926a44()
ntdll.dll!7c926abe()
kernel32.dll!7c8025f0()
ntdll.dll!7c926abe()
ntdll.dll!7c96cde9()
ntdll.dll!7c96e0f0()
ntdll.dll!7c96e0d4()
MSCTF.dll!74754c96()
user32.dll!7e4184fc()
user32.dll!7e4185a4()
ntdll.dll!7c96e0d4()
ntdll.dll!7c94a5d0()
ntdll.dll!7c926abe()
user32.dll!7e41d559()
MSCTF.dll!7473fbb0()
MSCTF.dll!7473fbbb()
ntdll.dll!7c90e2f1()
kernel32.dll!7c8024b7()
MSCTF.dll!74754c96()
MSCTF.dll!74755225()
ntdll.dll!7c9137ab()
ntdll.dll!7c9137c7()
ntdll.dll!7c9137ab()
ntdll.dll!7c9137c7()
MSCTF.dll!74724636()
MSCTF.dll!7473b1d8()
user32.dll!7e41f896()
MSCTF.dll!74730e6c()
MSCTF.dll!74730e71()
user32.dll!7e41f896()
MSCTF.dll!74730e6c()
MSCTF.dll!74730e71()
user32.dll!7e418734()
user32.dll!7e418816()
user32.dll!7e41f95b()
user32.dll!7e4189cd()
user32.dll!7e42e051()
user32.dll!7e4196c7()
stb_imv.exe!WinMain(HINSTANCE__ * hInstance=, HINSTANCE__ * hPrevInstance=, char *
lpCmdLine=, int nCmdShow=) Line 2751 C
ntdll.dll!7c915af1()
ntdll.dll!7c915b4f()
ntdll.dll!7c915a00()
ntdll.dll!7c915a65()
kernel32.dll!7c80a1f4()
kernel32.dll!7c80a1f4()
ntdll.dll!7c915041()
ntdll.dll!7c915233()
ntdll.dll!7c9155c9()
ntdll.dll!7c915152()
ntdll.dll!7c915d7d()
ntdll.dll!7c915db4()
ntdll.dll!7c9153f5()
ntdll.dll!7c915af1()
ntdll.dll!7c915b4f()
ntdll.dll!7c91b5f4()
ntdll.dll!7c91b686()
ntdll.dll!7c915707()
ntdll.dll!7c915a00()
ntdll.dll!7c915a65()
ntdll.dll!7c915a00()
msvcr80.dll!__crtLCMapStringA(localeinfo_struct * plocinfo=0x7c91652e, unsigned
long Locale=1, unsigned long dwMapFlags=1242132, const char *
lpSrcStr=0x0012f401,
int cchSrc=2089924096, char * lpDestStr=0x7c91657e, int cchDest=0, int
code_page=0,
int bError=2) Line 376 + 0x20 bytes C++
ntdll.dll!7c915db4()
ntdll.dll!7c96d886()
ntdll.dll!7c91657e()
ntdll.dll!7c91659e()
kernel32.dll!7c80e494()
kernel32.dll!7c80e4a4()
kernel32.dll!7c80e4a4()
kernel32.dll!7c80e5ab()
kernel32.dll!7c80e62b()
kernel32.dll!7c80e5ab()
kernel32.dll!7c80e62b()
ntdll.dll!7c926a44()
ntdll.dll!7c926abe()
ntdll.dll!7c91b686()
ntdll.dll!7c91b298()
ntdll.dll!7c9106eb()
ntdll.dll!7c96e0f0()
ntdll.dll!7c96e0d4()
ntdll.dll!7c94a1f5()
ntdll.dll!7c91b5f4()
ntdll.dll!7c91b686()
ntdll.dll!7c94a5d0()
ntdll.dll!7c94a1f5()
ntdll.dll!7c91b5f4()
ntdll.dll!7c91b686()
ntdll.dll!7c919bd3()
ntdll.dll!7c95db5c()
ntdll.dll!7c96cd11()
ntdll.dll!7c96e6a9()
ntdll.dll!7c96e707()
ntdll.dll!7c96e707()
ntdll.dll!7c94976b()
msvcr80.dll!_msize(void * pblock=0x00000013) Line 88 + 0xe bytes C
msvcr80.dll!_unlockexit() Line 760 + 0x7 bytes C
msvcr80.dll!_onexit(int (void)* func=0x0012fa58) Line 94 + 0x5 bytes C
ntdll.dll!7c91b686()
ntdll.dll!7c96d8a2()
ntdll.dll!7c96d886()
ntdll.dll!7c96d886()
ntdll.dll!7c949d18()
ntdll.dll!7c91b686()
ntdll.dll!7c91cbf2()
ntdll.dll!7c92173e()
ntdll.dll!7c921788()
ntdll.dll!7c949b34()
ntdll.dll!7c926a44()
ntdll.dll!7c926abe()
ntdll.dll!7c914481()
ntdll.dll!7c913212()
ntdll.dll!7c926abe()
ntdll.dll!7c96cde9()
ntdll.dll!7c91b686()
ntdll.dll!7c91b298()
ntdll.dll!7c9106eb()
kernel32.dll!7c80b9e6()
kernel32.dll!7c862aad()
ntdll.dll!7c96e0d4()
ntdll.dll!7c94a5d0()
ntdll.dll!7c926abe()
kernel32.dll!7c844709()
ntdll.dll!7c95db5c()
ntdll.dll!7c926abe()
ntdll.dll!7c9268ad()
ntdll.dll!7c91056d()
ntdll.dll!7c96e707()
ntdll.dll!7c9131dc()
ntdll.dll!7c913212()
ntdll.dll!7c913281()
ntdll.dll!7c913288()
msvcr80.dll!_msize(void * pblock=0x0012fea8) Line 93 + 0x5 bytes C
msvcr80.dll!_getptd() Line 658 + 0x5 bytes C
msvcr80.dll!_LocaleUpdate::_LocaleUpdate(localeinfo_struct * plocinfo=0x00000000)
Line 264 + 0x5 bytes C++
msvcr80.dll!x_ismbbtype_l(localeinfo_struct * plocinfo=0x003f1ea0, unsigned int
tst=2089879041, int cmask=1244900, int kmask=2014540360) Line 219 C++
003f3330()
msvcr80.dll!parse_cmdline(char * cmdstart=0x00000000, char * * argv=0x0000000c,
char * args=0x0012ff28, int * numargs=0x78132e24, int * numchars=0x00000000)
Line
264 + 0xa bytes C
msvcr80.dll!__set_flsgetvalue() Line 288 + 0xc bytes C
msvcr80.dll!_getptd() Line 658 + 0x5 bytes C
msvcr80.dll!_LocaleUpdate::_LocaleUpdate(localeinfo_struct * plocinfo=0x00000000)
Line 264 + 0x5 bytes C++
msvcr80.dll!x_ismbbtype_l(localeinfo_struct * plocinfo=0x0012ffc0, unsigned int
tst=4313874, int cmask=4194304, int kmask=0) Line 219 C++
stb_imv.exe!WinMain(HINSTANCE__ * hInstance=, HINSTANCE__ * hPrevInstance=, char *
lpCmdLine=, int nCmdShow=) Line 2462 C
kernel32.dll!7c816fd7()
Original comment by [email protected]
on 27 Nov 2007 at 9:21
from stb-imv.
Aha! Yeah, I knew there were issues with unicode but I hadn't realized there
were any
crash bugs due to it. Thanks for tracking this down, I'll fix it.
Original comment by [email protected]
on 27 Nov 2007 at 10:12
from stb-imv.
I have fixed all the main unicode functionality. However, there are cosmetic
issues;
for example, unicode filenames do not display correctly in the label, nor do
they
sort correctly. But I believe all functionality is there.
Let me know if there are still any problems; otherwise I'll close this bug in a
week
or so.
Original comment by [email protected]
on 27 Nov 2007 at 10:51
- Changed state: Fixed
from stb-imv.
Yes. It works now.
Thanks.
Original comment by [email protected]
on 28 Nov 2007 at 2:18
from stb-imv.
Related Issues (20)
- want to SUBMIT a FEATURE REQUEST? first, READ THIS HOT 1
- Enhancement: Use GDI+ to load images HOT 5
- Doesn't compile without modification on Mingw (but does compile! :-) ) HOT 1
- "Back" and "forward" mouse buttons should work. HOT 5
- SPK file support HOT 7
- Arrange by date modified, etc? HOT 3
- revisit "volatile" keyword HOT 3
- Disabling Show border leads to a crash HOT 5
- enhancement: indicate when the window has focus HOT 2
- enhancement: include filename in window title. HOT 1
- Enhancement: Use Windows Imaging Component (WIC) HOT 2
- [REQ] Open in fullscreen Preference HOT 2
- Launch new viewer instance fails when path contains space HOT 2
- F1 doesn't open the documentation HOT 3
- stb-imv "eats" memory HOT 3
- [REQ] Deault window size HOT 3
- Is there any way to convert jpeg to bmp effectively? HOT 3
- directory reading skips .tga files HOT 1
- Include releases on Github
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 stb-imv.