Stream read error heidisql

I have Maria DB and have a localhost Database Server. I exported the Heidi SQL Script and have the Data backed. I have a new Laptop and setup MariaDB and Heidi SQL installed and setup, but everytime I go to import the SQL file I keep getting Stream Read Error on all types UTF, ANSII etc. And on my o

Ads were blocked — no problem. But keep in mind that developing HeidiSQL,
user support and hosting takes time and money. You may want to
send a donation instead.

I have Maria DB and have a localhost Database Server.

I exported the Heidi SQL Script and have the Data backed.

I have a new Laptop and setup MariaDB and Heidi SQL installed and setup, but everytime I go to import the SQL file I keep getting Stream Read Error on all types UTF, ANSII etc.

And on my old machine the files have gotten corrupted despite the fact all the data is there in the FRM files.

I need serious help!!!

Just to add all the «Tables» are displaying as views??

sp all .fr, & .ibd files are in the data folder but in Heidi are only views and not tables.

Be sure you select UTF-8 in the file-open dialog:

Description

.. unless you are sure the file has a different encoding. Could that be the case? How was the file written?

UTF 8 i have tried that still get the stream read error.

Is it version dependent for MariaDB & HeidiSQL?

Description

Im now sat on an SQL file with 4 years worth of data that I can’t do anything with

I also am getting this despite the fact the .frm & ibd files are all there.1.3GB of data

Description

Are you able to open that HRRtransfer.sql file with some editor like Notepad++?

Please login to leave a reply, or register at first.

This page uses cookies to show you non-personalized advertising and server usage statistic diagrams.

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account


Closed

Commifreak opened this issue

Feb 5, 2020

· 5 comments

Comments

@Commifreak

Steps to reproduce this issue

  1. Run specific sql file, dumped with mysqldump;
  2. Then I get an Excpetion while reading the file

Current behavior

Expected behavior

Possible solution

Environment

  • HeidiSQL version: 10.3.0.5571
  • Database system and version: MySQL 5.5.62 & 10.4.6-MariaDB
  • Operating system: Win10 LTSC x64

I just send an bug report via the internal bug reporter as well (kontakt at kluthr dot de).

bugreport.txt

@Commifreak

@Commifreak

Ok, I got it. Instead of «UTF-8» as ecnoding option in the «Run SQL file»-dialog, I had to select ANSI.

Autodetect was not working either.

@ansgarbecker

Yes, «Auto detect» is working very poorly, I admit. I should probably remove that option. However, thanks for your feedback!

@Commifreak

Wouldnt it be a nice feature if HeidiSQL tries all options until a complete read was successful?

  • Select file with Auto-Detect
  • loop through all encodings
  • If error occurs, discard and continue until file can be read
  • Execute the content

?

@ansgarbecker

Detecting a file’s encoding is quite tricky, and even more tricky to detect whether the detection was correct :) So, I should either remove that auto-detect, or maybe rewrite it, using a more stable approach.

2 participants

@Commifreak

@ansgarbecker

Содержание

  1. Read SQL files in UTF8
  2. EReadError (Stream read error) — an error occurred in the application when importing .sql file
  3. Ошибка Stream Read Error
  4. Сообщения 10
  5. #1 Тема от Dyaka 29 марта 2021 09:58:31
  6. Тема: Ошибка Stream Read Error
  7. #2 Ответ от Олег Зырянов 29 марта 2021 10:07:56
  8. Re: Ошибка Stream Read Error
  9. #3 Ответ от Dyaka 29 марта 2021 10:58:21
  10. Re: Ошибка Stream Read Error
  11. #4 Ответ от Олег Зырянов 29 марта 2021 11:06:08
  12. Re: Ошибка Stream Read Error
  13. #5 Ответ от Dyaka 29 марта 2021 11:17:06
  14. Re: Ошибка Stream Read Error
  15. HeidiSQL stalls while reading large UTF-8 MYSQL file after repeated «End of file block was cut within some multibyte character, at position xyz» #354
  16. Comments
  17. Steps to reproduce this issue
  18. Current behavior
  19. Expected behavior
  20. Possible solution
  21. Environment

Read SQL files in UTF8

When I open a utf8 file (with BOM) and :

  • leave encoding «auto-detection», the application raise error «stream read error».
  • I specified encoding «utf8», the application raise error «stream read error».
  • I specified encoding «unicode», the application freeze.

When I open a utf8 file (WITHOUT BOM) and :

  • leave encoding «auto-detection», work but not «decode» accent/specials characters (Result : «Bol en céramique fleurs» expected : «Bol en céramique fleurs»);
  • I specified encoding «utf8», the application raise error «stream read error»;
  • I specified encoding «unicode», the application freeze.

N.B. (1) The sql file is an export from mysqldump. N.B. (2) When I import with phpMyAdmin (and specified utf-8 encoding in html form), BOTH (with and without BOM) imports work perfectly. Note : I like so much HeidiSQL that phpMyAdmin except for this probem.

And for suggestion, an option for execute directly the file (not just the big files).

Same problem here.

I’ve got an UTF-8 encoded SQL file to be imported to MySQL database.

On load, it says «stream error» if «auto-detection» or «UTF-8» is chosen. If «ANSI» is chosen on import, the file loads but is definetely scrambled, e.g. German umlauts read «Anschlüße» instead of «Anschlüsse».

I’m using latest version available: 9.3.0.5083

You might want to try «Load SQL file» AND THEN «Run Query» instead of «Run SQL file». It seems to me that there is an issue with «Run SQL file» so it does not properly handle all supported file formats whereas the other method of loading and then running seems to work beautifully for me at least. If nothing else works, you can open the SQL file in your favorite UTF-8 enabled editor, copy it to the clipboard, and then paste it as a SQL query in HeidiSQL. This method also seems to work for me at least.

When loading a file, you should specify the encoding if you know it, as the auto-detection produced some wrong results in the past. I have already increased the examined text portion to 1MB but that does not always seem to do it. So, prefer UTF-8 or whatever over Auto-detect (may fail)

There has been many reports about problems with UTF-8.

I tried with version 9.5 and it was still not possible to import SQL file with UTF8 BOM (0xEF,0xBB,0xBF). When opening the SQL file into Query window, or menu File->Open SQL File (Ctrl-O) then Heidi seems not to recognize the BOM and Query window shows an empty space on the very first character position (like if file starts with Space character). If then try to run the SQL script (F9) Heidi produces an error with popup Message box and procesing is cancelled.

You can reproduce the problem like this:

  1. Open Windows Notepad and type whenever SQL you want; for example, «— This is SQL comment».
  2. Save file as test.sql when choosing UTF-8 on the Encoding combobox on the botton-right corner of SaveAs window. -> now you have SQL file with UTF-8 BOM;
  3. Back on HeidiSQL, press Ctrl+O and open the sql file. It is no matter what encoding you chose in Heidi’s Open window.
  4. The Query window shows space before comment
  5. Press F9 -> SQL Error (102): Incorrect syntax near ».

I found no workaround to this issue. Regards

The UTF-8 encoding in the file-open dialog refers to «UTF-8 without BOM». You should just store your files without BOM.

Please login to leave a reply, or register at first.

Источник

EReadError (Stream read error) — an error occurred in the application when importing .sql file

I have googled the problem and found this: http://stackoverflow.com/questions/31242480/importing-sql-file-to-heidisql but I’m sure this file has not been used anywhere else. I guess the reason could be the .sql has tables with Chinese and Japanese characters in it? Any idea?

allocated memory : 73.57 MB largest free block : 8181.43 GB executable : heidisql.exe exec. date/time : 2015-12-08 11:16 version : 9.3.0.5024 compiled with : Delphi XE5 madExcept version : 4.0.12 callstack crc : $e27ced9b, $dc4655bf, $dc4655bf exception number : 1 exception class : EReadError exception message : Stream read error.

main thread ($3d04): 005be30d heidisql.exe System.Classes TStream.ReadBuffer 00969349 heidisql.exe helpers 1288 +15 ReadTextfileChunk 00c2430b heidisql.exe Main 3395 +28 TMainForm.RunQueryFile 00c23759 heidisql.exe Main 3329 +65 TMainForm.RunQueryFiles 00c22d21 heidisql.exe Main 3237 +9 TMainForm.actLoadSQLExecute 005da760 heidisql.exe System.Classes TBasicAction.Execute 00665ae3 heidisql.exe Vcl.ActnList TCustomAction.Execute 005da494 heidisql.exe System.Classes TBasicActionLink.Execute 007eb5dc heidisql.exe Vcl.Menus TMenuItem.Click 007edf0f heidisql.exe Vcl.Menus TMenu.DispatchCommand 007f0464 heidisql.exe Vcl.Menus TPopupList.WndProc 007f0365 heidisql.exe Vcl.Menus TPopupList.MainWndProc 005dbd13 heidisql.exe System.Classes StdWndProc 770e98d5 USER32.dll DispatchMessageW 008145ef heidisql.exe Vcl.Forms TApplication.ProcessMessage 00814663 heidisql.exe Vcl.Forms TApplication.HandleMessage 00814b4f heidisql.exe Vcl.Forms TApplication.Run 00c707d7 heidisql.exe heidisql 78 +24 initialization 76fc5a4b kernel32.dll BaseThreadInitThunk

International characters should not be a problem, but others reported that too, so I must say this can be a problem. I only don’t have a solution for that as I’m unsure about the cause of it.

Please login to leave a reply, or register at first.

Источник

Ошибка Stream Read Error

Чтобы отправить ответ, вы должны войти или зарегистрироваться

Сообщения 10

#1 Тема от Dyaka 29 марта 2021 09:58:31

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Тема: Ошибка Stream Read Error

Добрый день! Не нашел решения проблемы по данному вопросу. При входе в программу и выполнении любого действия у пользователя вылетает ошибка Stream read error. У остальных пользователей все нормально. Переустановка не помогает.

#2 Ответ от Олег Зырянов 29 марта 2021 10:07:56

  • Олег Зырянов
  • Технический руководитель
  • Неактивен
  • Откуда: Новосибирск
  • На форуме с 10 декабря 2008
  • Сообщений: 4,174

Re: Ошибка Stream Read Error

Здравствуйте! Запустите конфигурацию TechnologiCS с ключом /skipreg или удалите вручную *.cfg файлы https://help.technologics.ru/7.9/TCSHelp/_876.htm

Больше всего похожена это. Хотя. Что значит при выполнении любого действия? Программа то работает в итоге?

#3 Ответ от Dyaka 29 марта 2021 10:58:21

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Re: Ошибка Stream Read Error

Здравствуйте! Запустите конфигурацию TechnologiCS с ключом /skipreg или удалите вручную *.cfg файлы https://help.technologics.ru/7.9/TCSHelp/_876.htm

Больше всего похожена это. Хотя. Что значит при выполнении любого действия? Программа то работает в итоге?

Работает, пользователь логинится, но после каждого действия вылетает данная ошибка. Запуск с ключом и удаление .cfg файлов не помогло

#4 Ответ от Олег Зырянов 29 марта 2021 11:06:08

  • Олег Зырянов
  • Технический руководитель
  • Неактивен
  • Откуда: Новосибирск
  • На форуме с 10 декабря 2008
  • Сообщений: 4,174

Re: Ошибка Stream Read Error

А можно точную версию TechnologiCS , и более подробное описание того что просходит, послеlовательно по шагам.
В идеале чтобы шаги эти повторялись, а не были случайными. То есть делаем — ошибка. Еще раз делаем — та же ошибка. Перезапустили TCS, повторяем -снова ошибка эта.

#5 Ответ от Dyaka 29 марта 2021 11:17:06

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Re: Ошибка Stream Read Error

А можно точную версию TechnologiCS , и более подробное описание того что просходит, послеlовательно по шагам.
В идеале чтобы шаги эти повторялись, а не были случайными. То есть делаем — ошибка. Еще раз делаем — та же ошибка. Перезапустили TCS, повторяем -снова ошибка эта.

У пользователя версия 5.7.0.0. Я не большой эксперт этой программы, опишу, как могу. Пользователь логинится, программа загружается, пишет о новых сообщениях, закрываем окно, и вылетает окошко с ошибкой Stream read error. Пользователь его закрывает, делает любой отчет, макрос, ошибка снова вылетает, но действие выполняется. В целом, все работает, просто после каждого действия пользователя с момента входа вылетает окошко с ошибкой.

Источник

HeidiSQL stalls while reading large UTF-8 MYSQL file after repeated «End of file block was cut within some multibyte character, at position xyz» #354

Steps to reproduce this issue

  1. create new/empty database X
  2. select database X
  3. select File/Run SQL File (File/Load SQL file will produce «Stream read error»
  4. Encoding = UTF-8, Files of type = All files (.)
  5. select large MYSQL file created during a Drupal 7 backup
  6. watch progress bar until HeidiSQL stalls at 20MiB/296MiB, 219’733 rows
  7. cancel job to return to HeidiSQL

Note: Notepad++ or Sublime open the MYSQL-file without a problem and render the contained multibyte characters (e.g. arabic, chinese, french accents, . ) correctly.

Current behavior

HeidiSQL seems to fail to read (large) MYSQL-files/queries that contain multi-byte characters.

from line 20083 of logfile:

then from line 20093 of logfile the messages repeat with the already mentioned positions from 41’943’040 to 41’943’076, this continues until the last log entries from line 36232 of logfile:

Note: the log file really ends with ‘multibyt’.

Expected behavior

HeidiSQL should be able to read large MYSQL file with UTF-8 encoded multibyte characters without problems.

Possible solution

change strategy to read large files?

Environment

  • HeidiSQL version: 9.5.0.5196
  • Database system and version: MariaDB 10.3.7
  • Operating system: Windows 10 Pro Version 10.0.17134 Build 17134

The text was updated successfully, but these errors were encountered:

Note: MySQL Workbench 8.0 CE connected to the same MariaDB excecuted the same MYSQL file without error.

Are you sure you selected «UTF-8» in the file-open-dialog?

Is there a chance I get that sql file, so I could reproduce this issue?

thanks for the quick response.

I just tried it again to be sure: yes UTF-8 is and was selected.

However, the SQL-File contains sensitive user data . so I cannot send you the (whole) file.
But I am sure the section that causes the trouble with (too many?, an unlucky combination of?) multibyte characters is not sensitive . so if you help me to understand the error log’s «position» I could extract that section and send this part of the query to you. Maybe you can build a test file that pushes this part to a file block boundary and reproduce the undesired behavior.

Or do you see any other way that I can help you narrow down the cause of this problem from my end?

That «position» from the log rows is the byte offset in the file. So, if you extract a portion from

43MB, that should be enough. You can also send it to anse at heidisql.com to keep it a bit more private than here in the tracker.

OK, let me see what I can do . might need to defer it to tomorrow (Sunday) morning, though.

I sent you an email with a test case and log files.

After some research the root cause seems to be that there is non-UTF-8 content in the MySQL file.
It contains LONGBLOBs which have binary data inside.

So my question develops into:

  • how to properly import/run such MySQL dumps?
  • also: why does the huge MySQL file simply «hang» without a message and the shorter test case throws a «stream read error»?

Ok, I received your mail. And I looked at the .mysql file at first with Notepad++, which says it’s ANSI encoded.

Importing it with HeidiSQL/»Run SQL file» with «UTF-8» selected in the file-open dialog, I get the same crash as you got. When using «ANSI» encoding, it does not crash, and the file seems to be imported correctly, although it may be due to the shortness of the file that it doesn’t have UTF8 characters. Apart from the binary contents, there is just no other critical characters. Are you sure the other content is UTF8 encoded?

good question, I needed to double check.

I have tried to find out what Drupal7 says about their SQL export but did not find anything.

The MySQL script says

that – and the fact that we encode all the texts we import to Drupal in UTF-8 — send me down the UTF-8 path.

When I open the 300MB file in Notepad++ the editor says ANSI for me as well.

But the content does not render correctly, e.g.

When I choose UTF-8 in Notepad++, I see:

… which are the correct Chinese translations for the names of different languages (the final character “话” meaning language).

So at least this content seems to be UTF-8 encoded.
In HEX, Notepad++ gives me the following bytes

richard/utf-8.cgi are the UTF-8 codes you would expect for those characters.

So my conclusion is that this MySQL file also has UTF-8 encoded content. At least some of it.

I am a bit puzzled that the MySQL export from Drupal does render a file that does not have a single encoding … or is this the normal behaviour when we have strings and BLOBs in a database?

And that – during import — an MySQL engine is supposed to read an un-encoded byte stream and choose an encoding based on the data type?

Источник

Страницы 1

Чтобы отправить ответ, вы должны войти или зарегистрироваться

#1 29 марта 2021 09:58:31

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Тема: Ошибка Stream Read Error

Добрый день! Не нашел решения проблемы по данному вопросу. При входе в программу и выполнении любого действия у пользователя вылетает ошибка Stream read error. У остальных пользователей все нормально. Переустановка не помогает.

#2 Ответ от Олег Зырянов 29 марта 2021 10:07:56

  • Олег Зырянов
  • Технический руководитель
  • На форуме
  • Откуда: Новосибирск
  • На форуме с 10 декабря 2008
  • Сообщений: 4,183

Re: Ошибка Stream Read Error

Здравствуйте! Запустите конфигурацию TechnologiCS с ключом /skipreg или удалите вручную *.cfg файлы https://help.technologics.ru/7.9/TCSHelp/_876.htm

Больше всего похожена это. Хотя. Что значит при выполнении любого действия? Программа то работает в итоге?

#3 Ответ от Dyaka 29 марта 2021 10:58:21

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Re: Ошибка Stream Read Error

Олег Зырянов пишет:

Здравствуйте! Запустите конфигурацию TechnologiCS с ключом /skipreg или удалите вручную *.cfg файлы https://help.technologics.ru/7.9/TCSHelp/_876.htm

Больше всего похожена это. Хотя. Что значит при выполнении любого действия? Программа то работает в итоге?

Работает, пользователь логинится, но после каждого действия вылетает данная ошибка. Запуск с ключом и удаление .cfg файлов не помогло

#4 Ответ от Олег Зырянов 29 марта 2021 11:06:08

  • Олег Зырянов
  • Технический руководитель
  • На форуме
  • Откуда: Новосибирск
  • На форуме с 10 декабря 2008
  • Сообщений: 4,183

Re: Ошибка Stream Read Error

А можно точную версию TechnologiCS , и более подробное описание того что просходит, послеlовательно по шагам.
В идеале чтобы шаги эти повторялись, а не были случайными. То есть делаем — ошибка. Еще раз делаем — та же ошибка. Перезапустили TCS, повторяем -снова ошибка эта.

#5 Ответ от Dyaka 29 марта 2021 11:17:06

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Re: Ошибка Stream Read Error

Олег Зырянов пишет:

А можно точную версию TechnologiCS , и более подробное описание того что просходит, послеlовательно по шагам.
В идеале чтобы шаги эти повторялись, а не были случайными. То есть делаем — ошибка. Еще раз делаем — та же ошибка. Перезапустили TCS, повторяем -снова ошибка эта.

У пользователя версия 5.7.0.0. Я не большой эксперт этой программы, опишу, как могу. Пользователь логинится, программа загружается, пишет о новых сообщениях, закрываем окно, и вылетает окошко с ошибкой Stream read error. Пользователь его закрывает, делает любой отчет, макрос, ошибка снова вылетает, но действие выполняется. В целом, все работает, просто после каждого действия пользователя с момента входа вылетает окошко с ошибкой.

#6 Ответ от Олег Зырянов 29 марта 2021 11:28:08

  • Олег Зырянов
  • Технический руководитель
  • На форуме
  • Откуда: Новосибирск
  • На форуме с 10 декабря 2008
  • Сообщений: 4,183

Re: Ошибка Stream Read Error

Можно еще скриншот ошибки.

И… Если пользователье ничего не делает,  просто откроет справочник на просмотр, ну и допустим просто иногда открывает форму редактирования, ничего не меняет, закрывает (то есть режим просмотр). Ошибка будет?

#7 Ответ от Dyaka 29 марта 2021 11:39:40 (изменено: , 29 марта 2021 11:39:40)

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Re: Ошибка Stream Read Error

Олег Зырянов пишет:

Можно еще скриншот ошибки.

И… Если пользователье ничего не делает,  просто откроет справочник на просмотр, ну и допустим просто иногда открывает форму редактирования, ничего не меняет, закрывает (то есть режим просмотр). Ошибка будет?

Извиняюсь за качество, как прислали мне. После закрытия окна ошибки и простого просмотра форм ошибка не возникает. Когда пользователь подписывает какой-то документ она снова появляется. При этом документ подписывается (последнее со слов пользователя).

Олег Зырянов пишет:

Можно еще скриншот ошибки.

И… Если пользователье ничего не делает,  просто откроет справочник на просмотр, ну и допустим просто иногда открывает форму редактирования, ничего не меняет, закрывает (то есть режим просмотр). Ошибка будет?

Post’s attachments

image0011.jpg
image0011.jpg 27.33 Кб, 6 скачиваний с 2021-03-29 

You don’t have the permssions to download the attachments of this post.

#8 Ответ от Олег Зырянов 30 марта 2021 08:11:54

  • Олег Зырянов
  • Технический руководитель
  • На форуме
  • Откуда: Новосибирск
  • На форуме с 10 декабря 2008
  • Сообщений: 4,183

Re: Ошибка Stream Read Error

А скажите еще полную версию. До билда.

В 5.7 была нехорошая ошибка,правда вряд ли она бы так проявлялась, но все же.

#9 Ответ от Dyaka 30 марта 2021 14:29:37

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Re: Ошибка Stream Read Error

Олег Зырянов пишет:

А скажите еще полную версию. До билда.

В 5.7 была нехорошая ошибка,правда вряд ли она бы так проявлялась, но все же.

10968

#10 Ответ от Олег Зырянов 30 марта 2021 15:32:51

  • Олег Зырянов
  • Технический руководитель
  • На форуме
  • Откуда: Новосибирск
  • На форуме с 10 декабря 2008
  • Сообщений: 4,183

Re: Ошибка Stream Read Error

Есть новее на сайте, но не критично наверное http://www.technologics.ru/download/addition/v5.html.

Давайте еще версию операционной системы и содержимое файла csdn.ini (тот что в папке программы и тот что в профиле пользователя — точно не подскажу, 5.7 старая и как она точно работает уже мало кто помнит)

Страницы 1

Чтобы отправить ответ, вы должны войти или зарегистрироваться

1 / 1 / 0

Регистрация: 27.03.2018

Сообщений: 93

1

23.05.2020, 11:58. Показов 3486. Ответов 7


Подскажите, что делаю не так.
БД Firebird есть поле типа Blob Binary. В него загружаю фото сотрудников. На форму выводится фото через компонент TDBImage.
При открытии проекта появляется ошибка «stream read error» если файл фото около или больше 1 Мб.

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Супер-модератор

Эксперт Pascal/DelphiАвтор FAQ

32451 / 20945 / 8105

Регистрация: 22.10.2011

Сообщений: 36,213

Записей в блоге: 7

23.05.2020, 12:22

2

Как именно в БД загружаются изображения?



0



1 / 1 / 0

Регистрация: 27.03.2018

Сообщений: 93

23.05.2020, 12:33

 [ТС]

3

через Lazarus загрузку пока не реализовал. Загружаю через Firebird напрямую в таблицу



0



Супер-модератор

Эксперт Pascal/DelphiАвтор FAQ

32451 / 20945 / 8105

Регистрация: 22.10.2011

Сообщений: 36,213

Записей в блоге: 7

23.05.2020, 12:42

4

Вот отсюда и проблема. Когда будет загружено через Лазарус — будет работать.



0



1 / 1 / 0

Регистрация: 27.03.2018

Сообщений: 93

23.05.2020, 12:47

 [ТС]

5

ищу реализацию загрузки картинки по кнопке. может подскажите где посмотреть?



0



Супер-модератор

Эксперт Pascal/DelphiАвтор FAQ

32451 / 20945 / 8105

Регистрация: 22.10.2011

Сообщений: 36,213

Записей в блоге: 7

23.05.2020, 12:52

6

Лучший ответ Сообщение было отмечено salaev как решение

Решение



1



1 / 1 / 0

Регистрация: 27.03.2018

Сообщений: 93

23.05.2020, 14:56

 [ТС]

7

Спасибо огромное. Работает.
А как можно убрать ошибку из-за латинских символов в пути к файлу при добавлении?

Миниатюры

Ошибка stream read error
 



0



1 / 1 / 0

Регистрация: 27.03.2018

Сообщений: 93

23.05.2020, 15:25

 [ТС]

8

и еще…

1. От первого, после открытия проги, клика «Добавить фото» до открытия окна проходит примерно 15 секунд, последующие добавления — около 5 секунд.
2. При добавлении файла Tiff выдает ошибку «stream read error», но загружает его. Потом каждый раз, как курсор встает на человека с этой картинкой — снова ошибка «stream read error» .

Это решимо?



0



EReadError (Stream read error) — an error occurred in the application when importing .sql file

I have googled the problem and found this: http://stackoverflow.com/questions/31242480/importing-sql-file-to-heidisql but I’m sure this file has not been used anywhere else. I guess the reason could be the .sql has tables with Chinese and Japanese characters in it? Any idea?

allocated memory : 73.57 MB largest free block : 8181.43 GB executable : heidisql.exe exec. date/time : 2015-12-08 11:16 version : 9.3.0.5024 compiled with : Delphi XE5 madExcept version : 4.0.12 callstack crc : $e27ced9b, $dc4655bf, $dc4655bf exception number : 1 exception class : EReadError exception message : Stream read error.

main thread ($3d04): 005be30d heidisql.exe System.Classes TStream.ReadBuffer 00969349 heidisql.exe helpers 1288 +15 ReadTextfileChunk 00c2430b heidisql.exe Main 3395 +28 TMainForm.RunQueryFile 00c23759 heidisql.exe Main 3329 +65 TMainForm.RunQueryFiles 00c22d21 heidisql.exe Main 3237 +9 TMainForm.actLoadSQLExecute 005da760 heidisql.exe System.Classes TBasicAction.Execute 00665ae3 heidisql.exe Vcl.ActnList TCustomAction.Execute 005da494 heidisql.exe System.Classes TBasicActionLink.Execute 007eb5dc heidisql.exe Vcl.Menus TMenuItem.Click 007edf0f heidisql.exe Vcl.Menus TMenu.DispatchCommand 007f0464 heidisql.exe Vcl.Menus TPopupList.WndProc 007f0365 heidisql.exe Vcl.Menus TPopupList.MainWndProc 005dbd13 heidisql.exe System.Classes StdWndProc 770e98d5 USER32.dll DispatchMessageW 008145ef heidisql.exe Vcl.Forms TApplication.ProcessMessage 00814663 heidisql.exe Vcl.Forms TApplication.HandleMessage 00814b4f heidisql.exe Vcl.Forms TApplication.Run 00c707d7 heidisql.exe heidisql 78 +24 initialization 76fc5a4b kernel32.dll BaseThreadInitThunk

International characters should not be a problem, but others reported that too, so I must say this can be a problem. I only don’t have a solution for that as I’m unsure about the cause of it.

Please login to leave a reply, or register at first.

Источник

Delphi stream read error when loading image

My program loads a lot of images, but i have a problem with 1 image that used the print-screen button to copy it, from a game, however it is bmp, like all the rest. Whenever i run the program, it says project1.exe raised exception class Ereaderror with message ‘stream read error’ process stopped.

The code is this:

Which is correct. What do you suggest me?

1 Answer 1

The only explanation is that the file is not a valid Windows bitmap (maybe the file is truncated). Or perhaps the file uses some esoteric format not supported by Delphi. Is it using run-length encoding, for example.

If the file did not exist you’d get a different error, one that indicated that no such file exists. So, the file exists but cannot be loaded. Ergo, it’s not a Windows bitmap.

Step 1 to diagnose this is to look at the format of the file. Load up the bitmap file header and check that the values make sense. Probably the easiest way to do this is to step through the VCL code when running your program under the debugger. Enable the Debug DCUs option so that you can do that. Set a breakpoint in TBitmap.ReadStream in the Graphics unit and take it from there.

Having said all that, it may just be easier for you to avoid trying to debug the problem at all. If you can load the image into an image editor, simply save a new copy of the image in a format that will be read by Delphi. For example a plain vanilla Windows bitmap, or, even better, a PNG file which will admit compression.

Источник

Stream read error

I’m getting this error message under heavy load. Here is code abstract and message from my error log. I tried everything I could think of. Any suggestion would be greatly appreciated.

And calling function:

2 Answers 2

You’re not using correct locking. You’re acquiring a read lock on the array of cache entries, but once you find the item you want, you modify it. First, you explicitly modify it by assigning its Position property, and then you implicitly modify it by reading from it, which modifies its Position property again. When other code attempts to read from that same cache item, you’ll have interference. If the source stream’s Position property changes between the time the destination stream calculates how many bytes are available and the time it actually requests to read those bytes, you’ll get a stream-read error.

I have a couple pieces of advice related to this:

  • Don’t use streams as a storage device in the first place. You’re apparently holding the contents of files. You’re not going to change those, so you don’t need a data structure designed for making sequential changes. Instead, just store the data in simple arrays of bytes: TBytes . (Also, use of TStringStream in particular introduces confusion over whether those strings’ encodings are important. A simple file cache shouldn’t be concerned with string encodings at all. If you must use a stream, use a content-agnostic class like TMemoryStream .)
  • Don’t quell an exception that you haven’t actually handled. In this code, you’re catching all exception types, logging some information, clearing the cache, and then proceeding as though everything is normal. But you haven’t done anything to resolve the problem that triggered the exception, so everything is not normal. Since you’re not really handling the exception, you need to make sure it propagates to the caller. Call raise after to call Clear . (And when you log the exception, make sure you log the exception’s ClassName value as well as its message.)

Источник

Ereaderror with message stream read error

Пожалуйста, выделяйте текст программы тегом [сode=pas] . [/сode] . Для этого используйте кнопку [code=pas] в форме ответа или комбобокс, если нужно вставить код на языке, отличном от Дельфи/Паскаля.

Соблюдайте общие правила форума

Следующие вопросы задаются очень часто, подробно разобраны в FAQ и, поэтому, будут безжалостно удаляться:
1. Преобразовать переменную типа String в тип PChar (PAnsiChar)
2. Как «свернуть» программу в трей.
3. Как «скрыться» от Ctrl + Alt + Del (заблокировать их и т.п.)
4. Как запустить программу/файл? (и дождаться ее завершения)
5. Как перехватить API-функции, поставить hook? (перехват сообщений от мыши, клавиатуры — внедрение в удаленное адресное прстранство)
. (продолжение следует) .
Внимание:
Попытки открытия обсуждений реализации вредоносного ПО, включая различные интерпретации спам-ботов, наказывается предупреждением на 30 дней.
Повторная попытка — 60 дней. Последующие попытки — бан.
Мат в разделе — бан на три месяца.
Полезные ссылки:
MSDN Library FAQ раздела Поиск по разделу Как правильно задавать вопросы

Выразить свое отношение к модераторам раздела можно здесь: Rouse_, Krid

Источник

Ошибка Stream Read Error

Чтобы отправить ответ, вы должны войти или зарегистрироваться

Сообщения 10

#1 Тема от Dyaka 29 марта 2021 09:58:31

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Тема: Ошибка Stream Read Error

Добрый день! Не нашел решения проблемы по данному вопросу. При входе в программу и выполнении любого действия у пользователя вылетает ошибка Stream read error. У остальных пользователей все нормально. Переустановка не помогает.

#2 Ответ от Олег Зырянов 29 марта 2021 10:07:56

  • Олег Зырянов
  • Технический руководитель
  • Неактивен
  • Откуда: Новосибирск
  • На форуме с 10 декабря 2008
  • Сообщений: 4,173

Re: Ошибка Stream Read Error

Здравствуйте! Запустите конфигурацию TechnologiCS с ключом /skipreg или удалите вручную *.cfg файлы https://help.technologics.ru/7.9/TCSHelp/_876.htm

Больше всего похожена это. Хотя. Что значит при выполнении любого действия? Программа то работает в итоге?

#3 Ответ от Dyaka 29 марта 2021 10:58:21

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Re: Ошибка Stream Read Error

Здравствуйте! Запустите конфигурацию TechnologiCS с ключом /skipreg или удалите вручную *.cfg файлы https://help.technologics.ru/7.9/TCSHelp/_876.htm

Больше всего похожена это. Хотя. Что значит при выполнении любого действия? Программа то работает в итоге?

Работает, пользователь логинится, но после каждого действия вылетает данная ошибка. Запуск с ключом и удаление .cfg файлов не помогло

#4 Ответ от Олег Зырянов 29 марта 2021 11:06:08

  • Олег Зырянов
  • Технический руководитель
  • Неактивен
  • Откуда: Новосибирск
  • На форуме с 10 декабря 2008
  • Сообщений: 4,173

Re: Ошибка Stream Read Error

А можно точную версию TechnologiCS , и более подробное описание того что просходит, послеlовательно по шагам.
В идеале чтобы шаги эти повторялись, а не были случайными. То есть делаем — ошибка. Еще раз делаем — та же ошибка. Перезапустили TCS, повторяем -снова ошибка эта.

#5 Ответ от Dyaka 29 марта 2021 11:17:06

  • Dyaka
  • Участник
  • Неактивен
  • На форуме с 29 марта 2021
  • Сообщений: 5

Re: Ошибка Stream Read Error

А можно точную версию TechnologiCS , и более подробное описание того что просходит, послеlовательно по шагам.
В идеале чтобы шаги эти повторялись, а не были случайными. То есть делаем — ошибка. Еще раз делаем — та же ошибка. Перезапустили TCS, повторяем -снова ошибка эта.

У пользователя версия 5.7.0.0. Я не большой эксперт этой программы, опишу, как могу. Пользователь логинится, программа загружается, пишет о новых сообщениях, закрываем окно, и вылетает окошко с ошибкой Stream read error. Пользователь его закрывает, делает любой отчет, макрос, ошибка снова вылетает, но действие выполняется. В целом, все работает, просто после каждого действия пользователя с момента входа вылетает окошко с ошибкой.

Источник

Ошибка Stream Read Error возникает, когда серверу приложений ЛОЦМАН не достаточно памяти для того, чтобы вернуть все объекты в базу данных.
Если после возникновения ошибки открыть диспетчер задач, то можно увидеть, что скорее всего использованы все доступные ресурсы оперативной и виртуальной памяти. Проблема скорее системная.

Сервер приложений ЛОЦМАН:PLM не ограничивает размер сохраняемого файла.
Существует ограничение ADO/OLEDB (интерфейс MS SQL Server): при работе с файлами требуется

НЕПРЕРЫВНЫЙ БЛОК ПАМЯТИ РАЗМЕРА СООТВЕТСТВУЮЩЕГО ФАЙЛУ

 , который не всегда доступен в системе (даже небольшого размера) — это зависит от степени фрагментированности оперативной памяти.

При использовании Файлового архива это ограничение не действует,
В СУБД Oracle описанная проблема не возникает.

В том случае, если ошибка возникает при наличии файлового архива, в первую очередь необходимо проверить наличие свободного места в архиве. 

Свободное место, доступное для файлового архива указано в ЦУК:
Файловые архивы — [имя файлового архива] справа в информационной области.
Объем памяти, свободный в архиве, и объем памяти доступный на ресурсе где расположен архив не одно и то же!
Так, под архив может быть выделено 50Гб, а на диске свободно 500Гб.
Архив сможет использовать только выделенные ему 50Гб, не зависимо от того, сколько памяти доступно на диске.

Например, в архиве доступно 0,008 Мб, при сохранении файла объемом 30Мб возникает ошибка
Out of memory, Error creating variant or safe array.
Необходимо открыть свойства файлового архива и увеличить максимальный размер архива, в зависимости от потребностей.

 

Рекомендации по избежанию проблемы:

  1. Используйте файловый архив.  
    Перенесите файлы из базы данных в него.  
    Для хранения большого объема файлов лучше использовать файловый архив, а не таблицы базы данных.  
    Подробнее о создании и о работе с файловыми архивами описано в справке на ЦУК/ЛОЦМАН Администратор.
  2. Старайтесь чаще сохранять информацию в БД малыми порциями, тогда вероятность появления упомянутой ошибки снизится.
  3. Установка дополнительных модулей оперативной памяти на машине, где работает сервер приложений ЛОЦМАН.

Понравилась статья? Поделить с друзьями:
  • Stream read error delphi
  • Stream read error alcohol 120
  • Stream memory fix error для gta san andreas
  • Stream memory fix error gta san andreas как исправить
  • Stream extract error мобайл легенд